<note important>On Debian Lenny you need Debian backports to install gallery2.</note>
Find out if all the locale you need are available
Select missing locales if necessary:
dpkg-reconfigure --priority=low locales
Install the package and answer the questions of the Debian configuration wizard:
aptitude install gallery2 imagemagick php5 php5-curl
Gallery2 needs to be able to write to the
.htaccess file to activate
mod_rewrite for shorter URLs:
touch /usr/share/gallery2/.htaccess chmod 666 /usr/share/gallery2/.htaccess
Nothing special here. Move on.
When you run the web interface of Gallery the first time you must authenticate yourself as the server owner. Gallery displays a generated random number which you have to put into the file
Once you have done this you can proceed with the web-based configuration wizard.
On Debian Lenny the wizard warns you about missing, outdated or modified files in step 3. You can safely ignore this for now.
For your private gallery a single site installation will do.
In the next step you configure the data diretory. The Linux file system hierarchy standard says you should install this under
/var/…. I prefer
/data as root directory for my most valuable data. This way backup is easier.
mkdir /data/gallery2 chmod 755 /data/gallery2 chown www-data:www-data /data/gallery2
Don't be tempted to use the database root user. Use a dedicated database user with restricted rights instead.
In this step Gallery2 creates the configuration file from your choices. Nothing to do here for you.
As in the last step everything should run automatically. Proceed.
The way I see it, it is more important here to get rid of plug-ins that you don't need.
You probably won't need:
Now you can proceed and activate your selection of plug-ins. You will be notified about modules that must be configured before you can use them.
Gallery2 checks whether your configuration looks safe.
In the file
/etc/gallery2/config.php switch debugging on:
On the console type:
Don't forget to switch debug mode of later.
Before you start hunting for problems in the configuration and installation of Gallery check if the database server actually runs.
In your web servers error log you might find hints like this that tip you of that Gallery can't communicate with the database server:
[Sat May 21 17:10:38 2011] [error] [client 126.96.36.199] PHP Warning: mysqli_real_connect() [<a href='function.mysqli-real-connect'>function.mysqli-real-connect</a>]: (HY000/2002): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /usr/share/php/adodb/drivers/adodb-mysqli.inc.php on line 110