Tutorials - New CGI Platform > Help Installing Coppermine

Tutorials & FAQs: Scripts: How to install Coppermine

If you use your account to run your own website, one feature you might like to add is a gallery to share your photographs. This tutorial provides guidance for installing Coppermine a sophisticated piece of software for displaying photographs online.

Expertise required

You'll be able to install this software very easily if you follow the step-by-step instructions methodically and accurately type what you see.


  • In two places, you will be required to transfer a file to the CGI server machine. If you have a graphical FTP software package, such as CuteFTP, you may use that. Otherwise, you may use a command line interface (instructions given). However, to do this you'll need to know how to bring up a Command Prompt (possibly called a DOS command,or DOS box) on your operating system and how to then change directory.
  • The installation process also requires you to log on to the CGI server machine. Don't worry, all the commands you'll need are given within the tutorial, so even relatively inexperienced users should not be put off.
  • Non-Windows users should have little difficulty in interpreting the instructions for their operating systems. Very little is actually done on the local host, so the procedure is essentially operating system neutral in this respect.


Getting started with Coppermine

Prior to starting, make sure you have activated both MySQL and CGI usage for your account. (The Website Settings link of the Portal provides tools for doing this. If you do not see the MySQL and CGI configuration tools when you select Website settings, you'll need to upgrade to an account type which includes them.)

For simplicity, red text has been used to indicate text which must be entered exactly as shown. Do not alter it at all (unless you know what you are doing).

Using Coppermine with your CGI webspace

Obtaining the Coppermine software

  1. Visit the Coppermine website to obtain the Coppermine software.
  2. Click on the Download Now link.
  3. Several different packages are available for downloading. Select the 'Full Package', and because we're going to be installing on a Linux machine, download the 'gzip' version.
  4. Place it in any convenient directory on your home PC (this is just a temporary location from where you can copy it to the CGI server machine).


Transferring the Coppermine package to the CGI server

In this step, we're concerned with placing a copy of the Coppermine gzip file onto the PlusNet CGI server.

You use FTP to copy the package to the server. If you have graphical FTP software (such as CuteFTP) you can use that to put it in your home directory on the CGI server. (You'll see there's already a directory called cgi-bin in your home directory - do not put the Coppermine file in this directory, it should go in your home directory.)

If you don't have a graphical FTP software package (or if you'd like to try the command line for a change) follow the detailed instructions below for using a command line interface. Note that commands are sent by typing the command and then 'sending' it by pressing the Return or Enter key.

  1. Bring up a Command Prompt.
  2. Switch to the directory containing the Coppermine file you've downloaded.

    drive:\dir> cd <directory name>

    Now FTP the Coppermine file to the CGI server:

    drive:\dir> ftp cshell.plus.net
    Connected to <CGI server name>.
    220 ProFTPD 1.2.10 Server (ProFTPD) [212.159.7.170]
    User (<CGI server name>:(none)): <your username>
    331 Password required for <your username>
    Password: <your password for the CGI server machine>
    230 User <your username> logged in
    ftp> bin
    200 Type set to I.
    ftp> prompt
    Interactive mode Off
    ftp> mput cpg*
    200 PORT command successful
    150 Opening BINARY mode data connection for cpgl.3.2.tar.gz
    226 Transfer complete
    ftp: 544080 bytes sent in 17.13Seconds 31.77Kbytes/sec.
    ftp> quit
    221 Goodbye

    drive:\dir> (Back at the Windows Command Prompt)

    Keep the Command Prompt window open - we use it in the next step!


Extracting the software on the CGI server

Your gzip Coppermine package is now in your home directory on the CGI server. You now need to unpack it:
  1. Log on to the CGI server machine using telnet.
  2. If you used graphical FTP software to transfer the package to the CGI server, this is the point at which you need to open a Command Prompt.
    drive:\dir> telnet cshell.plus.net
    [Connecting]

    Linux 2.6.11-PlusNet-cgi (<timestamp>)

    login: <your username>
    Password: <your password for the CGI server machine>
    Last login: <timestamp> from <your username>.plus.com

    username@cshell1 username $


You have now logged on, and you're at a Linux 'shell' prompt (a Linux way of saying 'Command' Prompt). A feature of the shell is that if you write a few letters of a filename and then press the tab key, it will complete the rest of the name, based on the files in the directory. We'll make use of that feature here, so you don't have to remember the full name of the file we're interested in.

Note: Linux systems are case sensitive (i.e. it matters whether you type in upper case or lower case). Use exactly the same case as is shown here, otherwise Linux won't understand. If you type 'coppermine' this is not the same as 'Coppermine', for example.

Extracting the files from the Coppermine package:

username@cshell1 username $ tar xvzf cpg<press the tab key, then enter>


You'll see each file listed as it is extracted, and when extraction has finished you should now have a directory called coppermine which contains all your Coppermine files. The tar.gz file will still be there, and you'll have another directory, cgibin, which was there from before you started.

Deciding on a directory name for your gallery

This step is optional, but it will determine the URL (web address) used to access your gallery (<ccgi.username.plus.com>).
  1. The next part of the URL is the directory name in which the Coppermine software resides. By default, it is /cpgXXX, so you would access the forum with this URL: http://<forum hostname>/cpgXXX (where XXX is the version number e.g. cpg132).
  2. If you don't like the directory name 'coppermine', now is the time to change it. It is more difficult to change later, although it can be done (the name is stored in the MySQL database). For example, you might prefer to call it 'photos', which would then make your gallery's web address: http://<forum hostname>/photos
  3. If you want to change the directory name, you do it from your telnet session (e.g. change from 'coppermine' to 'photos')
    username@cshell1 username $ mv cpg132 photos


In the remainder of this tutorial, this directory will be referred to as <coppermine directory>. If you decided not to change it, type cpg132 wherever you see this; otherwise type the name you gave the directory (e.g. 'photos' in the example above).
The web address used to access your gallery (shown as <your gallery address> later in this tutorial) is: http://<coppermine hostname>/<coppermine directory>

Changing file permissions

In order to allow php files to be executed we need to change the permissions of all the php files using the following command.

This is because by default php files being text files are not executable. Fortunately there is a script that will do this easily for you.
username@cshell1 username $ /usr/local/bin/fixphpperms.sh -r


we also need to change the permissions on the albums and include folders.
username@cshell1 username $ cd <coppermine directory>
username@cshell1 username $ chmod -R 750 albums include


Installing the software

The next step of the installation is carried out from your web browser on your PC.

  1. Browse to <your coppermine address> which we've just determined: http://<coppermine hostname>/<copperminedirectory>/install.php.
  2. In your browser you'll be presented with the installation page for Coppermine.
  3. Enter a username and password which you will use to administer coppermine, then complete the MySQL Host, Database Name, Username and Password from the information provided in your MySQL activation email. Leave the ImageMagick path blank and click Let’s Go!
  4. You'll now see the 'Installation Completed' screen. This will tell you that Coppermine is now properly configured and ready to roll.
  5. Click on the Login link and enter the username and password you chose earlier.

Congratulations! You’ve now installed Coppermine and are ready to set up your first gallery.

Disconnecting from the CGI Server

Now exit from telnet:
username@cshell1 username $ exit
logout

Connection to host lost.

drive:\dir> exit (closes the Windows Command Prompt)


Next Steps

Coppermine's online manual includes detailed help pages on setting up and using the Coppermine software.

Acknowledgements
This document was originally hosted on the PlusNet Portal, and has been reproduced here at the request of PlusNet Staff.
Original Article by: csogilvie - Edited by: csogilvie