Gallery

From YobiWiki
Revision as of 19:50, 9 December 2007 by <bdi>PhilippeTeuwen</bdi> (talk | contribs) (restitution de la dernière modification de PhilippeTeuwen)
Jump to navigation Jump to search

Install

On sql vserver

mysqladmin -uroot -p create gallery2
mysql gallery2 -uroot -p -e"GRANT ALL ON gallery2.* TO admin_gallery2@public.teuwen.org IDENTIFIED BY 'gal_long_pwd'"

On public vserver

apt-get install gallery2
   sql host: sql.teuwen.org
   admin user to create dbs: admin_gallery2 / gal_long_pwd

/etc/gallery2/apache.conf: uncomment first line alias /gallery2 OR create vhosts as suggested in the last lines but don't do both at the same time.

If you use virtual hosts

mv /etc/apache2/conf.d/gallery2 /etc/apache2/sites-available/
ln -s /etc/apache2/sites-available/gallery2 /etc/apache2/sites-enabled

Otherwise this gallery virtualhost will be the one by default

apt-get install locales

activate locales you want for gallery, in their ISO form, not UTF8

apt-get install dcraw jhead zip unzip libjpeg-progs php4-gd ffmpeg imagemagick
/etc/init.d/apache2 reload

Be sure both hosts know each other via e.g. /etc/hosts


create /usr/share/gallery2/.htaccess with

php_value memory_limit 64M

Prepare directory for the albums

mkdir /home/gallery2
chown www-data:www-data /home/gallery2

Go to public.teuwen.org/gallery2
Choose Mysql with transactions and give the credentials

Gallery migration

Once you have migrated your Gallery1 to Gallery2 with the migration module

Enable URL Redirection under Apache webserver:

Ensure the mod_rewrite Apache module is enabled:
a2enmod rewrite
/etc/init.d/apache2 force-reload
  • Enable the module URL Rewrite in Gallery2
  • URL Rewrite administration -> Rules -> Migration -> activate
  • If you have troubles with url rewrite, especially if you touched the directory structure or established vhosts, deinstall completely the URL Rewrite module and reinstall it.

PG Theme

Jpegtran

Gallery1 used to use jpegtran to rotate automatically imported images in a lossless fashion.
Gallery2 doesn't :-(

You can install the module jpegtran for Gallery2

  • Uncompress it in /usr/share/gallery2/modules
  • Install it and activate it under the administration view of Gallery2
  • Install jpegtran (libjpeg-progs under Debian)
  • Test it under the administration view of Gallery2, there is a new jpegtran shortcut in the graph tools menu

Now this module does not automates anything when importing images but at least when you rotate manually a picture, it'll use jpegtran instead of the fat slow lossy ImageMagick rotation.

For rotations when importing, I do it with gthumb:

  • select all images (including those already with the correct orientation, don't bother selectiong only those to be rotated ;-) )
  • Tools -> Rotate Images -> + Adjust photo orientation + Apply to all images -> Apply