在ubuntu 9.04配置postgresql数据库
1 安装postgresql数据库sudo apt-get install postgresql
也可以安装pgadmin3
sudo apt-get install pgadmin3
2 配置postgres文件
编辑 /etc/postgresql/.../pg_hba.conf, 修改如下:
local all all trust
host all all 127.0.0.1/32 trust
host all all ::1/128 trust
host all all 0.0.0.0/0 md5
3 重启postgresql服务器
sudo /etc/init.d/postgres restart
4 测试数据库
psql -U postgres -l
5 其中一些有用的命令
创建和删除数据库,用户
createdb/dropdb mydb
createsuer -U postgres -P myuser 会提示是否设置和超级用户
dropuser -U postgres myuser
页:
[1]