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 @   超我  阅读(220)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
· 三行代码完成国际化适配,妙~啊~
点击右上角即可分享
微信分享提示