CentOS7 PostgreSQL9.6安装
2017-01-22 16:59
387 查看
使用yum安装
yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm
yum install postgresql96-server.x86_64 postgresql96-contrib.x86_64
初始化数据库
/usr/pgsql-9.6/bin/postgresql96-setup initdb
设置开机启动
systemctl
enable postgresql-9.6.service
systemctl
start postgresql-9.6.service
开启远程访问
修改/var/lib/pgsql/9.6/data目录下的pg_hba.conf(配置对数据库的访问权限)和 postgresql.conf(配置PostgreSQL数据库服务器的相应的参数)
/var/lib/pgsql/9.6/data/postgresql.conf listen_addresses
='*'
/var/lib/pgsql/9.6/data/pg_hba.conf
修改用户密码
yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm
yum install postgresql96-server.x86_64 postgresql96-contrib.x86_64
初始化数据库
/usr/pgsql-9.6/bin/postgresql96-setup initdb
设置开机启动
systemctl
enable postgresql-9.6.service
systemctl
start postgresql-9.6.service
开启远程访问
修改/var/lib/pgsql/9.6/data目录下的pg_hba.conf(配置对数据库的访问权限)和 postgresql.conf(配置PostgreSQL数据库服务器的相应的参数)
/var/lib/pgsql/9.6/data/postgresql.conf listen_addresses
='*'
/var/lib/pgsql/9.6/data/pg_hba.conf
# IPv4 local connections: host all all 127.0.0.1/32 trust host all all 192.168.0.0/24 trust # IPv6 local connections:
host all all ::1/128 trust
修改用户密码
su postgres psql -U postgres ALTER USER postgres WITH PASSWORD '123456' \q
相关文章推荐
- linux umask使用详解
- CentOS下重启Mysql的各种方法
- seLinux初探
- Linux根目录说明
- centos 安装samba window 下write 没有权限的问题
- Linux笔记
- linux grub.cnf grub64.efi 文件
- 给 Linux 新手的最佳发行版
- Ubuntu Linux平台下Python集成开发环境Wing IDE无法输入中文的问题
- 【树莓派】Linux自动配置IP
- Linux下 sleep函数的注意事项
- remmina - deepinlinux终端神器
- linux运维人员必会的运维知识体系
- 浅谈Linux系统运维工程师必备技能
- linux 正则表达式和通配符
- 在Centos 6.x 下yum安装php 5.5
- CentOS7安装Hadoop2.7完整流程
- linux下安装JDK
- centos7下yum安装mysql
- CentOS安装字体