{"id":3372,"date":"2018-04-23T14:53:28","date_gmt":"2018-04-23T10:53:28","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/ubuntu-coppermine-photo-gallery\/"},"modified":"2018-04-23T14:53:28","modified_gmt":"2018-04-23T10:53:28","slug":"how-to-install-coppermine-photo-gallery-on-ubuntu-16-04-lts","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-install-coppermine-photo-gallery-on-ubuntu-16-04-lts\/","title":{"rendered":"How to install Coppermine Photo Gallery on Ubuntu 16.04 LTS"},"content":{"rendered":"<p>Coppermine is a free, open source, fully featured and integrated photo gallery software written in PHP that allows us to publish and manage a\u00a0collection of pictures, create personal photo albums, group albums by categories, send e-cards, organize images and photos, and many more.<\/p>\n<p>In this tutorial, we will learn how to install Coppermine Photo Gallery on Ubuntu 16.04.<\/p>\n<h2 id=\"prerequisites\">Prerequisites<\/h2>\n<ul>\n<li>A server running Ubuntu 16.04.<\/li>\n<li>A non-root user with sudo privileges.<\/li>\n<\/ul>\n<h2 id=\"install-lamp-server\">Install LAMP Server<\/h2>\n<p>Before starting, you will need to install LAMP (Apache, MariaDB and PHP7) to your system.<\/p>\n<p>First, install Apache web server by running the following command:<\/p>\n<p class=\"command\">sudo apt-get install apache2 -y<\/p>\n<p>Once Apache is installed, start apache service and enable it to start on boot time with the following command:<\/p>\n<p class=\"command\">sudo systemctl start apache2<br \/>sudo systemctl enable apache2<\/p>\n<p>By default, the latest version of the MariaDB and PHP is not available in Ubuntu 16.04. So you will need to add the repository for that.<\/p>\n<p>You can add the MariaDB and PHP repository with the following command:<\/p>\n<p class=\"command\">sudo apt-key adv &#8211;recv-keys &#8211;keyserver hkp:\/\/keyserver.ubuntu.com:80 0xF1656F24C74CD1D8<br \/>sudo add-apt-repository ppa:ondrej\/php<br \/>sudo add-apt-repository &#8216;deb [arch=amd64,i386,ppc64el] http:\/\/kartolo.sby.datautama.net.id\/mariadb\/repo\/10.2\/ubuntu xenial main&#8217;<\/p>\n<p>Next, update the repository with the following command:<\/p>\n<p class=\"command\">sudo apt-get update -y<\/p>\n<p>Once the repository is updated, install MariaDB and PHP7 by running the following command:<\/p>\n<p class=\"command\">sudo apt-get install mariadb-server libapache2-mod-php7.0 php7.0 php7.0-cli php7.0-common php7.0-curl php7.0-gd php7.0-intl php7.0-json php7.0-mysql php7.0-imagic imagemagick -y<\/p>\n<p>Once all the packages are installed, start MariaDB server and enable it to start on boot time with the following command:<\/p>\n<p class=\"command\">sudo systemctl start mysql<br \/>sudo systemctl enable mysql<\/p>\n<p>Next, you will need to make some changes in php.ini file:<\/p>\n<p class=\"command\">sudo nano \/etc\/php\/7.0\/cli\/php.ini<\/p>\n<p>Make the following changes:<\/p>\n<pre>max_execution_time = 300&#13;\nmax_input_time = 300&#13;\nmemory_limit = 512M&#13;\npost_max_size = 32M&#13;\nupload_max_filesize = 32M&#13;\ndate.timezone = Asia\/Kolkata&#13;\n<\/pre>\n<p>Save and close the file, when you are finished.<\/p>\n<h2 id=\"configure-mariadb-for-coppermine\">Configure MariaDB for Coppermine<\/h2>\n<p>First, you will need to secure MariaDB server. You can do this by running mysql_secure_installation script:<\/p>\n<p class=\"command\">sudo mysql_secure_installation<\/p>\n<p>Answer all the questions as shown below:<\/p>\n<pre>Set root password? [Y\/n] Y&#13;\nNew password:&#13;\nRe-enter new password:&#13;\nRemove anonymous users? [Y\/n] Y&#13;\nDisallow root login remotely? [Y\/n] Y&#13;\nRemove test database and access to it? [Y\/n] Y&#13;\nReload privilege tables now? [Y\/n] Y<\/pre>\n<p>Next, login to MariaDB shell and create a database and user for Coppermine:<\/p>\n<p class=\"command\">mysql -u root -p<\/p>\n<p>Enter your root password, then create a user and database for Coppermine with the following command:<\/p>\n<p class=\"command\">MariaDB [(none)]&gt; CREATE DATABASE copperminedb;<br \/>MariaDB [(none)]&gt; CREATE USER &#8216;coppermine&#8217;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;password&#8217;;<\/p>\n<p>Next, grant privileges to the Coppermine database with the following command:<\/p>\n<p class=\"command\">MariaDB [(none)]&gt; GRANT ALL PRIVILEGES ON copperminedb.* TO &#8216;coppermine&#8217;@&#8217;localhost&#8217;;<\/p>\n<p>Next, run the FLUSH PRIVILEGES command so that the privileges table will be reloaded by MariaDB:<\/p>\n<p class=\"command\">MariaDB [(none)]&gt; FLUSH PRIVILEGES;<\/p>\n<p>Finally, exit from the MariaDB shell:<\/p>\n<p class=\"command\">MariaDB [(none)]&gt; EXIT<\/p>\n<h2 id=\"install-coppermine\">Install Coppermine<\/h2>\n<p>First, you will need to download the latest version of the Coppermine. You can do this by running the following command:<\/p>\n<p class=\"command\">wget https:\/\/excellmedia.dl.sourceforge.net\/project\/coppermine\/Coppermine\/1.5.x\/cpg1.5.46.zip<\/p>\n<p>Next, extract the downloaded file with the following command:<\/p>\n<p class=\"command\">unzip cpg1.5.46.zip<\/p>\n<p>Next, copy extracted directory to the apache root directory:<\/p>\n<p class=\"command\">sudo cp -r cpg15x \/var\/www\/html\/coppermine<\/p>\n<p>Next, give proper permission to the coppermine directory:<\/p>\n<p class=\"command\">sudo chown -R www-data:www-data \/var\/www\/html\/coppermine<br \/>sudo chmod -R 777 \/var\/www\/html\/coppermine<\/p>\n<h2 id=\"configure-apache-for-coppermine\">Configure Apache for Coppermine<\/h2>\n<p>Next, you will need to create an apache virtual host file for Coppermine. You can do this by running the following commmand:<\/p>\n<p class=\"command\">sudo nano \/etc\/apache2\/sites-available\/coppermine.conf<\/p>\n<p>Add the following lines:<\/p>\n<pre>&lt;VirtualHost *:80&gt;&#13;\nServerAdmin <a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"3c5d585155527c4553494e5853515d5552125f5351\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a>&#13;\nDocumentRoot \"\/var\/www\/html\/coppermine\"&#13;\nServerName yourdomain.com&#13;\n&lt;Directory \/&gt;&#13;\nOptions FollowSymLinks&#13;\nAllowOverride All&#13;\n&lt;Directory \"\/var\/www\/html\/coppermine\/\"&gt;&#13;\nOptions MultiViews FollowSymlinks<br\/>&#13;\nAllowOverride All&#13;\nOrder allow,deny&#13;\nAllow from all&#13;\n&lt;\/Directory&gt;&#13;\nTransferLog \/var\/log\/apache2\/coppermine_access.log&#13;\nErrorLog \/var\/log\/apache2\/coppermine_error.log&#13;\n&lt;\/VirtualHost&gt;&#13;\n<\/pre>\n<p>Save and close the file when you are finished, then enable virtual host with the following command:<\/p>\n<p class=\"command\">sudo a2ensite coppermine<\/p>\n<p>Finally, restart Apache service to apply all the changes:<\/p>\n<p class=\"command\">sudo systemctl restart apache2<\/p>\n<h2 id=\"access-coppermine\">Access Coppermine<\/h2>\n<p>Open your web browser and type the URL <strong>http:\/\/yourdomain.com\/install.php<\/strong>, you will be redirected to the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-Page1\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_coppermine_photo_gallery_on_ubuntu_1604\/big\/Page1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-coppermine-photo-gallery-on-ubuntu-16-04-lts.png\" alt=\"Coppermine web installer\" width=\"550\" height=\"270\" title=\"\"><\/a><\/p>\n<p>Here, choose the language and click on the <strong>Let&#8217;s Go<\/strong> button, you should see the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-Page2\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_coppermine_photo_gallery_on_ubuntu_1604\/big\/Page2.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-coppermine-photo-gallery-on-ubuntu-16-04-lts-1.png\" alt=\"Start installation\" width=\"550\" height=\"189\" title=\"\"><\/a><\/p>\n<p>Now, click on the <strong>click here<\/strong> button, you should see the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-Page4\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_coppermine_photo_gallery_on_ubuntu_1604\/big\/Page4.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-coppermine-photo-gallery-on-ubuntu-16-04-lts-2.png\" alt=\"Database settings\" width=\"550\" height=\"290\" title=\"\"><\/a><\/p>\n<p>Here, provide your Coppermine admin credential and database details, then click on the <strong>Let&#8217;s Go<\/strong> button you should see the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-Page5\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_coppermine_photo_gallery_on_ubuntu_1604\/big\/Page5.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-coppermine-photo-gallery-on-ubuntu-16-04-lts-3.png\" alt=\"Installation finished\" width=\"550\" height=\"262\" title=\"\"><\/a><\/p>\n<p>The installation is now completed, click on the <strong>Let&#8217;s Go<\/strong> button, you should see the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-Page6\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_coppermine_photo_gallery_on_ubuntu_1604\/big\/Page6.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-coppermine-photo-gallery-on-ubuntu-16-04-lts-4.png\" alt=\"Lets go\" width=\"550\" height=\"265\" title=\"\"><\/a><\/p>\n<p>Here, provide your Admin login details, then click on <strong>Ok<\/strong> button, you should see the Coppermine dashboard in the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-Page7\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_coppermine_photo_gallery_on_ubuntu_1604\/big\/Page7.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-coppermine-photo-gallery-on-ubuntu-16-04-lts-5.png\" alt=\"Coppermine Photo Gallery Dashboard\" width=\"550\" height=\"286\" title=\"\"><\/a><\/p>\n<p>Congratulations! you have successfully installed Coppermine in Ubuntu 16.04 server.<\/p>\n<div>\n<p><b>Share this page:<\/b><\/p>\n<p>\n<a href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fubuntu-coppermine-photo-gallery%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-coppermine-photo-gallery-on-ubuntu-16-04-lts-6.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fubuntu-coppermine-photo-gallery%2F&amp;text=How+to+install+Coppermine+Photo+Gallery+on+Ubuntu+16.04+LTS&amp;via=howtoforgecom&amp;related=howtoforgecom\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-coppermine-photo-gallery-on-ubuntu-16-04-lts-7.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/howtoforgecom\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-coppermine-photo-gallery-on-ubuntu-16-04-lts-8.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/plus.google.com\/share?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fubuntu-coppermine-photo-gallery%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-coppermine-photo-gallery-on-ubuntu-16-04-lts-9.png\" height=\"20\" alt=\"\" title=\"\"><\/a>\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Coppermine is a free, open source, fully featured and integrated photo gallery software written in PHP that allows us to publish and manage a\u00a0collection of pictures, create personal photo albums, group albums by categories, send e-cards, organize images and photos, and many more. In this tutorial, we will learn how to install Coppermine Photo Gallery [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-3372","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/3372","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=3372"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/3372\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=3372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=3372"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=3372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}