How To Install Gallery3 on Ubuntu 14.04

install gallery3 on ubuntu 14.04

In this tutorial, we will show you how to install Gallery3 on Ubuntu 14.04. For those of you who didn’t know, Gallery3 is an open-source photo sharing web application, based on PHP and MySQL. Gallery 3 has intuitive photo management administration and you can use it into your own website no matter whether you’re running a small personal site or a large community portal.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Gallery3 in Ubuntu 14.04 server.

Install Gallery3 on Ubuntu 14.04

Step 1. First of all, make sure that all packages are up to date.

apt-get update
apt-get upgrade

Step 2. Install LAMP server and include some PHP extension.

sudo apt-get install apache2 
sudo apt-get install mysql-server 
sudo apt-get install php5 php5-cli php5-gd php5-common php5-mysql php5-mbstring

Next, edit your PHP configuration file and set the following:

### nano /etc/php5/apache2/php.ini
short_open_tag = On

Start service Apache web server and MySQL also enable it to start on boot of the server:

/etc/init.d/apache2 start
/etc/init.d/mysql start

Step 3. Configure MySQL Database for Gallery3.

By default, MySQL is not hardened. You can secure MySQL using the mysql_secure_installation script. you should read and below each step carefully which will set a root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MySQL.

mysql_secure_installation

Next, we will need to log in to the MySQL console and create a database for Gallery3. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MySQL root password and hit Enter. Once you are logged in to your database server you need to create a database for the Gallery3 software:

mysql> CREATE DATABASE gallery3;
mysql> GRANT ALL ON gallery3.* TO [email protected] IDENTIFIED BY '54YfQndxln';
mysql> \q

Step 4. Install Gallery3.

Download the latest stable version of Gallery3, At the moment of writing this article it is version 3.0.9:

wget -O /tmp/gallery3.zip http://downloads.sourceforge.net/project/gallery/gallery3/3.0.9/gallery-3.0.9.zip
unzip -d /var/www/html /tmp/gallery3.zip
cd /var/www/html/gallery3
chown www-data: -R ../gallery3/

Step 5. Accessing Gallery3.

Gallery3 will be available on HTTP port 80 by default. Open your favourite browser and navigate to http://yourdomain.com/gallery3 or http://server-ip/gallery3 and complete the required steps to finish the installation. If you are using a firewall, please open port 80 to enable access to the control panel.

Install Gallery3 on Ubuntu 14.04

Congratulations! You have successfully installed Gallery3. Thanks for using this tutorial for installing Gallery3 in Ubuntu 14.04 system. For additional help or useful information, we recommend you to check the official Gallery3 web site.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!