Gallery2 is a widely used application, allowing you to create and administer image galleries on your website.
It's wise to have a database dedicated to your gallery. Let's go crazy, and call it “gallery”.
If you don't (yet) know how to go about this, please read this tutorial.
You have a choice here. For “neatness'” sake, such applications are generally placed in a folder within the www sub-domain (www.example.com/gallery) or in a specific sub-domain of its own (gallery.example.com).
Easy! Just make sure the you create a specific folder for the store (as in www.example.com/gallery)
Two things to do:
This is the option we will be using in the rest of the tutorial.
To begin with, we need to download it. At the time of writing, the latest version was 2.2.4.
Nothing beats the official site to get the intial compressed file. I therefore recommend this link.
Now that you've downloaded the file onto your favorite hard drive, decompress it. You now have a folder (let's rename it gallery) containing all of the Gallery2 files.
Launch your favorite FTP client (we recommend FileZilla) and log in as admin onto your server. Then, open the folder corresponding to the VirtualHost you had initially defined.
In our example, the path of the FTP would therefore be:
/srv/d_my-gandai-ai/www/gallery.example.com/htdocs
…that is, unless you've changed the initial configuration of the web files. If that's the case, however, I'm assuming you knew what you were doing. :)
At this stage, we can upload the Gallery2 files onto your server.
For Gallery2 to configure properly, certain folders and files will need specific rights. In most cases, to change these rights with your FTP client, all you need to do is right-click on the file concerned and chose the right term in the menu (could be Rights, CHMOD, Properties…). Supposing you were using FileZilla, this is how the client would operate:
Right-click the concerned file and select “File Attributes…”. The window that has just opened gives you two different methods to change the file rights: boxes to tick and numeric values.
The point of the tutorial not being to teach the numeric values of rights in UNIX, let's just say you can simply replace the numeric value of the 'gallery' folder by 777.
Launch your web browser and open your Gallery2's folder on your website.
You should be greeted by the Gallery2 welcome page. Choose your language and click Begin installation.
Follow Gallery2's security measure, download the login.txt and upload it into Gallery2's directory. Once you have, click Authenticate me.
If Gallery2 has been uploaded properly, you should be able to click Continue to Step 3.
Pick a standard setup, unless you need a multi-site setup.
Choose the folder in which you're pictures will be stored. As the setup interface says, it is advised, for security reasons, to pick a oflder outisde of the gallery folder itself, as well as add a random chain of characters after the folder name. We therefore do not have any advice to give you on how to name your image folder. :) However, you do need to make sure that the folder within which you place your image folder has sufficient rights, so that Gallery2 can create its path for you.
Fill-in the fields as follows:
Database type: MySQL (v3.23.34a and newer)
DB Hostname: localhost
DB Username: this is the user name you needed to have created along with a database name, as explained at the very beginning of this tutorial.
DB Password: the password associated to the above user name.
DB Name: the database name.
Table Prefix: g2_
Column Prefix: g_
Define a username, password, e-mail address, etc. for the gallery administrator's account.
This step should confirm a config file has been created successfully.
This step should confirm the Gallery Core has been successfully installed.
Choose the plugins you wish to install with Gallery2. By default, you can leave them all ticked. You can also choose to skip this step and add no plugin at all.
Once installed, Gallery2 will tell you which modules will need specific configuration once the basic setup is complete.
In order to finish the setup, Gallery2 will need you to modify the rights on its folder, in order to remove the writing permissions you had activated at the beginning of the tutorial.
Use the same method as the first time, except that you should change the Gallery2 folder's numeric value from 777 to 755.
Congratulations! The installation is finished, you can start uploading photos!
For further info on how to configure Gallery2, please consult the official support page.