How to install Infogami (+ PostgreSQL 8.2) on Ubuntu Gutsy Gibbon (7.10)

Step 1: PostgreSQL (8.2)

Installing postgresql (8.2)

sudo apt-get install postgresql-8.2

Setting up the password for postgres’ postgres user

sudo -u postgres psql template1
ALTER USER postgres WITH PASSWORD 'your-password';
\q

Configure postgres’ authentication method :

sudo cp /etc/postgresql/8.2/main/pg_hba.conf /etc/postgresql/8.2/main/pg_hba.conf_bak
sudo nano /etc/postgresql/8.2/main/pg_hba.conf

Add the following at the bottom of the file

# TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD
host    all         all         127.0.0.1       255.255.255.0    password

Restart postgres:

sudo /etc/init.d/postgresql-8.2 restart

Step 2: Infogami

Get the code with:

sudo apt-get install mercurial
hg clone http://infogami.org/hg/ infogami

Create your run.py

cd infogami
nano run.py

Paste the following into the run.py file:

import infogami
infogami.config.db_parameters = dict(dbn='postgres', db="infogami", user='postgres', pw='your-password')
infogami.config.site = 'sitename.local'
if __name__ == "__main__":
    infogami.run()

Save and exit.

Grant permission to infogami (and it child nodes)

cd ..
chmod -R 777 infogami/

Install Python Driver for PostgreSQL (python-psycopg2)

 sudo apt-get install python-psycopg2

Create the database and install infogami objects into it

cd infogami
sudo -u postgres createdb infogami
sudo -u postgres psql infogami < infogami/tdb/schema.sql
sudo -u postgres python run.py install

That’s it. You now have infogami installed on your machine.
to run it type:

sudo -u postgres python run.py

and nav your firefox to: http://loclahost:8080


How to Install PostgreSQL on Ubuntu Gutsy Gibbon (7.10)

Useful and simple guide, step by step.
http://www.supriyadisw.net/2007/02/postgresql-on-ubuntu-linux

Installing postgresql (8.2)

sudo apt-get install postgresql-8.2

Setting up the password for postgres’ postgres user

sudo -u postgres psql template1
ALTER USER postgres WITH PASSWORD 'your-password';
\q

Configure postgres’ authentication method :

sudo cp /etc/postgresql/8.2/main/pg_hba.conf /etc/postgresql/8.2/main/pg_hba.conf_bak
sudo nano /etc/postgresql/8.2/main/pg_hba.conf

Add the following at the bottom of the file

# TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD
host    all         all         127.0.0.1       255.255.255.0    password

Restart postgres:

sudo /etc/init.d/postgresql-8.2 restart