How to install Coppermine Photo Gallery on an Ubuntu 14.04 VPS
Coppermine is a multi purpose, fully featured and integrated web picture gallery script written in PHP which will allows users to organize images and photos. Coppermine Photo Gallery is one of the oldest and most popular web picture gallery scripts.
Coppermine has the following features: user management (groups, private galleries, etc.), e-cards feature, automatic thumbnail creation, user comments, a slideshow viewer etc.
In this tutorial we will explain how to install Coppermine Photo Gallery on an Ubuntu 14.04 VPS. This tutorial should work on any other Debian based Linux distribution.
This install guide assumes that Apache, MySQL and PHP are already installed and configured on your virtual server. At the time of writing this tutorial, the latest stable version of Coppermine Photo Gallery is 1.5.38 and it requires:
- Apache web server.
- PHP (version 4.3.0 or later) with GD graphics library enabled, or ImageMagick.
- MySQL installed on your Linux VPS.
Login to your server via SSH:
ssh [email protected]_ip
Update the system and install necessary packages:
apt-get update && sudo apt-get -y upgrade apt-get install unzip
Download and extract the Coppermine Photo Gallery archive:
wget http://downloads.sourceforge.net/project/coppermine/Coppermine/1.5.x/cpg1.5.38.zip unzip cpg1.5.38.zip mv cpg15x/ /var/www/html/coppermine
Coppermine Photo Gallery needs write access to ‘albums’ and ‘include’ directories within the ‘/var/www/html/coppermine’ directory. This can easily be accomplished by running the following command:
chown www-data:www-data -R /var/www/html/coppermine
Locate the PHP configuration file:
# php -i | grep -i php.ini Configuration File (php.ini) Path => /etc/php5/cli Loaded Configuration File => /etc/php5/cli/php.ini
Edit the ‘/etc/php5/apache2/php.ini’ configuration file:
Add/modify the following settings:
max_execution_time = 300 max_input_time = 300 memory_limit = 256M post_max_size = 32M upload_max_filesize = 32M
Create a new MySQL database for Coppermine Photo Gallery on your server:
mysql -u root -p mysql> CREATE DATABASE copperminedb; mysql> GRANT ALL PRIVILEGES ON copperminedb.* TO 'coppermineuser'@'localhost' IDENTIFIED BY 'your-password' WITH GRANT OPTION; mysql> FLUSH PRIVILEGES; mysql> quit
Do not forget to replace ‘your-password’ with a strong password.
Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘coppermine.conf’ on your virtual server:
touch /etc/apache2/sites-available/coppermine.conf ln -s /etc/apache2/sites-available/coppermine.conf /etc/apache2/sites-enabled/coppermine.conf nano /etc/apache2/sites-available/coppermine.conf
Then, add the following lines:
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/coppermine/ ServerName your-domain.com ServerAlias www.your-domain.com <Directory /var/www/html/coppermine/> Options FollowSymLinks AllowOverride All </Directory> ErrorLog /var/log/apache2/your-domain.com-error_log CustomLog /var/log/apache2/your-domain.com-access_log common </VirtualHost>
Restart the Apache web server for the changes to take effect:
service apache2 restart
Open your favorite web browser, navigate to http://your-domain.com/install.php and follow the easy instructions on the install screen inserting the necessary information as requested. Select ‘GD2’ (or ‘ImageMagick’ if you have ImageMagick package installed on your server), enter your MySQL username and password and finally create a Coppermine administration account.
That is it. You successfully installed Coppermine Photo Gallery on your Ubuntu 14.04 VPS. Log in to the administrator back-end and start uploading your pictures and publish photo albums.
Of course you don’t have to do any of this if you use one of our Ubuntu Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install Coppermine Photo Gallery for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.