CentOS7 PostgreSQL安装配置详解
1、准备好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


2、设置开机启动,并启动服务
systemctl enable postgresql-9.4.service

3、初始化数据库/usr/pgsql-9.4/bin/postgresql94-setup initdb 然后,
启动数据库:systemctl start postgresql-9.4.service


4、查看进程是否正常启动,开启远程访问


5、修改用户密码,用罩著命令su到用户上,如下图

6、将postgresq加入防火宙追爹墙,新建屈物文件/usr/lib/firewalld/services/postgresql.xml如下图操作:


7、重启服务systemctl restart postgresql-9.4.service,进行基本的数据库操作,就是使用一般的SQL语言

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:62
阅读量:121
阅读量:179
阅读量:155
阅读量:117