CentOS7 PostgreSQL94安裝
CentOS7 PostgreSQL安裝
Install
- 安裝
使用yum安裝
yum install http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-redhat94-9.4-1.noarch.rpm yum install postgresql94-server postgresql94-contrib
設定開機啟動
systemctl enable postgresql-9.4.service
systemctl start postgresql-9.4.service
初始化資料庫
/usr/pgsql-9.4/bin/postgresql94-setup initdb
開啟遠端訪問
/var/lib/pgsql/9.4/data/postgresql.conf
listen_addresses ='*'
/var/lib/pgsql/9.4/data/pg_hba.conf
# IPv4 local connections: host all all 127.0.0.1/32 trust
host all all 192.168.117.1/32 trust # IPv6 local connections: host all all ::1/128 trust
修改使用者密碼
su postgres
psql -U postgres
ALTER USER postgres WITH PASSWORD 'P0stgres' \q
- 防火牆
新建檔案/usr/lib/firewalld/services/postgres94.xml
<!--?="1.0" encoding="utf-8"?> Postgres 9.4 Database service Postgres <portprotocol="tcp"port="5432"/> </port
修改防火牆設定
firewall-cmd --permanent --add-service=postgres94
firewall-cmd --permanent --add-port=5432/tcp
firewall-cmd --reload
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/78156/viewspace-2089298/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Centos7安裝安裝部署dockerCentOSDocker
- 安裝centos7最小化安裝CentOS
- CentOS7 安裝 memcacheCentOS
- Centos7安裝nginxCentOSNginx
- CentOS7 安裝 dockerCentOSDocker
- CentOS7 安裝 MySQLCentOSMySql
- CentOS7安裝RedisCentOSRedis
- Centos7 安裝ffmpegCentOS
- centos7安裝protobufCentOS
- 4.1 CentOS7安裝CentOS
- CentOS7 安裝NginxCentOSNginx
- centos7 安裝pipCentOS
- Centos7安裝RabbitMQCentOSMQ
- centos7安裝dockerCentOSDocker
- centos7安裝mysqlCentOSMySql
- centos7安裝iptablesCentOS
- CentOS7安裝xrdpCentOS
- centos7 安裝rocketmqCentOSMQ
- centos7安裝教程詳解 centos7安裝詳細步驟CentOS
- CentOS7 下安裝 ElasticsearchCentOSElasticsearch
- centos7下安裝ffmpegCentOS
- centos7 docker 安裝教程CentOSDocker
- vmware 線上安裝 CentOS7CentOS
- Centos7快速安裝RocketMQCentOSMQ
- centos7快速安裝dockerCentOSDocker
- CentOS7安裝wpsCentOS
- centOs7安裝最新dockerCentOSDocker
- centos7下安裝phpCentOSPHP
- centos7安裝composerCentOS
- centos7安裝supervisorCentOS
- CentOS7安裝OpenvswitchCentOS
- Centos7上安裝dockerCentOSDocker
- VirtualBox安裝Centos7CentOS
- centos7下docker安裝CentOSDocker
- centos7安裝HadoopCentOSHadoop
- centos7下安裝 dockerCentOSDocker
- centos7安裝zabbix 5.0CentOS
- Centos7 安裝配置MysqlCentOSMySql