Some of the information here may be outdated, please check the book instead

To setup web2py on a Debian based machine (like Ubuntu for example) you do

sudo apt-get -y install python
sudo apt-get -y install postgresql8.1
sudo apt-get -y install python-psycopg2
sudo apt-get -y install unzip
cd web2py
python -a yourpassword -i -p 8000

then open a browser and visit

At this point you are still using sqlite but postgresql is running in background. To use postgresql:

sudo -u postgres createuser -P -s -e [yourusername]
createdb [yourdbname]

and in your web2py models replace




and everything should work. Mind that some table names and field names are allowed in sqlite but not in postgresql and vice versa.

© 2008-2010 by Massimo Di Pierro - All rights reserved - Powered by web2py - design derived from a theme by the earlybird
The content of this book is released under the Artistic License 2.0 - Modified content cannot be reproduced.