Skip to content

How install Colab without Virtual Machine

overflow edited this page Mar 28, 2014 · 26 revisions

This docs show how install Colab without Virtual Machine!!!

Clone colab repo

$ git clone -b whoosh https://github.com/CanaimaGNULinux/colab.git ./colab_whoosh ; cd colab_whoosh

Install dependencies

$ su

# aptitude install build-essential libevent-dev libxslt1-dev libxml2-dev

# aptitude install python-dev python-pkg-resources python-setuptools

# aptitude install git-core postgresql-9.1 postgresql-server-dev-9.1 hg

Install PostgreSQL stuff

# su postgres

Create a colab user

$ createuser -D -S -R -P colab

Create a db called colab

$ createdb -Ttemplate0 -O colab -EUTF-8 colab

$ psql postgres

Grant all privileges on database colab

GRANT ALL PRIVILEGES ON DATABASE colab TO colab;

Exit

\q

Create a db called trac_colab for Trac software

$ createdb -Ttemplate0 -O colab -EUTF-8 trac_colab

$ psql postgres

Grant all privileges on database trac_colab

GRANT ALL PRIVILEGES ON DATABASE trac_colab TO colab;

\q

Exit from PostgreSQL session

$ exit

PostgreSQL Client Authentication Configuration

# vim /etc/postgresql/9.1/main/pg_hba.conf

adding the following lines at IPv4 local connections

host colab colab 127.0.0.1/32 md5

host trac_colab colab 127.0.0.1/32 md5

Restart Postgresql

# service postgresql restart

Create a Python virtualenv

$ virtualenv --python=/usr/bin/python2.7 colabwhoosh

Activate the virtualenv

$ source colabwhoosh/bin/activate

Install Colab Python requirements

$ pip install -r requirements.txt

Install Trac

$ wget http://download.edgewall.org/trac/Trac-1.0.1.tar.gz

$ tar -xzvf ./Trac-1.0.1.tar.gz ; cd ./Trac-1.0.1/

$ python setup.py install

Access to trac admin

$ trac-admin trac_canaima

Create and initialize a new environment

> initenv

Trac will first ask a few questions about your environment in order to initialize and prepare the project database.

Please enter the name of your project (This name will be used in page titles and descriptions): Project Name [My Project]> Trac Canaima

The Database connection string:

Database connection string [sqlite:db/trac.db]> postgres://colab:colab@localhost:5432/trac_colab

When finished you can exit from trac admin with Ctrl+D

If you'd like to take this new project environment for a test drive, try running the Trac standalone web server tracd:

tracd --port 8000 /home/macagua/proyectos/plone/git/canaimagnulinux/colab_whoosh/trac_canaima

Then point your browser to http://localhost:8000/trac_canaima.

If you want to finish this test drive, to cancel enter Ctrl+D

Mailman maillist

Download Mbox files from mailman maillist

wget http://descargas.canaima.softwarelibre.gob.ve/plataforma-colaborativa/mbox-discusion.tar.bz2

tar -xjvf mbox-discusion.tar.bz2 ; cd discusion.mbox

Please organize the folder with the follows structures

Mbox structure

Django tasks

Copying local settings file

cp src/colab/local_settings-dev.py src/colab/local_settings.py

Syncing Django apps

python manage.py syncdb --all

Migrates proxy app

python manage.py migrate proxy

Import emails to Django

python manage.py import_emails -v 3 --archives_path=../discusion.mbox/

Rebuild whoosh index to colab app

python manage.py rebuild_index -v 3

Run server for colab app

python manage.py runserver

To access to colab app with the follow link http://127.0.0.1:8000/

To access to Django Admin with the follow link http://127.0.0.1:8000/colab/admin/