Other Software

ID #182

How do I install Gallery?

Applies to: Grid System

You can download Gallery from Sourceforge

It may be easiest just to get a shell prompt on our system, cd into the place where you want to have your gallery directory like so:

cd /htdocs/www

and then download the package with the wget command by typing wget at a shell prompt followed by the download URL all on 1 line and then hitting the Enter key. That will download the package directly to our server.

To unpack it, type:

tar -xvzf gallery-1.3.1.tar.gz

and that will create the gallery directory within your current directory. If you want to move this directory somewhere else, do it now.

Otherwise, cd into the gallery directory

cd gallery

and begin following the Gallery instructions in the README file


The first step is to run a shell script, which you do like this:

sh configure.sh

Running that script allows you to now go to Gallery's web configurator on your website. But first, you must do the following, which is not in the Gallery instructions:

1. Edit gallery/setup/.htaccess and delete the line that reads:

Options FollowSymLinks

We already allow an Option for following symlinks, as well as other Options that are necessary for your website to work. This directive resets Options to just following symlinks and disables all the other ones that you need. Therefore this directive is uncessecary and should be deleted. For more information, see this other FAQ and its Annotations.

2. Edit gallery/.htaccess and gallery/setup/.htaccess and make sure that all php_value and php_flag directives are either commented out or enclosed in "IfModule" containers as described here so that they do not cause "Internal Server Errors".

3. Now you need to set PHP's auto_prepend_file and magic_quotes configs, since the .htaccess directives that attempt to do that are ineffective as described here.

Do this by copying your php.ini file to the gallery directory and turning off magic quotes by finding the magic quotes directive and setting:

magic_quotes_gpc = Off

Save this php.ini and then also copy it into the setup directory like so:

cp /htdocs/www/gallery/php.ini /htdocs/www/gallery/setup/

Now edit the php.ini file in the setup directory:

cd /htdocs/www/gallery/setup/

Edit the php.ini file in the setup directory and set the auto_prepend_file directive to:

auto_prepend_file = "php_value_ok.php"

4. Now resume with the Gallery README file instructions and go to http://www.yoursite.com/gallery/setup/ and you will see a page called "Step 1" with many subsetions that all say "Success" in green letters. Scroll down and click the "Configure Gallery" button to go to Step 2.

On the Step 2 page, you must enter a new admin password. Enter "/tmp" (without the quotes) for the entry asking for a "Temporary directory".

Change the "Album Directory" setting to make the albums directory a subdirectory of the gallery directory. For example, if the default is "/htdocs/www/albums", change it to "/htdocs/www/gallery/albums". The reason for that is so the gallery style sheets can be found correctly.

Then Change the "Albums URL" to correspond to the Album Directory path by putting the albums directory under the gallery directory, for example: change default of "http://www.yoursite.com/albums" to "http://www.yoursite.com/gallery/albums".

All the other default entries are fine. Before you leave this page, go to your shell prompt and make sure the directory listed as "Album Directory" exists. If it does not, then create it like:

mkdir /htdocs/www/gallery/albums

Now scroll down and click the "Album Defaults" button to proceed to Step 3.

Choose any options you want on Step 3 and then scroll down and click the "Save Settings" button to proceed to Step 4.

Scroll down to the bottom of Step 4. If there were no errors, then you can click "Save Config". Otherwise click "Edit Config" and fix the errors.

After you save the config, return to your shell prompt, change into the gallery directory

cd /htdocs/www/gallery

and run the secure script as described in the Gallery README file:

sh secure.sh

5. Click the URL on the final page of the web configurator to enter your Gallery.

Installation complete.

Last update: 2010-10-03 13:15
Author: FAQ Admin
Revision: 1.2

Digg it! Share on Facebook Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 0 (0 Votes)

completely useless 1 2 3 4 5 most valuable

You can comment this FAQ

Comment of Anonymous:
If you have an install problem related to finding ImageMagick, try supplying the full path to ImageMagick executables as described here:

Added at: 2004-01-02 18:32