Project-Id-Version: Trac 0.12
Report-Msgid-Bugs-To: trac-dev@googlegroups.com
POT-Creation-Date: 2008-01-30 09:20+0100
PO-Revision-Date: 2010-07-19 23:05+0200
Last-Translator: Jeroen Ruigrok van der Werven <asmodai@in-nomine.org>
Language-Team: en_US <trac-dev@googlegroups.com>
Plural-Forms: nplurals=2; plural=(n != 1)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Generated-By: Babel 0.9.6

Warning: Can't synchronize with repository "(default)" (Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? ). Look in the Trac log for more information.

Version 8 (modified by sebastian, 10 years ago) (diff)

Improve struction and splitting getting phtagr

This page describes the steps required to install phTagr on a LAMP system. After installing the required software phTagr must be initialized which is described in SetupProcedure. Please check also the SoftwareRequirements.

This is a short (and maybe incomplete) installation procedure (on Ubuntu 8.04). You can install phTagr in a system wide environment (server version) or in your home directory (~/public_html). Both variants are described below.

Preparation

Install required server software

phTagr runs on a LAMP. So if you do not have apache2 the following procedure will install it. It installs also the other required software like ffmpeg and exiftool (SoftwareRequirements)

$ sudo apt-get install apache2 libapache2-mod-php5 php5-mysql php5-gd mysql-server mysql-client
$ sudo apt-get install ffmpeg flvtool2 imagemagick libimage-exiftool-perl php-pear
$ sudo pear update-channels
$ sudo pear install HTTP_WebDAV_Server-1.0.0RC4 Crypt_Blowfish

Creating the database

Next we have to create a database which phTagr needs to store information:

$ sudo mysql -u root
mysql> CREATE DATABASE phtagr;
mysql> GRANT ALL ON phtagr.* TO 'phtagr'@'localhost' IDENTIFIED BY 'secretpassword';
mysql> quit

Get phTagr

This section fetches the cakePHP framework and phtagr (as cakePHP application) to your home directory.

At the end your ~/cake folder structure should look like:

/cake       <-- Becomes later /var/www/cake or ~/.public_html/cake
    /cake   <-- CakePHP framework
    /app    <-- CakePHP's default application name. The latest tarball has phtagr here.
    /phtagr <-- Alternative application's name, e.g. SVN version. Requires modifications in .htaccess
    /docs
    /vendors
    /index.php
    /.htaccess

Please see http://book.cakephp.org/view/329/Getting-Cake and http://book.cakephp.org/view/19/CakePHP-Folder-Structure for the general folder structure in cakePHP.

Get Archive of Latest Version

Download the latest version of phTagr at http://demo.phtagr.org/download/phtagr-latest.tar.gz and extract it.

$ cd 
$ wget http://demo.phtagr.org/download/phtagr-latest.tar.gz
$ tar xzvf phtagr-latest.tar.gz
$ mv phtagr-rXXX cake

Where XXX is the current SVN version.

Get SVN version

If you want to stay at the edge you better fetch phTagr from the SVN repository. Be aware that phTagr is not in the cakePHP's default app directory and you need some adjustments for the right redirection.

$ cd 
$ sudo svn co https://svn.cakephp.org/repo/branches/1.2.x.x cake
$ cd cake
$ svn co https://svn.phtagr.org/phtagr/trunk phtagr

Installation

phTagr at system wide environment

Assumption
Your site configuration points to /var/www/cake/phtagr/webroot, mod_rewrite is enabled and you are not using suPHP.
$ cd 
$ cd /var/www
$ sudo cp ~/cake .
$ cd cake/app     <-- tar ball
$ cd cake/phtagr  <-- SVN version
$ sudo chown -R www-data users tmp

Adjust .htaccess

If you run phtagr via SVN please edit /var/www/cake/.htaccess and change app/webroot/ to phtagr/webroot/:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^$   phtagr/webroot/   [L]
    RewriteRule (.*) phtagr/webroot/$1 [L]
</IfModule>

Now open http://localhost/cake/phtagr/setup in your browser and follow the SetupProcedure.

phTagr in user directory

Assumptions
Your public htdoc directory is in ~/public_html, mod_rewrite is enabled in your home directory and you are using suPHP.

Copy cakePHP with phtagr

$ cd ~/public_html
$ cp ~/cake .
$ cd cake/app     <-- tar ball
$ cd cake/phtagr  <-- SVN version
$ sudo chmod -R 777 tmp users

Adjust .htaccess

If you run SVN version please modify several .htaccess files to run the redirection properly.

Modify ~/public_html/cake/.htaccess to

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /~YOURNAME/cake
    RewriteRule ^$   phtagr/webroot/   [L]
    RewriteRule (.*) phtagr/webroot/$1 [L]
</IfModule>

Modify ~/public_html/cake/phtagr/.htaccess to

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /~YOURNAME/cake/phtagr
    RewriteRule ^$   webroot/   [L]
    RewriteRule (.*) webroot/$1 [L]
</IfModule>

Modify ~/public_html/cake/phtagr/webroot/.htaccess to

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /~YOURNAME/cake/phtagr/webroot
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>

Other Issues

No suPHP

If you are not using suPHP, the directories (and all subdirecoties of ~/public_html/cake/phtagr/tmp and ~/public_html/cake/phtagr/users) must be writable and should be owned by the apache process. Usually user www-data in Debian/Ubuntu?.

$ sudo chown -R www-data ~/public_html/cake/phtagr/tmp ~/public_html/cake/phtagr/tmp 

If you cannot modify the permissions of tmp and users directory in phTagr make it at least readable for the world:

cd ~/public_html/cake/phtagr
find tmp -type d -exec chmod 777 "{}" \;
find tmp -type f -exec chmod 666 "{}" \;
find users -type d -exec chmod 777 "{}" \;
find users -type f -exec chmod 666 "{}" \;

Now run http://localhost/~YOURNAME/cake/phtagr/setup for the SetupProcedure

No mod_rewrite or redirection

If you don't have mod_rewrite or ansy other redirection mechanim, please see http://book.cakephp.org/view/333/A-Note-on-mod_rewrite