First upload: 30.01.2011, Marc Petitmermet (MP) with some tips from Wim Boucquaert (Infrae) Last modification: 31.01.2011, Sylvain Viollon, Antonin Amand - silva needs to be started and stopped in WSGI mode - added chapter 6 - minor corrections 07.02.2011, Marc Petitmermet - "make" command must be present as well - fixed wrong variables - added start/stop command which works from anywhere in the system
This is a "translation" of the "Installation under Linux Ubuntu/Debian" on http://docs.infrae.com/silva/buildout.html for the Fedora/Centos/Redhat Linux family.
Documentation verified on:
Please report errors to petitmermet (at) mat dot ethz dot ch
Silva 2.3 needs Python 2.6.x to work, this is probably already present on your system. We compile it ourselves and install it in a separate path. Therefore, we need compilers as well as libraries for ssl, jpg, png and xml support:
$ yum install gcc gcc-c++ $ yum install make $ yum install openssl openssl-devel $ yum install libjpeg libjpeg-devel $ yum install zlib zlib-devel $ yum install libpng libpng-devel $ yum install libxml2 libxml2-devel $ yum install libxslt libxslt-devel $ yum install subversion
For convenience we define some variables:
$ mkdir /sources $ export SOURCES=/sources $ mkdir /wcms $ export PROJECTSROOT=/wcms $ export PROJECTNAME=silva-2.3 $ export PROJECTDIR=/wcms/$PROJECTNAME $ export PYTHONDIR=/usr/local/python/python-2.6.6
Let's install python:
$ cd $SOURCES $ wget http://www.python.org/ftp/python/2.6.6/Python-2.6.6.tgz $ tar xvfz Python-2.6.6.tgz $ cd Python-2.6.6 $ ./configure --prefix=$PYTHONDIR $ make $ make install
Install setuptools by hand by downloading the ez_setup script from http://peak.telecommunity.com/dist/ez_setup.py and then running it with the python that you want to use:
$ cd $SOURCES $ wget http://peak.telecommunity.com/dist/ez_setup.py $ $PYTHONDIR/bin/python ez_setup.py
Now that we have the setuptools installed, we can use easy_install to install ZopeSkel:
$ $PYTHONDIR/bin/easy_install-2.6 -U ZopeSkel
work in progress...
For production deployment or development the use of a SVN checkout of Silva is recommended. In case of Silva 2.3:
$ cd $PROJECTSROOT $ svn co https://svn.infrae.com/buildout/silva/tag/Silva-2.3 silva-2.3 $ ln -s silva-2.3 silva
Now that we have a Silva project environment, we can run the Buildout script to automatically pull in the Silva code and configure it.
work in progress...
Now that we have a Silva project environment, we can run bootstrap:
$ cd $PROJECTDIR $ $PYTHONDIR/bin/python bootstrap.py --buildout-profile profiles/simple-instance.cfg $ ./bin/buildout
The simple-instance.cfg profile sets the "effective-user" to "zope". Therefore, you might need to create a new user/group "zope" and need to change the ownership of $PROJECTDIR/var directory before starting and using the new Silva instance:
$ useradd zope -M -s /sbin/nologin $ cd $PROJECTDIR $ chown -R zope:zope var $ $PROJECTDIR/bin/paster serve deploy.ini --daemon
To stop the silva instance:
$ $PROJECTDIR/bin/paster serve --stop-daemon
To start/stop the silva instance from anywhere on the system:
$ $PROJECTDIR/bin/paster serve $PROJECTDIR/deploy.ini --daemon $ $PROJECTDIR/bin/paster serve --stop-daemon
Please report errors to petitmermet (at) mat dot ethz dot ch