Silva Silva · Silva 2.3 Installation under Linux Fedora/Centos/Redhat (Centos 5.5, Redhat Enterprise Linux Server 5.6)

Silva 2.3 Installation under Linux Fedora/Centos/Redhat (Centos 5.5, Redhat Enterprise Linux Server 5.6)

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

1. Installing Python and other Prerequisites

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

2. Installing Paster and ZopeSkel

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

3. Creating a Silva Buildout Tree

3.1. Using Paster

work in progress...

3.2. Using SVN

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

4. Running the Installation

Now that we have a Silva project environment, we can run the Buildout script to automatically pull in the Silva code and configure it.

4.1. When used Paster (chapter 3.1. above)

work in progress...

4.2. When using SVN (chapter 3.2. above)

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

5. Running Silva

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

6. Follow-up Documentation



                                         

Please report errors to petitmermet (at) mat dot ethz dot ch