Coppermine is a popular photo gallery software that allows you to create and manage online photo albums. In this tutorial, we will show you how to install Coppermine on an Arch Linux server.
Before you begin, you must have the following:
Before installing Coppermine, you need to install the LAMP stack on your server. LAMP stands for Linux, Apache, MySQL, and PHP. Follow these commands to install the LAMP stack:
sudo pacman -S apache php php-apache mariadb
Next, you need to create a MySQL database for Coppermine. Log in to the MySQL shell as the root user:
mysql -u root -p
Once you are logged in, create a new database and user for Coppermine:
CREATE DATABASE cpg;
CREATE USER 'cpguser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON cpg.* TO 'cpguser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Make sure to replace password
with a secure password of your choice.
Download the latest version of Coppermine from the official website:
cd /var/www/html
sudo wget https://github.com/coppermine-gallery/cpg1.6.x/archive/stable.zip
sudo unzip stable.zip
sudo mv cpg1.6.x-stable cpg
Change the ownership of the cpg
directory to the http
user:
sudo chown -R http:http cpg
Create a new virtual host configuration file for Coppermine:
sudo nano /etc/httpd/conf/extra/cpg.conf
Add the following configuration:
<VirtualHost *:80>
DocumentRoot "/var/www/html/cpg"
ServerName example.com
<Directory "/var/www/html/cpg">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog "/var/log/httpd/cpg-error.log"
CustomLog "/var/log/httpd/cpg-access.log" combined
</VirtualHost>
Make sure to replace example.com
with your domain or IP address.
Save and close the file.
Restart Apache to apply the new configuration:
sudo systemctl restart httpd
Open a web browser and navigate to your domain or IP address, followed by /cpg/install.php
. For example:
http://example.com/cpg/install.php
Follow the on-screen instructions to complete the installation. When prompted for the database information, enter the following:
cpg
cpguser
<your password>
localhost
Once the installation is complete, delete the install.php
file:
sudo rm /var/www/html/cpg/install.php
Congratulations! You have successfully installed Coppermine on your Arch Linux server. You can now upload your photos and start creating your photo galleries.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!