Zenphoto notes

From Noah.org
Jump to: navigation, search


Download and install

wget http://www.zenphoto.org/files/latest.tar.gz
tar xzf latest.tar.gz
if [ -d /var/www/zenphoto2/ ]; then echo "Previous Zenphoto is installed"; exit 1; fi
mv zenphoto /var/www/.
echo "Set ownership for zenphoto web directory."
echo "You may want to add yourself to the www-data group."
chown -R www-data:www-data /var/www/zenphoto

Edit php.ini to support Zenphoto

Some of these values are optional or you may want different values. Edit the file /etc/php5/apache2/php.ini

[PHP]
short_open_tag = Off
max_execution_time = 120 
memory_limit = 128M
upload_max_filesize = 100M
post_max_size = 100M
magic_quotes_gpc = Off
[mbstring]
mbstring.internal_encoding = UTF-8

MySQL database setup

Zenphoto does most of the schema work, but you must still create a user and a blank database.

mysql -u root -p

mysql> create database zenphoto;
Query OK, 1 row affected (0.03 sec)

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> GRANT ALL ON zenphoto.* to zpadmin@localhost IDENTIFIED BY 'PASSWORD';
Query OK, 0 rows affected (0.13 sec)

Configure Zenphoto

Edit the file, /var/www/zenphoto/zp-core/zp-config.php

$conf['mysql_user'] = 'zpadmin';
$conf['mysql_pass'] = 'PASSWORD';
$conf['mysql_host'] = 'localhost'; // Won't need to change this 90% of the time.
$conf['mysql_database'] = 'zenphoto';