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.
Last modified 3 years ago Last modified on 03/09/14 17:17:10

This installation procedure describes the server version with a system wide installation on a LAMP system. After installing the required software phTagr must be initialized which is described in SetupProcedure. Please read the SoftwareRequirements before installing!

The given installation examples are based in on Ubuntu 10.04 but works similar on other system, too.

You are not an Web admin and want to install phTagr anyway? See Alternative Installation

You're running a phTagr and want to upgrade phTagr? See also:

Prepare LAMP

Most likey you have already installed your LAMP with apache, mySQL and PHP. But if not, here are the required commands to install your first LAMP!

Install LAMP

$ sudo apt-get install apache2 libapache2-mod-php5 php5-mysql php5-gd php5-cli php5-mcrypt mysql-server mysql-client

Enable Apache2's rewrite module:

$ sudo a2enmod rewrite

To allow overwrites by .htaccess files edit /etc/apache2/sites-enabled/000-default and change section of <Directory /var/www/>: Change AllowOverride None to AllowOverride All. The section should look like:

    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>

Adjust some PHP limitations for the upload and edit /etc/php5/apache2/php.ini. Change the values of upload_max_filesize and post_max_size to 128M. See UploadLimits for further information.

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 128M
...
; Maximum size of POST data that PHP will accept.
; http://php.net/post-max-size
post_max_size = 128M

Now reload the configuration of Apache2.

$ sudo /etc/init.d/apache2 reload

(Optional:) Install external Programms

phTagr runs fine on a simple LAMP. However it can do more with some external helper programs:

  • Exiftool is used to write back the MetaData to the image files like tags, categories, locations, date and geolocations. So all tags are saved within your photos an can be used by other programs! Without exiftool, only import (read) of MetaData is supported.
  • FFmpeg is used to convert video files (AVI, MPEG, MOV) to flash videos. It is also used to create video thumbnails. Without ffmpeg phTagr can handle only flash movies. See also CreateFlashVideo
  • ImageMagick is used alternativly to the GD library to create image previews.
  • flvtool2 is used for creating better flash movies with cuepoint. This tool is really optional

You can install these programs with following command:

$ sudo apt-get install ffmpeg flvtool2 imagemagick libimage-exiftool-perl

Creating the database

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

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

Download and prepare phTagr

Download the latest version as ZIP archive from SourceForge (which is around 3.2 MB). This includes the cakePHP MVC framework and phTagr Gallery.

cd /var/www
sudo wget http://sourceforge.net/projects/phtagr/files/latest -O phTagr.tar.gz
sudo tar xzf phTagr.tar.gz

Now your folder structure looks like this:

/phtagr       
    /cakephp     <-- CakePHP framework
    /config      <-- Basic configuration path
        /core.php      <-- Basic core configuration file
        /database.php  <-- Database configuration file (can be created automatically)
    ...
    /users       <-- Directory of your user's files, photos, videos, cached previews, ...
    /tmp         <-- Directory for log files, cache files, ...
    /webroot     <-- Directory of public files like javascript, css, images
    ...
    /.htaccess

Now we need to make some folders accessible for the web server

$ cd phtagr
$ sudo chown -R www-data config users tmp

(Or you can also use -with appropriate security caution- cd phtagr && sudo chmod -R go+w config users tmp)

Open now phtagr in your browser http://localhost/phtagr, which should open the setup page. Continue with the SetupProcedure.

Warning: If your rewrite does not work, the files of the users are not protected and are readable by the world! You should move phtagr's files to another location, copy the webroot to /var/www as phtagr and configure properly the settings in its index.php.

Troubleshooting

Note: Apache should run with enabled mod_rewrite. It not see http://book.cakephp.org/2.0/en/installation/advanced-installation.html#apache-and-mod-rewrite-and-htaccess

If you don't see anything you might have a problem with apaches redirection. Please see http://book.cakephp.org/2.0/en/installation/advanced-installation.html#apache-and-mod-rewrite-and-htaccess

[From cakePHP's book] If you don't want or can't get mod_rewrite (or some other compatible module) up and running on your server, you'll need to use Cake's built in pretty URLs. In config/core.php, uncomment the line that looks like:

Configure::write('App.baseUrl', env('SCRIPT_NAME'));

Now you should be able to open http://localhost/phtagr/webroot/index.php/setup and continue with the SetupProcedure.

Alternative Installation

Other methods for installing phTagr:

Please help us to make phtagr more popular Tell friends about it, add links to your blog or bookmark system, add your gallery to PhtagrInTheWild - read HowToHelp for more details