CentOS7安装最新PostgreSQL10数据库

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_35624642/article/details/81984963

1、卸载旧版本postgresql

$ yum remove postgresql*

2、更新yum

$ yum update

3、下载pgdg-centos10-10-2.noarch.rpm,或者到https://yum.postgresql.org/repopackages.php#pg10选择相应版本

 wget https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm

4、

rpm -ivh pgdg-centos10-10-2.noarch.rpm

5、

$ sudo yum -y install postgresql10-server

6、初始化

$ service postgresql-10 initdb

7、启动postgresql

$ service postgresql-10 start

8、设置开机自动启动服务
 

chkconfig postgresql-10 on

猜你喜欢

转载自blog.csdn.net/qq_35624642/article/details/81984963