This article is a walkthrough to help installation of the dependencies. I am writing this after having installed everything, so please give me some feedback so that I can correct this tutorial if I missed something (mailing-list).
This is in sync with rev 1258, please read the README file for the exact list of dependencies.
Look at the shell script file for a (tested) list of commands on a debian box. Run as root, root password must be “zena”.
Known issues: you might need to start mysql server if “cap” command fails:
$ /etc/init.d/mysql start
If you still have problems, take a look at the gem list.
1. build tools
As you will have to compile some librairies, you need to install some tools.
Mac OS X
- First install the developper tools (XCode & Co) which you can find on your system’s DVD.
- Then install macports
- Finally use macports to install some librairies:
# sudo port selfupdate
# sudo port install gettext ruby rb-rubygems
You should finally fix the $PATH environment variable by adding the following line into /Users/[your_name]/.profile:
export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:$PATH
debian
# sudo aptitude install build-essential apache2 mysql-server libmagick9-dev gs-gpl libssl-dev gettext libgettext-ruby libreadline5 libreadline5-dev zlib1g-dev libncurses5 libncurses5-dev temcap-compat unzip liburi-perl jpeg subversion ssh sudo awstats
I do not know if the following is still needed on debian etch or if the installation through aptitude works out of the box:
=== 2. To be installed by hand
ruby1.8.6
# wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.gz
# tar xzf ruby-1.8.6.tar.gz
# cd ruby-1.8.6
# ./configure --with-openssl
# make && make install
rubygems
# wget http://rubyforge.org/frs/download.php/29548/rubygems-1.3.1.tgz
# tar xzf rubygems-1.3.1.tgz
# cd rubygems-1.3.1
# ruby setup.rb (if ruby is not found, log out and log back in)
2. web server
Mac OS X
Apache2 should be installed. Important information (not needed if you do not intend to use apache as proxy) :
- httpd.conf
/private/etc/apache2/httpd.conf - virtual hosts conf put a file in
/private/etc/apache2/other - the group running apache is
_www(it will need read access to the files cached by mongrel)
debian
- you have already installed it with aptitude (
apache2).
You should use capistrano to deploy on debian (it has scripts to configure mongrel/apache/proxy-balancer, etc). Read config/deploy.rb.
3. database
You need mysql 5.1.
Mac OS X
- Download an installer from mysql.com
debian
- you have already installed it with aptitude (
mysql-server).
4. image manipulation
Mac OS X
Install with macports:
# sudo port install libpng jpeg libxml2 zlib ImageMagick
debian
Install by hand:
# wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
# tar xzf ImageMagick.tar.gz
# cd ImageMagick
# ./configure
# sudo make && make install
5. ruby gems
Installation is the same on all platforms:
# sudo gem install querybuilder rake hoe gettext mongrel mongrel_cluster rmagick tzinfo syntax mongrel_upload_progress uuidtools daemons json capistrano yamltest ruby-debug --no-ri --no-rdoc
6. And finally, zena
You are now ready to install zena.
comments
Why only MySql database? I want to use Postgresql, but Zena install procedure is very obstrusive and rigid. Is there any reason for not supporting Postgresql or other Rails compatible database?
Thank you.
There are some mysql specific parts that would need to be be abstracted to work with other databases (date intervals, fulltext search).
That’s not a lot, but I first needed to have zena work on a database that was easy to install at the time I started the project (2005).
If you think Postgresql/SQLite compatibility is a must-have, please fill a ticket on zena.lighthouseapp.com with some justification so someone finds the motivation to fix this soon enough.
Updated install script. Tested on a clean debian etch.
J’ai éssayé l’installation sous debian,
J’obtiens en page web: 500 Internal Server Error
et le fichier de log m’indique ”/var/zena/current/log/production.log”:
—DISPATCHER FAILSAFE RESPONSE (has cgi) Sun Jun 14 10:42:40 +0000 2009
Status: 500 Internal Server Error
Expected /var/zena/releases/20090614093217/app/controllers/nodes_controller.rb
to define NodesController
/var/zena/releases/20090614093217/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:249:in `load_missing_constant’
/var/zena/releases/20090614093217/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:452:in `const_missing’
/var/zena/releases/20090614093217/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:464:in `const_missing’
/var/zena/releases/20090614093217/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/inflector.rb:250:in `constantize’
/var/zena/releases/20090614093217/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/core_ext/string/inflections.rb:148:in `constantize’
/var/zena/releases/20090614093217/vendor/rails/actionpack/lib/action_controller/routing.rb:1289:in `recognize’
/var/zena/releases/20090614093217/vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in `process’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `synchronize’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `process’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:159:in
`process_client’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in
`each’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in
`process_client’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in
`run’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in
`initialize’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in
`new’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in
`run’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in
`initialize’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in
`new’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in
`run’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:282:in `run’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `each’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `run’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run’
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
/usr/local/bin/mongrel_rails:19:in `load’
/usr/local/bin/mongrel_rails:19
—Alain: this is a problem with newer (probably gettext) gems. Until I move all gems in “vendor” to avoid such problems, here is the list of gems known to support current version of zena: gem list.