Gallery2 on Ubuntu 7.10

Jan 3, 2008 • Jason Walton

Gallery 2 is a popular web based photo album application. This details how to install Gallery2 on Ubuntu 7.10 (Gutsy Gibbon). These instructions assume you have installed Apache2, PHP, and MySQL (as per an install of Ubuntu Server).

Overview

Create Gallery2 Image Storage

Create the Gallery2 Database

Install the PHP GD library and/or NetPBM library

Download and unpack Gallery2

Create Gallery2 Image Storage

We need to create a directory for Gallery2 to store images in, and this directory needs to be writable by the web-server. On Ubuntu this means creating a directory owned by the group "www-data", and making the directory group-writable.

Replace "dbusername" with your database user name of choice, and "password" with your password of choice.

If you do not have root access, then you need to get your administrator to create a database for you. You can use an existing database; Gallery prefixes all tables and columns in the database with a string you can configure later in the installation process.

Install an image processing library

Gallery2 supports a few different 3rd party image libraries for generating thumbnails, resizing images, and so forth. ImageMagick is a popular choice, and is installable from the Ubuntu repository, however at the time of this writing the ImageMagick in the Ubuntu repository is 6.2.4.5, which has known security issues. So instead we have the choice of the GD library for PHP or NetPBM, both also from the Ubuntu repository. Install with:

If you don't have administrator access to the Ubuntu machine, you'll need to get your administrator to install one of these libraries.

Download and unpack Gallery2

Go grab the latest Gallery 2 . In my case, this is 2.2.4. Go to the directory where you want to install gallery and unpack it. This must be a directory which is visible on the web:

$ cd public_html
$ tar xvzf ../gallery-2.2.4-typical.tar.gz

And then point your browser at the install directory. From here you can pretty much follow the instructions given by the installer. If you need additional help, have a look at the instructions from the Gallery2 website.