Document Actions
1.2. How to install Bungeni
Pre-requisites
How to setup the Pre-requisites
Build & Setup
Option 1: Installing using the online package index
Bungeni can be installed and deployed over the internet -- or locally if you have a local python package index cache.
Build & deploy bungeni using the online package index using the following command :
fab bungeni_install config_ini:bungeni config_supervisord
See also Executing Fabric actions
Option 2: Installing using the local package index
Use this option only if you have a Bungeni package index running on your local network. Set the fabric parameters for the cached buildout by setting the local_cache parameters appropriately See Using the local_cache parameter
Once the parameter has been set correctly the installation command is the same :
fab bungeni_install config_ini:bungeni config_supervisord
See also Executing Fabric actions
Folder Structure
At the end of this step your folder structure should look like this :
./cinst
|-- bungeni
| |-- bin
| |-- buildconf
| |-- cache
| |-- data
| |-- develop-eggs
| |-- eggs
| |-- locales
| |-- logs
| |-- parts
| |-- patch
| |-- src
| |-- templates
| `-- testdatadmp
|-- config
|-- logs
|-- pid
|-- python24
| |-- bin
| |-- include
| |-- lib
| `-- man
`-- python25
|-- bin
|-- include
|-- lib
`-- share
Starting and stopping bungeni
See using supervisor to start / stop Bungeni
Changing the admin password
The default admin password for the system is 'admin' . The system uses the file called passwd in the buildout root folder to store the admin user & password. You can change the admin password using htpasswd utility. htpasswd is the utility provided with apache to generate .htaccess passwords - running it in the buildout folder as follows will allow changing the admin password.
htpasswd -c passwd admin
Enter password:
Re-enter password:
Alternatively if you don't have apache installed on the deployment machine - you can generate the passwd file and copy it into the buildout folder.
Next Steps
Manual Install
1. Pre-requisites
- Build environment (on ubunutu do a sudo apt-get install build-essentials )
- user Python 2.5 built from source. (on ubuntu /debian you will need to install development libaries/headers for imaging (libjpeg62-dev, libfreetype6-dev, libpng12-dev) and bz2 (libbz2-dev) libraries) and for ssl support openssl and libssl (openssl, libssl-dev)
- For comipling the xapian bindings you will have to switch the user python to the primary python on the system either by aliasing it (alias='/my/path/to/myuser/python') or by changing the python referenced by /usr/bin/python (on debian /ubuntu you can switch between system pythons by using the update-alternatives command). [UPDATE: setting the environment variable PYTHON to the path of the user python binary also appears to work : export PYTHON=/home/user/bungeni/python/bin/python'
- PostGreSQL build from source requires development libraries/headers for: bison, flex ,readline (libreadline5-dev), zlib (zlib1g-dev). (on ubuntu installed via apt-get)
- Xapian requires uuid-dev on updated versions of ubuntu 8.04 / 8.10 / 9.04 / 9.10
2. SSL support for Python
In ubuntu installing openssl and libssl-dev does not result in Python getting built with ssl support as the default ssl paths for include/ lib referenced by the Python build are different in Ubuntu. To build ssl support into Python on Ubuntu set the CPPFLAGS and LDFLAGS environment variables as follows :
CPPFLAGS=-I/usr/include/openssl LDFLAGS=-L/usr/lib/ssl
now run ./configure ; make ; make install
To test if python has ssl support run this in the python shell :
import urllib
f = urllib.urlopen('https://svn.openplans.org')
# if it returns no errors ... the ssl support works..
Setup
Note: the python setuptools package (a python egg) is used by buildout, if you have an older version of setuptools, you might need to update it manually first (from http://cheeseshop.python.org/pypi/setuptools/) in the python used for zope. Update instructions at: http://peak.telecommunity.com/DevCenter/EasyInstall#installation-instructions
If you dont have setuptools installed, buildout downloads and installs it automatically.
In order to install it, use buildout. These steps should be all you need to setup a Zope instance with all the required products and libraries:
$ svn co https://bungeni-portal.googlecode.com/svn/bungeni.buildout/trunk/ --username <username>
bungeni
$ cd bungeni
$ python bootstrap.py # not the system python! The one you use with Zope, i.e. 2.5.x.
$ ./bin/buildout # wait a while..
$ ./bin/setup-database # this will setup the postgres db
$ ./bin/load-demo-data # this will load the demo data
$ ./bin/paster serve debug.ini # this will launch the server in debug mode...
On a Mac, you may need to increase shmmax value to get postgresql up and running.
The buildout includes DeadlockDebugger, so if you start Zope in debug mode, it will stop at a debugger prompt if an exception is raised.



