How to install Gallery 2

Install the required packages

sudo apt-get install -y ffmpeg dcraw jhead gallery2 php5-adodb apache apache-ssl
sudo apt-get install -y imagemagick

Configure the gallery2 alias

Change the alias to /gallery

sudo vi /etc/apache2/conf.d/gallery2
<Directory /usr/share/gallery2>
Alias /gallery /usr/share/gallery2

Go to http://homer:8000/gallery2/install/

  • Step 1 – Authenticate:
    sudo vi /usr/share/gallery2/login.txt
  • Step 2 – System Checks:
    May get a warning about output buffering being enabled (this is ok)
  • Step 3 – Installation Type:
    Choose Standard installation
  • Step 4 – Storage Setup
    Enter the path: /mnt/apps/gallery/g2data
    Check that the directory is owned by www-admin
  • Step 5 – Database Setup
    Enter the correct database details. Remember to select “Reuse Existing Tables”.
  • Step 6 – Admin User Setup
    Enter the admin password
  • Step 7 – Create Config File
    This is just confirmation that the config file is written to: /usr/share/gallery2/config.php
  • Step 8 – Install Gallery Core
    This may time out if upgrading (check the log files located in /mnt/apps/gallery/g2data)
  • Step 9 – Install Plugins
    Most should activate. Warnings given by Multiroot and Nokia Image Upload modules
  • Step 10 – Check Security
    The config.php should be secured automatically. Reference located at
  • Step 12 – Finish Installation

Should be all done…

Update the Base URI

sudo vi /usr/share/gallery2/config.php
$gallery->setConfig('baseUri', '');

Finally restart

sudo /etc/init.d/apache2 restart