Gallery2:Installation on Debian - Gallery Codex
Personal tools

Gallery2:Installation on Debian

From Gallery Codex

Debian Distributions

Gallery 2 is currently available in Debian OldStable backports (aka Lenny backports) and Unstable (aka Sid) in the package gallery2

Prerequisites

Gallery 2 requires either the Postgres or MySQL database server. The Debian package only requires the database client, so if you don't have the database server you'll have to install it yourself. Make sure that you have testing or unstable in your /etc/apt/sources.list and first run:

 apt-get update

So that you get the latest list of packages.

Localization

If you intend to use Gallery in a language other than english, make sure the correct locales are installed on your system.

To see what locales are known by the system, type:

locale -a

If your target language is not listed, you should regenerate it:

dpkg-reconfigure --priority=low locales

And choose the appropriate locales. Make sure to get the "root" locale if you pick a variant (ex: if you use fr_CA, pick also fr_FR) otherwise Gallery won't find your localization.

MySQL

To install the MySQL server simply run:

 apt-get install mysql-server

PostgreSQL

To install the PostgreSQL server, run:

 apt-get install postgresql-server

Since the Gallery 2 package does not require the psql client, you'll also have to install it to be able to do the following steps:

 apt-get install postgresql-client

Creating a Database

For Gallery 2 to work properly, you need to create a new database for your gallery. With MySQL, just type:

$ mysqladmin -u username -p create gallery2

$ mysql gallery2 -u username -p -e "GRANT ALL ON gallery2.* TO 'username'@'localhost' IDENTIFIED BY 'password'"

Or, if you use PostgreSQL:

$ createdb gallery2 -E UNICODE

If it complains that UNICODE is not a valid encoding name, then try:

$ createdb gallery2 -E SQL_ASCII

If it complains about that, too then try:

$ createdb gallery2

In username, use your own username (e.j mygallery). In password, type your own password. Remember both username and password, because in the galley2 installation you will be asked for that.

Gallery 2

To install Gallery 2, run:

 apt-get install gallery2

This will download and install Gallery 2. It will ask you for MySQL database information. You must enter this, even if you're planning on using PostgreSQL. In a later version of the package we will provide better support for PostgreSQL during the Debian package installation.

Once Gallery 2 is installed, browse to:

 http://www.example.com/gallery2

And run through the regular installer.

To see where Gallery 2 files are installed, you can run:

 dpkg -L gallery2

This will provide you with a complete list of all installed files.

advertisements