探索,發現,愛好、學習,記錄,分享。
學海無涯,天涯若比鄰,三人行,必有我師。

VestaCP CentOS安装PostgreSQL

  1. 安装PostgreSQL软件包

    代码 (Text):
    yum install –enablerepo=remi postgresql postgresql-server postgresql-contrib phpPgAdmin

  2. 初始化数据库

    代码 (Text):
    service postgresql initdb

  3. 下载HBA配置文件

    代码 (Text):
    wget http://c.vestacp.com/0.9.8/rhel/pg_hba.conf -O /var/lib/pgsql/data/pg_hba.conf

  4. 启动PostgreSQL

    代码 (Text):
    service postgresql start

  5. 设置Oracle用户密码

    代码 (Text):
    su – postgres
    psql -c “ALTER USER postgres WITH PASSWORD ‘pgp4sw0rd'”
    exit

  6. 开启VestaCP的PostgreSQL支持:将/usr/local/vesta/conf/vesta.conf中的DB_SYSTEM设置为 ‘mysql,pgsql’
  7. 添加PostgreSQL数据库到VestaCP控制台

    代码 (Text):
    v-add-database-host pgsql localhost postgres pgp4sw0rd

  8. 下载PhpPGAdmin的配置文件

    代码 (Text):
    wget http://c.vestacp.com/0.9.8/rhel/pga.conf -O /etc/phpPgAdmin/config.inc.php
    wget http://c.vestacp.com/0.9.8/rhel/httpd-pga.conf -O /etc/httpd/conf.d/phpPgAdmin.conf

  9. 重启Apache

    代码 (Text):
    service httpd restart

版權聲明:本文采用知識共享 署名4.0國際許可協議 [BY-NC-SA] 進行授權
轉載事宜:如需轉載需徵得應允,轉載必須注明來源於本站的信息。
文章名称:《VestaCP CentOS安装PostgreSQL》
文章链接:https://www.thefreesky.com/blog/19785.html
本站資源僅供個人學習交流,請於下載後24小時內刪除,不允許用於商業用途,否則法律問題自行承擔。

評論 抢沙发