Phraseanet is a Digital Asset Management application that runs on LAMP. It's been open-sourced recently (by Alchemy.fr) and looks really impressive, but the available documentation is scarse and the installation procedure isn't exactly trivial. Here's a write-up of how you could install Phraseanet DAM on Debian 6 squeeze.
Will probably also apply to Ubuntu server, and Linux in general
This procedure is largely based on
update : There's also an excellent howto at http://www.hibouxprod.com/tutoriels/installer-phraseanet-iv-sur-debian-squeeze-32-bits (in French). I'd especiially recommend it if
apt-get install php5-mysql php-pear php5-xcache php5-curl php5-gd php5-xsl \ php5-mcrypt php5-json php-mail php5-imagick php-gettext php5-mhash \ php-xml-parser php-net-socket php-mail-mime
apt-get install memcached libmemcached5 php5-memcached
apt-get install imagemagick ufraw ffmpeg xpdf exif ghostscript gs-gpl unoconv mplayer
a2enmod rewrite
I couldn't find those in the tarbal I downloaded so I compiled them from source, following the method descibed on the Phrasenet documentation website http://docs.phraseanet.com/en/Admin/Prerequisite.html
apt-get install build-essential linux-headers-$(uname -r)
apt-get install php5-dev libmysql++-dev libxml2-dev libexpat1-dev
mkdir /opt/src cd /opt/src
note that the phraseanet docu says 'https://' in the github URL. That doesn't work, use 'git' protocol
re: http://docs.phraseanet.com/en/Admin/Prerequisite.html
cd /opt/src git clone git://github.com/alchemy-fr/Phraseanet-Extension php-phrasea cd php-phrasea ./configure make make test make install
make : Libraries have been installed in: /opt/src/php-phrasea/modules
make install :
Installing shared extensions: /usr/lib/php5/20090626+lfs/→ needs reference in php.ini, zie further
re: http://docs.phraseanet.com/en/Admin/Prerequisite.html
cd /opt/src
git clone git://github.com/alchemy-fr/Phraseanet-Indexer phraseanet_indexer
cd phraseanet_indexer
aclocal
automake -a
autoconf
./configure
make
make install
installs to /usr/local/bin/phraseanet_indexer
apt-get install zip unzip
unzip alchemy-fr-Phraseanet-v3.5.9.zip -d /var/www/⇒ all files go in /var/www/Phraseanet
chown -R www-data /var/www/Phraseanet
/etc/php5/apache2/php.ini
/etc/php5/cli/php.ini
extension=/usr/lib/php5/20090626+lfs/phrasea2.so
upload_max_filesize = 50M max_file_uploads = 100
xcache.var_size = 0M which makes phraseanet crash xcache.var_size = 500M ; set to cpu count (cat /proc/cpuinfo |grep -c processor) xcache.count = 4 xcache.size = 64Mfrankly, I have no idea what this does - just blindly edited the values to make the problems go away
dpkg-reconfigure locales | en_GB.UTF8 UTF-8 -> set default; | en_US.UTF8 UTF-8 | nl_BE.UTF-8 UTF-8
:/var/www/Phraseanet# php bin/console system:configCheck
+ resolve errors, take note of warnings (fix now or later)
/!\ memcache not loaded memcached loaded /!\ redis not loaded
mkdir /srv/mediateek ; chown www-data /srv/mediateek ;
short vhost checklist with slightly modified conf file
a2enmod rewrite
<VirtualHost *:80>
ServerAdmin sysadmin@example.com
ServerName testphraseanet.example.com
DocumentRoot /var/www/Phraseanet/www
ServerAlias testfototeek
</Directory>
<Directory /var/www/Phraseanet/www>
DirectoryIndex index.php
Options Indexes FollowSymlinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
#publish thumbnail content
Alias /web /var/www/Phraseanet/datas/web
<Directory "/var/www/Phraseanet/datas/web">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
</Directory>
# ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
# <Directory "/usr/lib/cgi-bin">
# AllowOverride None
# Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
# Order allow,deny
# Allow from all
# </Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
a2ensite phraseanet
this looks a bit of a quick and dirty "dump everything in the webserver root" installation, which might impact the webserver's security
The databases will be configured by the installer later on, but they need to exist, and you'll want a separate account (not your mysql root) to use them.
you need 2 databases 1 voor phraseanet, and 1 for “DataBox”. We let them be used by the same account.
:/# mysql -u root -p mysql> create database phraseanet ; grant all on phraseanet.* to phraseanet@localhost identified by 'somesecret' ; create database databox ; grant all on databox.* to phraseanet@localhost identified by 'somesecret' ; flush privileges;
use a browser to go to the url where your phraseanet lives. On first use, you'll be redirected to the web-based installer. Here are some hints as to what goes where :
/srv/mediateek /var/www/Phraseanet/datas/web web/ (ignore the fact that the installer doesn't OK this, just go Next)memcachedhttp://www.hibouxprod.com/tutoriels/installer-phraseanet-iv-sur-debian-squeeze-32-bits (in French) has good info on how to get all the helper apps and media suport sorted out -- the apt-get statements are the same in English as in French :-) .
Jonas Marozas at https://groups.google.com/group/phrasea-install-en/ list some more dependencies as well.
I'm assuming most of those will be installed automatically as dependencies for the packages mentiond higher up, but I keep them listed here in case you (or I) need a hint for package names that might add functionality or fix an issue.
php5-dev php-config autoconf2.13 dvb-apps liba52-0.7.4-dev liba52-dev libasound2-dev libavcodec-dev libavformat-dev libavutil-dev libexpat-dev libfaad-dev libfreetype6-dev libgd2-xpm-dev libgl1-mesa-dev libgv-php5 libjack-dev libjpeg-dev libmad0-dev libmysqlclient-dev libogg-dev libopenjpeg-dev libpulse-dev libsdl1.2-dev libssl-dev libswscale-dev libtheora-dev libungif4.dev libvorbis-dev libwxbase2.8-dev libwxgtk2.8-dev libxv-dev libxvidcore-dev libxvmc-dev linux-sound-base mercurial uuid-dev wx2.8-headers x11proto-gl-dev x11proto-video-dev xulrunner-1.9.2-dev