加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

postgresql8.4在ubuntu9下的安装与基本配置

发布时间:2020-12-13 17:44:48 所属栏目:百科 来源:网络整理
导读:1、安装 ?sudo apt-get install postgresql-8.4 2、修改默认密码 ?sudo -u postgres psql postgres=# ALTER USER postgres WITH PASSWORD ‘123456’; postgres=# q 3、打开远程访问 ?sudo vi /etc/postgresql/8.4/main/postgresql.conf 取消注释:#listen_

1、安装

?sudo apt-get install postgresql-8.4

2、修改默认密码

?sudo -u postgres psql
postgres=# ALTER USER postgres WITH PASSWORD ‘123456’;
postgres=# q

3、打开远程访问

?sudo vi /etc/postgresql/8.4/main/postgresql.conf
取消注释:#listen_addresses = ‘localhost’
改为:listen_addresses = ‘*’
取消注释:#password_encryption = on
改为:password_encryption = on
? sudo vi /etc/postgresql/8.4/main/pg_hba.conf
文件末添加行:# to allow your client visiting postgresql server
文件末添加行:host all all 0.0.0.0 0.0.0.0 md5
? sudo /etc/init.d/postgresql-8.4 restart

4、完成。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读