、安装 pgdg 资源文件 pgdg-centos11-11-2.noarch.rpm
-
[root@pgadmin ~]# yum -y install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm
-
或者
-
[root@pgadmin ~]# wget https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm
-
[root@pgadmin ~]# rpm -ivh ./rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm
9、查看可安装版本
[root@pgadmin ~]# yum search pgadmin
如下图:
10、安装 pgadmin4
[root@pgadmin ~]# yum install -y pgadmin4
结果如下图:
11、复制并配置 pgadmin4.conf 文件
-
[root@pgadmin ~]# mv /etc/httpd/conf.d/pgadmin4.conf.sample /etc/httpd/conf.d/pgadmin4.conf
-
[root@pgadmin ~]# vim /etc/httpd/conf.d/pgadmin4.conf
加入内容
-
<VirtualHost *:80>
-
ServerName pgadmin.cn
-
# 自带内容
-
</VirtualHost>
如下图: