How To Set Up A Gallery2 Multisite On An ISPConfig Server
How To Set Up A Gallery2 Multisite On An ISPConfig Server
Version 1.0 Introduction:Gallery2 is a web based software product that lets you manage your photos on your own website. With this guide, I show you how to setup a MULTISITE for Gallery2. Definition:multisite - A multisite installation is a lightweight G2 installation which depends on the single codebase. A multisite has only 6(7) files (main.php, index.php, embed.php, upgrade/index.php, lib/support/index.php + config.php (, .htaccess)). A G2 multisite setup has a single codebase installation and an unlimited number of multisites. AdvantagesThe primary advantage of multisites over normal G2 installations is saving the disk space that is required for each gallery2 folder (50-100 MB depending on the cluster size of the HDD partition). Only a single real gallery2 folder is required (codebase), multisites only use a few kilobytes per installation (plus the photos that they contain). You only have to upgrade a single codebase. Once the codebase is replaced with a new G2 version, just visit the multisites and each multisite will automatically start it's upgrade process. Each multisite has to be upgraded independently, but you have to replace the underlying codebase only once. The multisite installations don't share users, album/photos, or anything else from the user's point of view. Multisites are completely separate and share only the same codebase. In this how to, I will use just as an example: - Gallery2 version 2.1.2 I assume that you've setup the Gallery2 codebase already, according my Howto: With this Howto, I create a new website web100/web/ with a gallery directory in it. Create a website for the Gallery2 multisite:In ISPConfig, create a website via “New site” in the main menu. On the tab called “Basis” use gallery for the hostname and hostingcompany.tld for the domain name. Enable MySQL and PHP scripts for this website but disable PHP Safe Mode. Create a Administator user for the website:In ISPConfig, create an Administrator user, so you can upload/download the website later via FTP: In the main menu select “ISP Manager”, select your new website called www.mywebsite.tld in the structure tree and press the tab “User and Email”. Press “new” and define a new user and its email address. Give this user administrator rights and press “Save”. Create a MySQL database for the website:Click on the tab called “Options” and create a new database for the website. ISPConfig will show you: Database name: web100_db1 Then you define a password for the database user and press “Save”. Note: Do not proceed if you did not setup the Gallery2 codebase! The Gallery 2 installer program (multisite):Now it’s time to setup gallery2 for one of our websites, which make use of the Gallery2 codebase. First, create a folder within web100/web/ for the gallery. This must be writeable by the web server again: Logon into your server as root and give the following commands: cd /var/www/web100/web mkdir gallery chown -R www-data:www-data gallery In your browser point to http://gallery.myhostingcompany.tld/install where you find the Gallery2 installer program. Within the installer program make the steps 1, 2 & 3. At step 4 within the Gallery installer, you choose “Multisite installation” instead of “Standard Installation”. Define path /var/www/web100/web/gallery/ as the path for the new multisite and press “Select directory”: If your multisite directory setup is successful, it will be confirmed: Press “Continue to Step 4>>”. Before we press “Save” at step 4 within the Gallery Installer, first we have to create a directory for gallery to store photos. This must be writeable by the web server: So, enter the next commands in your /var/www/web100/web/gallery/ directory: mkdir g2data chown -R www-data:www-data g2data Now, in your browser again, you can press “Save” to complete step 4. If you've setup the storage directory successfully, it will be confirmed. Press “Continue to step 5 >>” to set up your database. Step 5 within the Gallery2 installer guides you to set up your database for the multisite correctly. To setup your database, please enter: - MySQL databasename, which is web100_db1 After entering the required information, press “Save”. If you’ve successfully setup the Gallery2 database, it will be confirmed. Press “Continue to step 6>>”. Define the Administrator for your Gallery2 website. If you've setup the administrator correctly, press “Continue to step 7>>”. Step 7 within the Gallery2 installer guides you to create a config file. We've done this already during the code-base setup, so simply press “Continue to step 8>>”. Step 8 within the Gallery2 installer guides you to setup the codebase. We've done this already during the code-base setup, so simply press “Continue to step 9>>”. On the next screen, you can select what you want to have installed: Click on “Activate Selected Modules” to proceed and to activate the selected items. A security check is shown. On the server give the following commands for security reasons: chmod 755 /var/www/web100/web chmod 644 /var/www/web1/web/config.php After chmod the mentiones files, in your browser press “Check Again”. Now everything will look save. Click on “Continue to step 11”. Now you are finished. In your browser, you can point to URL http://mywebsite.tld/gallery/. Use your Gallery2 administrator account to upload your photos. More information about Gallery2: http://gallery.menalto.com/
|




![Creative Commons Attribution-NonCommercial-ShareAlike 2.0 License [Creative Commons Attribution-NonCommercial-ShareAlike 2.0 License]](http://creativecommons.org/images/public/somerights20.gif)




Recent comments
13 hours 12 min ago
19 hours 59 min ago
23 hours 7 min ago
2 days 1 hour ago
2 days 6 hours ago
4 days 3 hours ago
5 days 23 hours ago
1 week 2 hours ago
1 week 13 hours ago
1 week 1 day ago