Gentoo Wiki


Please improve it in any way that you see fit, and remove this notice {{Cleanup}} from the article. For tips on cleaning and formatting see Cleanup process

Please format this article according to the guidelines and Wikification suggestions, then remove this notice {{Wikify}} from the article

Pre Install

Before you start with your gallery install, make sure that you have apache with php "Apache Modules PHP" working properly.

Installing Gallery (via. GUI)

First download the necessary applications:

emerge Apache-Gallery unzip jhead

Then put gallery into setup mode:

cd /var/www/localhost/htdocs/gallery

The setup webpage will first show you the status of the gallery setup (if you need to download anything else), then it will guide you through all of the steps needed for your configuration.


Once the setup is complete, the webpage will be repointed to the main gallary url. You now should have a working version of gallery 1.x!!! (you might be asked in the setup stage to make some modifications to make everything work. Those specifics would be out of the range of this doc. ... so far.)

The final stage would be to make the config page secure again. To do this, at the command prompt, enter the following:


I'll write down how to install and configure gallery for multiple users.

The configuration I use is

I'm writing this HOWTO as I go on with my own installation. The plan is to enable several diffent users, on different vhosts to have their own independent galleries.

The instructions are written, and the installation works (for me), this article could do with some editing though.

Emerge gallery

 USE="vhosts" emerge -av gallery

Install gallery using webapp-config

 webapp-config -I -s <http_server> -h <installation_host> -d <installation_dir> --user=<owner> <what_to_install>

A short explanation of webapps parameters

So, as root execute the command as you choose.

I installed it on the host "localhost" and the dir "gallery-tempelate" as I intend to let a variety of users use their own galleries.

After running this you'll be alerted that you need to create the databases (I preffer to call it databanks, as they called it in the 70-80ies ;))

As stated in the configuration part, we'll be using postgreSQL and assuming you have it all setup.

First, we need a gallery2 database

  createdb -U your_user -W -E UNICODE gallery2

Now surf to

  echo <your_string> > /var/www/localhost/htdocs/gallery-tempelate/login.txt
  chown jav:apache /var/www/localhost/htdocs/gallery-tempelate/modules/ffmpeg/classes/FfmpegToolkit.class
  chmod 660 /var/www/localhost/htdocs/gallery-tempelate/modules/ffmpeg/classes/FfmpegToolkit.class

Make sure you make the directory writable for your webserver, or that you touch the specified files and make them writable to the webserver.

  createdb -U your_user -W -E UNICODE gallery2_prefix

See also

Retrieved from ""

Last modified: Tue, 19 Aug 2008 10:36:00 +0000 Hits: 2,505