Coppermine

Coppermine can be installed such that a common installation is used by several Web sites. To do this, first get a copy of the install file from http://coppermine-gallery.net/index.php. Unzip the install file, using Winduhs unzip, and rename the install directory to match the version number:

     mv cpgabyy cpg-a.b.yy

Create a shared top level directory in the Web tree and copy all of the Coppermine files there:

     mkdir /var/www/Coppermine
     cp -r cpg-a.b.yy/* /var/www/Coppermine

Create a Coppermine directory under the Web site's top level directory and create symbolic links to the shared Coppermine directory:

     mkdir /var/www/mysite/coppermine
     find /var/www/Coppermine -maxdepth 1 \
         -exec ln -s \{\} /var/www/mysite/coppermine \;
     rm -f /var/www/mysite/coppermine/albums
     rm -f /var/www/mysite/coppermine/include
     mkdir /var/www/mysite/coppermine/include
     find /var/www/Coppermine/include -maxdepth 1 \
        -exec ln -s \{\} /var/www/mysite/coppermine/include \;

Copy the non-shared files, that Coppermine hacks, to the Web site's Coppermine directory:

     mkdir /var/www/mysite/coppermine/albums
     cp -r /var/www/Coppermine/albums/* /var/www/mysite/coppermine/albums

Change the permissions (you will need to do this as root) on some of the Coppermine directories so that it can store photos in them:

     su
     chgrp apache /var/www/mysite/coppermine/include
     chgrp apache /var/www/mysite/coppermine/albums
     chgrp apache /var/www/mysite/coppermine/albums/edit
     chgrp apache /var/www/mysite/coppermine/albums/userpics
     chmod g+w /var/www/mysite/coppermine/include
     chmod g+w /var/www/mysite/coppermine/albums
     chmod g+w /var/www/mysite/coppermine/albums/edit
     chmod g+w /var/www/mysite/coppermine/albums/userpics

Create the MySQL database that will be used by all of the Coppermine photo galleries (change the secretpassword to something really super secret):

     $ mysql -u adminusername -p password
     mysql> create database Coppermine;
     mysql> grant all privileges on Coppermine.* to Coppermine@localhost
                  identified by "secretpassword";
     mysql> flush privileges;
     mysql> quit

Fire up the Coppermine install from the Web site:

     http://your.web.site/coppermine/install.php

We prefer the original Coppermine installation to the wizard. So, pick that on the first page.

Set the administrator's username, password and email address in these fields:

     Username:  (we like admin)
     Password:
     Email address:

Set the database name, coppermine username, and coppermine user password in these fields:

     MySQL Database Name:
     MySQL Username:
     MySQL Password:

Then, set the table prefix to something that is a mneumonic of the Web site to which it applies. For example: "mysite_".

If you've installed ImageMagick, set the path to the "convert" program in the field:

     ImageMagick path:

Typically, if you built ImageMagick with the defaults, it will be found in:

     /usr/local/bin/

Once install has run, login as the administrator and change some settings. Here are the ones we set:

     General Settings/
       Gallery name:  My Site Photo Gallery
       Gallery description:  My Site online photo album
       Timezone difference relative to GMT:  -5
     Themes settings/
       Theme:  curve
     Files and thumbnails settings/
       Max size for uploaded files (KB):  16384
       Auto resize images that are larger than max width or height:  Yes:Everyone
     Custom fields for image description/  (if you want custom fields)
       Field 1 name:
       Field 2 name:
       Field 3 name:
       Field 4 name: