Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to Install Coppermine Photo Gallery on a CentOS VPS

Coppermine Photo Gallery is an open source and easy to use photo gallery software written in PHP, which allows you to publish and manage collection of pictures, create personal photo albums, group albums by categories, send e-cards, allow users to upload pictures to albums via web browser, add comments to pictures and more. Coppermine is one of the oldest and most popular web picture gallery scripts.
In this tutorial we will show you how to install Coppermine Photo Gallery on a CentOS Virtual Server in less than 10 minutes.

In order to be able to install and use Coppermine Gallery, there are certain requirements that need to be met, such as:

  • PHP with GD graphics library enabled. Alternatively, you can install and use ImageMagick. Also, ‘register_globals’ setting should be turned off in php.ini
  • Apache Web Server
  • MySQL installed on your Linux Virtual Server.

This install guide assumes that Apache, MySQL and PHP are already installed and configured on your Coppermine virtual server, so download the latest stable version of Coppermine Photo Gallery at http://coppermine-gallery.net to the ‘/opt’ directory on the server. Then, extract it and move the Coppermine files and directories to the ‘/var/www/html/coppermine’ directory. At the time of writing this tutorial, the latest stable version of Coppermine Photo Gallery is 1.5.36 .

cd /opt/
wget http://downloads.sourceforge.net/project/coppermine/Coppermine/1.5.x/cpg1.5.36.zip 
unzip -d /var/www/html/ cpg1.5.36.zip
mv /var/www/html/cpg15x /var/www/html/coppermine
register_globals should be turned off in php.ini

Coppermine 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 apache:apache -R /var/www/html/coppermine

Create a new MySQL database for Coppermine on your server (do not forget to change ‘your-password’ and use strong password for the ‘coppermine’ MySQL user):

mysql -u root -p
mysql> CREATE DATABASE copperminedb;
mysql> GRANT ALL PRIVILEGES ON copperminedb.* TO 'coppermine'@'localhost' IDENTIFIED BY 'your-password' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
mysql> exit

Locate the php configuration file using the following command:

#php -i | grep php.ini
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini

Edit the ‘php.ini’ configuration file and make sure ‘register_globals’ is set to ‘Off’:

register_globals = off

Create a new virtual host directive in Apache. Edit the Apache configuration file:

vi /etc/httpd/conf/httpd.conf

and 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 using the following command:

service apache2 restart

Open http://your-domain.com/install.php in your favorite web browser and follow the easy instructions, inserting the necessary information as requested: check if permissions on certain directories are properly set, 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. The Coppermine Photo Gallery is now properly configured and ready to use. 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 Linux Virtual Server 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.



This post first appeared on Virtual-Server.org Virtual Server, please read the originial post: here

Share the post

How to Install Coppermine Photo Gallery on a CentOS VPS

×

Subscribe to Virtual-server.org Virtual Server

Get updates delivered right to your inbox!

Thank you for your subscription

×