Difference between revisions of "Gallery3"

From SME Server
Jump to navigationJump to search
 
(30 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 
{{Languages}}
 
{{Languages}}
 
{{Needs review}}
 
{{Needs review}}
= Gallery 3.x installation on SME 8.x =
+
{{Warning box|Note that as of 20th June 2014 Gallery is no longer being maintained. Follow the link to the developers website at the end of this document for more information or see [http://galleryproject.org/ that link]For an alternative you can check : http://en.wikipedia.org/wiki/Comparison_of_photo_gallery_software. There are also how-tos on [[Piwigo]] and [[Zenphoto]]}}
 
+
== Description ==
== Maintainer ==
+
Gallery is an open source project with the goal to develop and support leading photo sharing web application solutions.
Last updated: 25 March 2011<br>
 
mailto:chris@noork.nl
 
  
 
Tested with:
 
Tested with:
*Gallery 3.01
+
*Gallery 3.02
 
*SME 8b6
 
*SME 8b6
  
== Description ==
+
== Prerequisites ==
Gallery is an open source project with the goal to develop and support leading photo sharing web application solutions.
 
 
 
== Prerequests ==
 
 
You need to define the following name/user/password:
 
You need to define the following name/user/password:
  - gallery name for ibay: <gallery_ibay_name>
+
* gallery name for ibay: <gallery_ibay_name>
  - gallery name for mysql database: <gallery_db_name>
+
* gallery name for mysql database: <gallery_db_name>
  - gallery username for mysql: <gallery_mysql_user>
+
* gallery username for mysql: <gallery_mysql_user>
  - password for <gallery_mysql_user>: <password>
+
* password for <gallery_mysql_user>: <password>
 
Access rights to a shell with root
 
Access rights to a shell with root
  
 +
== Image plugins ==
 +
=== Install ImageMagic ===
 +
yum install ImageMagick
  
 +
=== Install ffmpeg ===
 +
Add the ATrpms repository to the yum configuration
  
== Image plugins ==
+
/sbin/e-smith/db yum_repositories set atrpms repository \
=== Install ImageMagic ===
+
Name 'atrpms stable - EL5' \
  # yum install ImageMagick
+
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 box|msg=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 ===
+
Install ffmpeg.
All resources are found through http://pkgs.org
 
  
  # yum install SDL
+
  yum --enablerepo=atrpms-testing install libtheoraenc1 libtheoradec1 libogg libogg0
# mkdir ffpeg
+
  yum --enablerepo=atrpms install ffmpeg
# cd ffmpeg
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/ffmpeg-0.6.1-38_git20110115.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libavcodec52-0.6.1-38_git20110115.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libavcore0-0.6.1-38_git20110115.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libavdevice52-0.6.1-38_git20110115.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libavfilter1-0.6.1-38_git20110115.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libavformat52-0.6.1-38_git20110115.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libavutil50-0.6.1-38_git20110115.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libdc1394_22-2.0.2-11.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libfaac0-1.28-6.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libgsm1-1.0.13-2.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libmp3lame0-3.98.4-22.el5.i386.rpm
 
# wget http://dl.atrpms.net/el4-i386/atrpms/stable/libogg0-1.2.0-10.el4.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libopencore-amrnb0-0.1.2-2.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libopencore-amrwb0-0.1.2-2.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libpostproc51-0.6.1-38_git20110115.el5.i386.rpm
 
# wget http://mirror.centos.org/centos/5/os/i386/CentOS/libraw1394-1.3.0-1.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libswscale0-0.6.1-38_git20110115.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/testing/libtheoradec1-1.1.1-13.el5.i386.rpm
 
  # wget http://dl.atrpms.net/el5-i386/atrpms/testing/libtheoraenc1-1.1.1-13.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libva-0.31.1.1_1-0.31.1-2_sds5.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libvorbis0-1.2.3-6.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libvorbisenc2-1.2.3-6.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libx264_112-0.112-14_20110114.2245.el5.i386.rpm
 
# wget http://dl.atrpms.net/el5-i386/atrpms/stable/libxvidcore4-1.2.2-13.el5.i386.rpm
 
# yum localinstall *
 
  
== ibay ==
+
== Ibay ==
 
=== Create ibay ===
 
=== Create ibay ===
Create a ibay for gallery
+
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
+
  mkdir /home/e-smith/files/ibays/<gallery_ibay_name>/html/var
  # chmod 755 /home/e-smith/files/ibays/<gallery_ibay_name>/html/var
+
  chmod 755 /home/e-smith/files/ibays/<gallery_ibay_name>/html/var
  
=== set PHPBaseDir ===
+
=== Set PHPBaseDir ===
  # db accounts setprop <gallery_ibay_name> PHPBaseDir /home/e-smith/files/ibays/<gallery_ibay_name>:/tmp:/usr/bin
+
  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>
+
  signal-event ibay-modify <gallery_ibay_name>
  
=== create mysql database ===
+
=== Create mysql database ===
  # mysqladmin -uroot create <gallery_db_name>
+
  mysqladmin create <gallery_db_name>
  # mysql <gallery_db_name> -uroot -e"GRANT ALL ON <gallery_db_name>.* TO <gallery_mysql_user>@localhost IDENTIFIED BY '<password>'"
+
  mysql -e "GRANT ALL ON <gallery_db_name>.* TO <gallery_mysql_user>@localhost IDENTIFIED BY '<password>'"
  
=== gallery files ===
+
=== Gallery files ===
Download the latest version from http://gallery.menalto.com/
+
Download the latest version from [http://gallery.menalto.com/ 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
 
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
 
Set all file to user www
  # chmod -R www:www /home/e-smith/files/ibays/gallery/html/*
+
  chown -R www:www /home/e-smith/files/ibays/<gallery_ibay_name>/html/*
  
 
=== Change memory limits ===
 
=== Change memory limits ===
If needed you can modify the upload limit, first command is to find the current size second is to change
+
Below commands will set the required settings for PHP to support running Gallery3.
  
  # grep memory_limit /etc/php.ini
+
  db configuration setprop php MemoryLimit 128M
  memory_limit = 32M
+
  db configuration setprop php PostMaxSize 112M
  # db configuration setprop php MemoryLimit 128M
+
  db configuration setprop php UploadMaxFilesize 96M
 
   
 
   
  # grep post_max_size /etc/php.ini
+
  expand-template /etc/php.ini  
post_max_size = 20M
+
  sv t httpd-e-smith
# db configuration setprop php PostMaxSize 112M
+
 
+
I also needed to do a
# grep upload_max_filesize /etc/php.ini
+
yum install pcre
upload_max_filesize = 10M
+
to get the next step to work /browsem
# db configuration setprop php UploadMaxFilesize 96M
 
 
# expand-template /etc/php.ini  
 
  # /etc/rc7.d/S86httpd-e-smith restart
 
  
 
== Start gallery ==
 
== Start gallery ==
  
 
=== Initial values ===
 
=== Initial values ===
Go to http://\<mysite\>/\<gallery_ibay_name\> and fill in all the variables that you have used
+
Go to <mysite>/<gallery_ibay_name> and fill in all the variables that you have used
 
 
=== Change .... ===
 
Select ImageMagick
 
  
=== Upload foto and film ===
+
=== Change Graphics settings ===
Success with it
+
Go to "admin" --> "settings" --> "Graphics" and select "ImageMagick"
  
 
== Uninstall ==
 
== Uninstall ==
Delete the content of the ibay (you wll also loos all uploaded content) and delete the ibay through server-manager
+
Delete the content of the ibay (you wll also loose all uploaded content) and delete the ibay through server-manager
  # mysqladmin -uroot drop <gallery_db_name>
+
  mysqladmin drop <gallery_db_name>
  # mysqladmin -uroot drop user <gallery_mysql_user>@localhost
+
  mysqladmin drop user <gallery_mysql_user>@localhost
  
 
== Additional information ==
 
== Additional information ==
*[http://gallery.menalto.com Website]
+
*[http://gallery.menalto.com Website Gallery]
*[http://codex.gallery2.org/Gallery3]
+
*[http://codex.gallery2.org/Gallery3 Gallery documentation]
 
----
 
----
[[Category: Contrib]]
+
[[Category: Howto]]
 
[[Category: Webapps]]
 
[[Category: Webapps]]

Latest revision as of 16:29, 1 November 2016


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.


Warning.png Warning:
Note that as of 20th June 2014 Gallery is no longer being maintained. Follow the link to the developers website at the end of this document for more information or see that linkFor an alternative you can check : http://en.wikipedia.org/wiki/Comparison_of_photo_gallery_software. There are also how-tos on Piwigo and Zenphoto


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


Important.png 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

I also needed to do a yum install pcre to get the next step to work /browsem

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