This week I decided it was high time I upgraded from gallery2 to gallery3.
So here are my crib notes. Very rough outline as it assumes you have a webserver and mysql database already up and running but it covers the tricky stuff. The gallery3 install wizard should just work after this.
Create the mysql database
# mysql -u root -p
mysql> create database gallery3;
mysql> create user 'g3user'@'localhost' identified by 'mypass';
mysql> grant all privileges on gallery3.* to g3user@localhost;
Install gallery3
Copy zipfile to /webserverhome/html and unzip
cd gallery3
mkdir var
Configure php
NB: The location of the php.ini file can be found by running a phpinfo test page on your webserver. ie create a file called t.php;
Now load this page - http://mywebserver/t.php - and check the "Loaded Configuration File " setting.
Edit the config file with the following settings.
vi /opt/csw/php5/lib/php.ini
short_open_tag = On
; Maximum allowed size for uploaded files.
upload_max_filesize = 24M
[Date]
; Defines the default timezone used by the date functions
date.timezone = Europe/London
Edit apache config to allow index.php to be a default loadable page
This is required for the setup wizard to work.
vi /etc/opt/csw/apache2/httpd.conf
<IfModule dir_module>
DirectoryIndex index.csw.html index.html index.php
</IfModule>
Restart apache and change the gallery3 file permissions to be world writeable
svcadm restart cswapache2
pfexec chmod -R o+rwX gallery3
Run the setup wizard
Just point your browser at http://mywebserver/gallery3
When complete, fix those file permissions
Finally, change gallery3 ownership to the apache user and lock down file permissions.
Check you can browse and upload pictures. If it doesn't work then you've probably made a bungle with the file perms.
Sunday, March 27, 2011
Subscribe to:
Comments (Atom)
