Installing Coppermine

Welcome to the world of digital asset management, there are several post both in this blog and the sister blog survialguides that take you through the installation of various DAM systems, for one reason or another, they did not quiet fit into the organisations methods of working.

After some digging around Google Coppermine has risen to the top. So lets try it out.

As per usual and because this is the AWS tips n tricks blog we are running this in the AWS EC2 environment hoping to back the storage off to S3.

The Copper mine install document is pretty cool, but as with all software you can hit some glitches. This is being installed on the same server as the Own Cloud software

Some of this may not be needed for a straight Copermine install, but I am doing both 🙂 See the installing Installing Owncloud.

Again this is based on using the minimal installation of CentOS in the AWS market place.

yum install -y wget httpd php php-mysqli php-pear php-gd  php-xml php-intl php-mysql php-curl curl libcurl ImageMagick ImageMagick-devel php-magickwand unzip

mkdir /opt/software

cd /opt/software



cp -R cpg15x/ /var/www/html/

ln -s /var/www/html/cpg15x /var/www/html/coppermine

cd /var/www/html

chown -R apache:apache cpg15x

Remember if you are installing this on most of the modern distros your have to turn off the firewall and selinux, we will turn these back on when the install is complete and we can tune the environment

service iptables stop

If you want to permanently disable the firewall and rely on AWS then

chkconfig iptables off

To turn of selinux

echo 0 >/selinux/enforce

If you want to do this permanently then

vi /etc/selinux.conf and change the enforced line to disabled

The server is now ready, we just need to create the database. From a server that has a mysql client connect to the server

mysql -u Username -p -h Mysql_host_name
create database coppermine;
create user 'coppermine'@'localhost' identified by 'Password';
create user 'coppermine'@'%' identified by 'Password';
grant all on coppermine.* to 'coppermine'@'localhost' with grant option;
grant all on coppermine.* to 'coppermine'@'%' with grant option;

OK now to sort the httpd.conf file out and we will be ready to install

You can use the following conf settings in the Apache config file, this is an example, just replace the domain name as required

vi /etc/httpd/conf/httpd.conf

<VirtualHost *:80>
DocumentRoot /var/www/html/coppermine
ErrorLog logs/
CustomLog logs/ common

<Directory /var/www/html/coppermine/>
Options None
Order allow,deny
allow from all

Because we are using the virtualhost setting, you must also enable the NameVirtualHost setting, Find the following lines in the file and un-comment, as below.

# Use name-based virtual hosting.

NameVirtualHost *:80

service httpd restart

navigate to http://FQDN/coppermine

Follow the installation questions, this will create the database etc…

Now we need to enable S3 storage, there is not plugin available for storing data is S3, so we are going to have to use the s3fs file system. See installing s3fs for details on how to do this.

Come back here when you are ready to mount the disk.

OK, you now should have a mounted drive

e.g. /mnt/acme-assets

There is an issue in Coppermine in that you need the drive to appear in the Coppermine root directory, I tried a symbolic link but it was not allowed in the software. We need therefore to mount the s3 bucket in the Coppermine root directory

Just to recap and save you the effort of hunting out the post you just cam form

cd  /var/www/html/coppermine/
mkdir mntalbums

edit the /etc/fstab to then mount the bucket in the directory

vi /etc/fstab
s3fs#acme-assets /var/www/html/coppermine/mntalbums fuse allow_other 0 0

You just then mount as normal

mount -a

I would test the mount by creating a directory or file in the mounted folder and then checking in the S3 console to endure that it has been created. Once you are happy that it has mounted properly then you need to configure Coppermine to use the new directory.

The first thing to do is copy the album structure

cp -R /var/www/html/coppermine/albums/* /var/www/html/coppermine/mntalbums/
chown -R apache:apache /var/www/html/coppermine/mntalbums

You will  get an input/outpur error, do not worry. You can not change the owner of a mounted drive. The directory structure will have changed though.

Now go into the Coppermine console and change the path statements in the FileSettimgs

config –> file settings

Really we should install a cache engine, it usually helps PHP applications, use a helpful post by me to help you out APC installation in an Apache PHP environment


You know have a working installation of Coppermine, with a backend file system to AWS S3. Good luck with your testing and evaluation. Stop back soon as there will be more on this software. On the face of it, is look cool so we will want to change the theme etc… to make it a bit more corporate. We will of course leave the Coppermine logo displayed. #Coppermine


Once you are up and running there are a few good plugins to use

You may get this error when you try to upload the plugins

A valid form token could not be found.

This looks like it is to do with cache in the browser, ether dump your cache, or if you do not want to do this use the incognito functions that browsers such as Google Chrome offers, and suddenly it will work.

Resize plugin,74901.0.html

Mass Upload,61281.0.html

Add all pictures to your favorites,63623.0.html

Delete All favorites,68037.0.html

Display message for users,65013.0.html

Allow adding keywords,70360.0.html

Image Manipulation,62875.0.html

Right click menu,70509.0.html

Add keywords easily,76267.0.html


HTML5 slideshow,75994.0.html

HTML5 Uploader,75927.0.html

, , , , ,

  1. #1 by SutoCom on July 19, 2013 - 10:23 am

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Helping you achieve more

The Survival Guides's Blog

How to Survive IT and Holidays is the best place for your personal blog or business site.

%d bloggers like this: