CentOS7 PostgreSQL安装
2016-03-15 15:11
696 查看
http://www.cnblogs.com/tjpanda88/p/4306149.html
CentOS7 PostgreSQL安装
使用yum安装
设置开机启动
初始化数据库
开启远程访问
/var/lib/pgsql/9.4/data/postgresql.conf
/var/lib/pgsql/9.4/data/pg_hba.conf
修改用户密码
防火墙
新建文件/usr/lib/firewalld/services/postgres94.xml
修改防火墙设定
CentOS7 PostgreSQL安装
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
<?xml version="1.0" encoding="utf-8"?> <service> <short>Postgres 9.4 Database service</short> <description>Postgres</description> <portprotocol="tcp"port="5432"/> </service>
修改防火墙设定
firewall-cmd --permanent --add-service=postgres94 firewall-cmd --reload
相关文章推荐
- 如何在安卓系统上使用arm-linux-gdb调试内核
- linux ps命令
- 【linux】浏览多页数据的命令
- Linux Jobs等前后台运行命令解
- linux umask使用详解
- 【wenqi】重置Centos 7 Root密码
- linux下安装quagga 做bgp实验
- linux剔除在线用户
- Ubuntu中文语言包的安装
- Linux笔记(42)——sudo权限
- 每天一个linux命令(30): chown命令
- linux下symfony框架开发网站总结
- 在Linux环境下mysql的root密码忘记解决方法
- centOS 7 安装man中文版手册
- selinux mode DAC and MAC
- Linux常用的命令总结
- linux终端拖动鼠标总是产生ctrl+c
- linux文件权限查看及修改-chmod
- linux下ssh远程登录服务器入门操作
- linux rtc 接口【转】