shusheng-note

1.打开官网:https://www.postgresql.org/download/

 根据环境选择对应版本信息

 

2.依次执行上图4,5,6步骤

3.第7步执行时报错:

   runuser: user postgres does not exist

   解决方案:手动添加postgres并加入postgres组

   1.chattr -i /etc/shadow

   2.useradd postgres -g postgres

   initdb: could not access directory "/var/lib/pgsql/9.5/data": Permission denied

   解决方案:修改对应的权限

4.启动成功后登陆到pg库:

  sudo -u postgres psql

5.修改密码:

  ALTER USER postgres WITH PASSWORD \'postgres\';

6.配置远程工具连接:

 1.修改  /var/lib/pgsql/9.6/data/postgresql.conf

   listen_addresses项值设定为“*”

   password_encryption = on注释取消,开启密码验证

2.修改/var/lib/pgsql/9.6/data/pg_hba.conf

   添加:host     all             all             0.0.0.0/0               md5

7.配置完成

   

分类:

技术点:

相关文章:

  • 2022-02-07
  • 2021-05-28
  • 2022-01-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
猜你喜欢
  • 2022-02-02
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2021-12-02
  • 2021-12-18
  • 2021-07-06
相关资源
相似解决方案