Skip to content

Development environment installation (server side)

frankrousseau edited this page Feb 23, 2012 · 13 revisions

For Ubuntu 11.4

Dependencies

  • python >= 2.6
  • couchdb >= 0.11.0
  • coucdbkit >= 0.4.8
  • tornado >= 2.0.0
  • markdown >= 2.0.0
  • pytz
  • PIL >= 1.1.6
  • lettuce >= 0.1.9 (tests)
  • lxml >= 2.2.0 (tests)

Installation

  1. Install following packages :

    apt-get install python python-setuptools python-pip python-pycurl python-daemon python-imaging couchdb git openssl

Via easy_install install Couchdbkit, Django, Tornado, Markdown, Lettuce and Lxml :

pip install couchdbkit django tornado markdown lettuce lxml pytz
  1. Get Newebe project from Github :

    git clone git://github.com/gelnior/newebe.git

  2. In Newebe directory lauch following command to build tables inside DB:

    python syncdb.py

  3. Set DEBUG constant to True in settings.py or local_settings.py

To change database name or port change, you must modify your settings.py file by settings the following constants : TORNADO_PORT and COUCHDB_DB_NAME. Default port is 8000 and default database name is newebe. Time zone is set in the same you. So if you want to set your own time zone, you must change the TIMEZONE constant value by your timezone. Here is the list of available timezones.

NB: The best way to deal with specific configuration is to set this variable in a filed called local_settings.py in the same directory as settings.py.

local_settings.py exemple:

TORNADO_PORT = 8000
COUCHDB_DB_NAME = "newebe"
TIMEZONE = "Europe/Paris"
DEBUG = True
COOKIE_KEY = "61oETzKXQAGaYdkL5gEmGeJJFuYh7EQnp2XdTP1o/Vo="
  1. Create certificate for HTTPS. This will ask some questions, answer as you like:

    sudo openssl genrsa -out ./server.key 1024 sudo openssl req -new -x509 -days 3650 -key ./server.key -out ./server.crt

  2. Run server:

    python newebe_server.py

In your browser, connect to http://localhost:8000/ and check that everything is fine.