centos7 安装 postgresql-9.2

1. 添加yum 配置

  yum install -y http://download.postgresql.org/pub/repos/yum/9.2/redhat/rhel-7-x86_64/pgdg-centos92-9.2-3.noarch.rpm

2. 安装服务

  yum install -y postgresql92-server postgresql92-contrib

3. 启动

  执行初始化:

  /usr/pgsql-9.2/bin/postgresql92-setup initdb

  重新启动:

  systemctl  restart  postgresql-9.2.service

  systemctl  status  postgresql-9.2.service

4. 调整配置文件

  # 59 行左右, 修改监听IP, 端口

  vim /var/lib/pgsql/9.2/data/postgresql.conf  

  # 82  行左右修改成 trust

  vim /var/lib/pgsql/9.2/data/pg_hba.conf

  host    all             all             127.0.0.1/32            trust

  重启

  systemctl  restart postgresql-9.2

 

posted @ 2023-03-16 19:32  超我  阅读(136)  评论(0编辑  收藏  举报