Install Gallery3 Photo Album Organizer In Ubuntu

Introduction

Gallery3 is an open source photo sharing web application based on apache and php. You can use is with your website and it comes with greater uploading option and enhanced performance.

Prerequisites

  • Ubuntu 14.04 OS
  • Apache Latest Version
  • php latest version
  • Mysql Database Latest

Installation

Step1: Install apache2

apt-get install apache2

bbq_(001)

Step 2: Install Mysql-Server

apt-get install mysql-server

Provide  password to mysql (our is P@ssw0rd)

Step 3: Install php with supporting packages

apt-get install php5 php5-mysql php5-gd

bbq_(002)

Step 4: Create Database:

For Gallery3 to work properly we have to create a database:

Login with root password is ‘P@ssw0rd’

mysql -u root -p

bbq_(003)

Create a New  database with name gallery3, provide required credentials, password for this newly created database is ‘password’.

mysql> CREATE DATABASE gallery3;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL ON gallery3.* TO gallery3@localhost IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)

mysql> \q
Bye

 Step 5: Download latest version of Gallery3 package.

wget http://nchc.dl.sourceforge.net/project/gallery/gallery3/3.0.9/gallery-3.0.9.zip

bbq_(004)

Step 6: Configure Web Server:

mv gallery-3.0.9.zip /var/www/html/
cd /var/www/html/

Decompress the contents of gallery.x.x.zip

unzip gallery-3.0.9.zip && ls

bbq_(006)

Change ownership for gallery3 directory:

chown -R www-data /var/www/html/gallery3/

Step 7: Edit php file and set up the required credentials:

Open php file /etc/php5/apache2/php.ini:

vim  /etc/php5/apache2/php.ini

Change short_open_tag = Off to short_open_tag =On.

sample output:

engine = On
; This directive determines whether or not PHP will recognize code between
; <? and ?> tags as PHP source which should be processed as such. It is
; generally recommended that <?php and ?> should be used and that this feature
; should be disabled, as enabling it may result in issues when generating XML
; documents, however this remains supported for backward compatibility reasons.
; Note that this directive does not control the <?= shorthand tag, which can be
; used regardless of this directive.
; Default Value: On
; Development Value: Off
; Production Value: Off
; http://php.net/short-open-tag
short_open_tag = On

; Allow ASP-style <% %> tags.
; http://php.net/asp-tags
asp_tags = Off

; The number of significant digits displayed in floating point numbers.
; http://php.net/precision
precision = 14

; Output buffering is a mechanism for controlling how much output data
; (excluding headers and cookies) PHP should keep internally before pushing that
; data to the client. If your application's output exceeds this setting, PHP
; will send that data in chunks of roughly the size you specify.
; Turning on this setting and managing its maximum buffer size can yield some
; interesting side-effects depending on your application and web server.
; You may be able to send headers and cookies after you've already sent output
; through print or echo. You also may see performance benefits if your server is
; emitting less packets due to buffered output versus PHP streaming the output
; as it gets it. On production servers, 4096 bytes is a good setting for performance
; reasons.

Restart Apache Service.

/etc/init.d/apache2 restart

bbq_(007)

You are almost done, now open web browser, and type:

<ip_addr_of_Gallery3_server>/gallery3

In our scenario it  will be:

http://192.168.1.5/gallery3

 bbq_(008)

Provide mysql Database password, Click Continue.

bbq_(009)

Click on Start using Gallery, A welcome Window will appear which will ask to change email id and password, set up as per your requirement.

bbq_(010)

Provide Information and password.

bbq_(011)

Now Go to add and try to add some Photographs, they will  get loaded at surprisingly fast speed.

bbq_(012)

Sample Images uploaded with gallery3:

bbq_(013)

That’s it, Have fun:

Reference links: