`
wenke
  • 浏览: 77080 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

在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


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics