Install Coppermine Gallery on Ubuntu 20.04

Install Apache

Install PHP

Install MySQL

Install Let’s Encrypt


  • Install requirement ImageMagick
sudo apt install imagemagick -y

  • Buat directory untuk coppermine
mkdir /var/www/gallery.rainui.cloud
  • Konfigurasi file virtual host untuk domain drupal.rainui.cloud
nano /etc/apache2/sites-available/gallery.rainui.cloud.conf
<VirtualHost *:80>
     ServerAdmin [email protected]
     ServerName gallery.rainui.cloud
     ServerAlias www.gallery.rainui.cloud
     DocumentRoot /var/www/gallery.rainui.cloud

     <Directory /var/www/gallery.rainui.cloud>
         Options Indexes FollowSymLinks
         AllowOverride All
         Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
a2enmod rewrite
systemctl restart apache2
a2ensite gallery.rainui.cloud.conf
systemctl reload apache2

  • Pembuatan database untuk coppermine
mysql> CREATE DATABASE gallery_db;
Query OK, 1 row affected (0.13 sec)

mysql> CREATE USER 'gallery_user'@'localhost' IDENTIFIED BY 'gallery_P@ssw0rd!';
Query OK, 0 rows affected (0.08 sec)

mysql> GRANT ALL PRIVILEGES ON gallery_db.* TO 'gallery_user'@'localhost';
Query OK, 0 rows affected (0.07 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.04 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| gallery_db         |
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
5 rows in set (0.01 sec)

  • Aktifkan SSL/HTTP pada domain gallery.rainui.cloud dengan let’s encrypt
certbot --apache --agree-tos --redirect -m [email protected] -d gallery.rainui.cloud

  • Download coppermine 1.6.15 > extract file download ke dalam directory /var/www/gallery.rainui.cloud > edit permission file
wget https://github.com/coppermine-gallery/cpg1.6.x/archive/refs/tags/v1.6.15.tar.gz
tar -xvzf v1.6.15.tar.gz -C /var/www/gallery.rainui.cloud/ --strip-components=1
chown -R www-data:www-data /var/www/gallery.rainui.cloud/
  • Install coppermine, akses lewat browser. Coppermine license > checking installation files > checking directory permission > Image package: pilih Imagick Extension
  • Testing image library > Database user authentication > Database selection
  • Creating database structure > Create user administrator > Installation completed
  • Tampilan front page coppermine

herdiana3389

A system administrator with skills in system administration, virtualization, linux, windows, networking, cloud computing, container, etc.