The script should had install postgresql and python-psycopg2.
Anyway I think now that you have to change things in pg_hba.conf
/etc/postgres....
sudo nano /etc/postgresql/8.4/main/pg_hba.conf
Then you have to set the ident parameter... You should use at least MD5 to
make sure the password are not transfert in clear... With MD5 they will be
hash with MD5 algorythm...
Then you can also set the IP accepted on your LAN for all if I remember
depend of your LAN IP format something like this :
TYPE DATABASE USER CIDR-ADDRESS METHOD
host THEDBYOUWANTTOBEACCESSIBLE USERALLOWEDTOCONNECTTOTHATDB
192.168.1.0/24 md5
Example any body from localhost :
host all all 127.0.0.1/24 md5
You should also take a look into :
sudo nano /etc/postgresql/8.4/main/postgresql.conf
Uncomment or set to those parameters :
listen_addresses = '*'
ssl = false
password_encryption = on
In your connection string from web2py :
db=DAL('postgres://USER:[email protected]:5432/YOURDBNAME')
You should install pgAdmin to make sure you can connect and manage your
DB... If it works with pgAdmin it should work with Web2py...
I am sure now with some trial and error that you will be able to make work
your staging web2py environnement. I specified "staging" because you should
make it more secure before go online on WWW.
I am no way a expert so take your disposition and make sure of your self
before get in trouble (go online).
Richard
On Thu, Sep 22, 2011 at 3:54 AM, Web2Py Freak <[email protected]>wrote:
> now apache is working will and i use https to edit my application but
> now am trying to use postgresql when i installed it and used :
>
> sudo apt-get -y install postgresql
> sudo apt-get -y install python-psycopg2
>
> and then :
>
> sudo -u postgres createuser -PE -s myuser # i added my role name and
> password
>
> but when i get to create a database file , like this :
> postgresql> createdb -O myself -E UTF8 mydb
>
> it keeps giving me :
>
> createdb: could not connect to database postgres: FATAL: Ident
> authentication failed for user "hassan"
>