fully_featured_web_based_photograph_gallery
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| fully_featured_web_based_photograph_gallery [2017/02/01 21:53] – walkeradmin | fully_featured_web_based_photograph_gallery [2017/02/01 22:00] (current) – removed walkeradmin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Fully Featured Web Based Photograph Gallery ====== | ||
| - | |||
| - | ===== Introduction ===== | ||
| - | \\ | ||
| - | This project will be using an off the shelf photo gallery called <color orange> | ||
| - | \\ | ||
| - | \\ | ||
| - | The software is fully featured and allows for mass upload of images, multiple galleries as well as multiple users. | ||
| - | \\ | ||
| - | \\ | ||
| - | You will need the following software to be installed: | ||
| - | \\ | ||
| - | * Suitable OS (I am using Raspbian Jesse Lite)...[[https:// | ||
| - | * MySQL................................................................Use APT-GET | ||
| - | * PHP....................................................................Use APT-GET | ||
| - | * Coppermine Gallery..............................................[[http:// | ||
| - | * ImageMagick........................................................Use APT-GET | ||
| - | |||
| - | All of this software is freely available and completely free, so this is a very cost effective project. | ||
| - | \\ | ||
| - | \\ | ||
| - | There are a ton of user guides on putting Linux on to the Raspberry Pi, so I will not cover that here, once you have got a suitable version of Linux on your device, we need to follow these steps: | ||
| - | \\ | ||
| - | \\ | ||
| - | * Change Default Password (super important) | ||
| - | * Update the Linux to the latest version | ||
| - | * Change Host Name | ||
| - | * Install Apache | ||
| - | * Install MySQL | ||
| - | * Install PHP | ||
| - | * Install Imagemagick | ||
| - | * Create a Database | ||
| - | * Download Coppermine | ||
| - | * Change some folder permissions | ||
| - | * Install Coppermine | ||
| - | * Setup Apache to see the site | ||
| - | * Configure Coppermine | ||
| - | * Edit some PHP settings (for download sizes) | ||
| - | * Setup a Firewall to restrict access | ||
| - | * Test | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
| - | |||
| - | ===== Change Default Password ===== | ||
| - | By default your Raspberry Pi comes with an account ' | ||
| - | \\ | ||
| - | In order to change the username ' | ||
| - | \\ | ||
| - | passwd | ||
| - | \\ | ||
| - | Now enter the your current password, followed by the new password (you have to do this twice) | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
| - | |||
| - | ===== Update the Linux to the latest version ===== | ||
| - | To update the Raspberry Pi to the latest versions, use the following commands | ||
| - | \\ | ||
| - | sudo apt-get update | ||
| - | sudo apt-get upgrade | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
| - | |||
| - | ===== Change the Host Name ===== | ||
| - | \\ | ||
| - | To change the Host Name we can use the following tool: | ||
| - | \\ | ||
| - | sudo raspi-config | ||
| - | \\ | ||
| - | From this tool select: | ||
| - | \\ | ||
| - | Advanced Options | ||
| - | Host Name (enter new host name here) | ||
| - | \\ | ||
| - | Raspberry Pi will now reboot. | ||
| - | \\ | ||
| - | |||
| - | ----- | ||
| - | ===== Install Apache ===== | ||
| - | sudo apt-get install apache2 | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
| - | ===== Install MySQL ===== | ||
| - | sudo apt-get install mysql-server | ||
| - | | ||
| - | during the install you will have to enter a new password for the MySQL root user (don't forget it) | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
| - | ===== Install PHP ===== | ||
| - | sudo apt-get install php5 | ||
| - | sudo apt-get install php5-mysql | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
| - | ===== Install Imagemagick ===== | ||
| - | sudo apt-get install imagemagick | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
| - | ===== Create Database ===== | ||
| - | \\ | ||
| - | Before we can install Coppermine, which requires a database, we need to create our database (we have installed MySQL which is the database software, but there are no databases by default) | ||
| - | \\ | ||
| - | \\ | ||
| - | From the command line, type: | ||
| - | mysql -u root -p (if the mysql username is root and password is piper - enter mysql -u root -ppiper) | ||
| - | | ||
| - | Note there is no space between -p and the password -ppiper | ||
| - | | ||
| - | SUPER IMPORTANT - Don't forget the ; at the end of the database commands | ||
| - | | ||
| - | CREATE DATABASE mygallery; | ||
| - | SHOW DATABASES; | ||
| - | exit | ||
| - | \\ | ||
| - | After creating the database, you might want to check this out [[run_security_after_install|Run Security After Install]] | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
| - | ===== Download Coppermine ===== | ||
| - | \\ | ||
| - | To download coppermine (change the last part cpg1.5.42.zip to the latest version) | ||
| - | wget http:// | ||
| - | unzip the file | ||
| - | unzip cpg1.5.42.zip | ||
| - | move the foder to apache | ||
| - | sudo mv cpg15x/ / | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
| - | ===== Change some folder permissions ===== | ||
| - | \\ | ||
| - | chown www-data: | ||
| - | This changes the default permissions to the www-data (apache) user. So apache has rights to modify the files | ||
| - | \\ | ||
| - | \\ | ||
| - | We also need to change the write permissions for the following folders: | ||
| - | * include | ||
| - | * albums | ||
| - | * albums/ | ||
| - | * albums/ | ||
| - | To do this enter: | ||
| - | \\ | ||
| - | chmod -R 777 / | ||
| - | chmod -R 777 / | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
| - | ===== Setup Apache ===== | ||
| - | \\ | ||
| - | If you use a browser to look at your computer (http:// | ||
| - | \\ | ||
| - | What we need to do is edit the apache config to point you your site. | ||
| - | \\ | ||
| - | cd / | ||
| - | sudo nano 000-default-conf | ||
| - | | ||
| - | change DocumentRoot to / | ||
| - | |||
| - | Restart Apache | ||
| - | sudo / | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
| - | ===== Configure Coppermine ===== | ||
| - | \\ | ||
| - | Connect to the site | ||
| - | http:// | ||
| - | \\ | ||
| - | You will get the message: | ||
| - | Coppermine Photo Gallery seems not to be installed correctly, or you are running coppermine for the first time. | ||
| - | You'll be redirected to the installer. If your browser doesn' | ||
| - | \\ | ||
| - | when you click ' | ||
| - | \\ | ||
| - | \\ | ||
| - | {{: | ||
| - | \\ | ||
| - | \\ | ||
| - | Fill out your details in the window above using your passwords and usernames. Remember Apache username is probably root. | ||
| - | \\ | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
| - | ===== Edit some PHP settings ===== | ||
| - | Open and edit file php.ini | ||
| - | \\ | ||
| - | sudo nano / | ||
| - | |||
| - | Find and edit these two settings define the maximum file upload size: | ||
| - | \\ | ||
| - | upload_max_filesize = 2000M | ||
| - | post_max_size = 3000M | ||
| - | \\ | ||
| - | This will increase upload limits on a single file to 256 MB, from the default of 2 MB. | ||
| - | “post_max_size” is set 1 MB larger than “upload_max_filesize” to take into account for any additional meta-data about the file that is included in the request (e.g., Header data). | ||
| - | \\ | ||
| - | \\ | ||
| - | If multiple files are uploads in the same POST request, then post_max_size will need to be set greater than the size of all the files combined (i.e., post_max_size > upload_max_filesize * number-of-files + 1MB * number-of-files). | ||
| - | \\ | ||
| - | Now Reboot | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
| - | ===== Firewall Setup ===== | ||
| - | \\ | ||
| - | Please see the following page: | ||
| - | \\ | ||
| - | [[ufw_-_uncomplicated_firewall|UFW - Uncomplicated Firewall]] | ||
| - | \\ | ||
| - | \\ | ||
fully_featured_web_based_photograph_gallery.1485986023.txt.gz · Last modified: (external edit)
