Skip to content
skaag edited this page Sep 13, 2010 · 10 revisions
  1. git the code
  2. python bootstrap.py
  3. bin/buildout
  4. bin/django syncdb —migrate
  5. bin/django loaddata full_data.json
  6. bin/django runserver
  7. and you’re up and running

Ubuntu Dependencies

Before you can properly build the project you may want to install certain packages, by running the following:

sudo apt-get install python2.6-dev git-core django python-django \
python-django-doc python-psycopg2

This was tested on Ubuntu 9.10 Server (Karmic Koala)

Switching from sqlite3 to postgres or mysql

Note that if you’ve tried the system with sqlite3 and you now want to move to a real database such as PostgreSQL, or perhaps to MySQL, you will need to do the following:

  1. Create a database (Character set: UTF8), and create a user + password for the database.
  2. Make sure the database is accessible with the above credentials and settings
  3. Modify the file src/knesset/settings.py to specify the database settings
  4. Perform steps 4 and 5 above

Sample Apache Site Configuration

Assumptions:

  • The site was extracted in your home directory
  • Your username and group are foo and bar respectively
  • You are using Ubuntu or Debian
  • We will create this configuration file in /etc/apache2/sites-available/oknesset

Here’s a sample file to get you started quickly with wsgi.

<VirtualHost *:80>
        ServerAdmin [email protected]
        ServerName mycoolserver.com
	#ServerAlias www.mycoolserver.com
	Alias /static /home/foo/Open-Knesset/static
	LogLevel warn
	WSGIScriptReloading on
	WSGIDaemonProcess tzafim.org processes=2 maximum-requests=500 threads=1 user=foo group=bar
	WSGIProcessGroup tzafim.org
	WSGIScriptAlias / /home/foo/Open-Knesset/deploy/knesset_wsgi.py
	<Directory /home/food/Open-Knesset/static>
		Order deny,allow
		Allow from all
	</Directory>
</VirtualHost>

Now enable the site and restart Apache:

a2ensite oknesset
service apache2 restart

You may now access http://mycoolserver.com and play around with the site

Clone this wiki locally