Gallery3

From SME Server
Revision as of 21:34, 30 August 2011 by Cnoork (talk | contribs) (remove original index.html)
Jump to navigation Jump to search


Edit-find-replace.png Not reviewed:
This howto or contrib has not been reviewed and might contain code that could harm your installation. For more information on the review process have a look at the Development Review page.


Description

Gallery is an open source project with the goal to develop and support leading photo sharing web application solutions.

Tested with:

  • Gallery 3.02
  • SME 8b6

Prerequisites

You need to define the following name/user/password:

  • gallery name for ibay: <gallery_ibay_name>
  • gallery name for mysql database: <gallery_db_name>
  • gallery username for mysql: <gallery_mysql_user>
  • password for <gallery_mysql_user>: <password>

Access rights to a shell with root

Image plugins

Install ImageMagic

yum install ImageMagick

Install ffmpeg

Add the ATrpms repository to the yum configuration

/sbin/e-smith/db yum_repositories set atrpms repository \
Name 'atrpms stable - EL5' \
BaseURL 'http://dl.atrpms.net/el5-$basearch/atrpms/stable' \
EnableGroups no \
GPGCheck yes \
GPGKey http://ATrpms.net/RPM-GPG-KEY.atrpms \
Visible no \
Exclude clamav,spamassassin,libselinux,perl-HTML-Parser,lm_sensors,\
perl-IO-stringy,perl-XML-Parser,razor-agents,libgcrypt,rpm-python,\
libxml2,zlib,gnupg,libxml2-python,yum,module-init-tools,rpm,gettext,\
librpm4,glib2,perl-libwww-perl,perl-Convert-ASN1,beecrypt,fetchmail,\
libacl,libtool-ltdl,popt,libgpg-error,freetype,perl-MIME-tools,mutt,\
gd,perl-TimeDate,librpm4.4 \
status disabled


  Note:
At the moment from editing the modules "libtheoraenc1" and "libtheoradec1" where not found in the stable repository and thereby we also need the ATrpms - testing repository.


/sbin/e-smith/db yum_repositories set atrpms-testing repository \
Name 'atrpms testing - EL5' \
BaseURL 'http://dl.atrpms.net/el5-$basearch/atrpms/testing' \
EnableGroups no \
GPGCheck yes \
GPGKey http://ATrpms.net/RPM-GPG-KEY.atrpms \
Visible no \
Exclude clamav,spamassassin,libselinux,perl-HTML-Parser,lm_sensors,\
perl-IO-stringy,perl-XML-Parser,razor-agents,libgcrypt,rpm-python,\
libxml2,zlib,gnupg,libxml2-python,yum,module-init-tools,rpm,gettext,\
librpm4,glib2,perl-libwww-perl,perl-Convert-ASN1,beecrypt,fetchmail,\
libacl,libtool-ltdl,popt,libgpg-error,freetype,perl-MIME-tools,mutt,\
gd,perl-TimeDate,librpm4.4 \
status disabled

Make sure the configuration files on your server are up-to-date.

signal-event yum-modify

Install ffmpeg.

yum --enablerepo=atrpms-testing install libtheoraenc1 libtheoradec1 libogg libogg0
yum --enablerepo=atrpms install ffmpeg

Ibay

Create ibay

Create a ibay for gallery through server-manager and after that issue the following commands on the server's shell:

mkdir /home/e-smith/files/ibays/<gallery_ibay_name>/html/var
chmod 755 /home/e-smith/files/ibays/<gallery_ibay_name>/html/var

Set PHPBaseDir

db accounts setprop <gallery_ibay_name> PHPBaseDir /home/e-smith/files/ibays/<gallery_ibay_name>:/tmp:/usr/bin
signal-event ibay-modify <gallery_ibay_name>

Create mysql database

mysqladmin create <gallery_db_name>
mysql -e "GRANT ALL ON <gallery_db_name>.* TO <gallery_mysql_user>@localhost IDENTIFIED BY '<password>'"

Gallery files

Download the latest version from Gallery

For version 3.0.2

wget http://downloads.sourceforge.net/gallery/gallery-3.0.2.zip
unzip gallery-3.0.2.zip

Copy the files/directories from the gallery3 into the ibay's html directory

cd gallery3
cp -r * /home/e-smith/files/ibays/<gallery_ibay_name>/html/

Remove original SME index.html file in de ibay

rm /home/e-smith/files/ibays/<gallery_ibay_name>/html/index.html

Set all file to user www

chown -R www:www /home/e-smith/files/ibays/<gallery_ibay_name>/html/*

Change memory limits

Below commands will set the required settings for PHP to support running Gallery3.

db configuration setprop php MemoryLimit 128M
db configuration setprop php PostMaxSize 112M
db configuration setprop php UploadMaxFilesize 96M

expand-template /etc/php.ini 
sv t httpd-e-smith

Start gallery

Initial values

Go to <mysite>/<gallery_ibay_name> and fill in all the variables that you have used

Change Graphics settings

Go to "admin" --> "settings" --> "Graphics" and select "ImageMagick"

Uninstall

Delete the content of the ibay (you wll also loose all uploaded content) and delete the ibay through server-manager

mysqladmin drop <gallery_db_name>
mysqladmin drop user <gallery_mysql_user>@localhost

Additional information