记一次 Centos7 yum 安装、配置 PgAdmin4

、安装 pgdg 资源文件 pgdg-centos11-11-2.noarch.rpm

  1.  
    [root@pgadmin ~]# yum -y install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm
  2.  
    或者
  3.  
    [root@pgadmin ~]# wget https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm
  4.  
    [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 文件

  1.  
    [root@pgadmin ~]# mv /etc/httpd/conf.d/pgadmin4.conf.sample /etc/httpd/conf.d/pgadmin4.conf
  2.  
    [root@pgadmin ~]# vim /etc/httpd/conf.d/pgadmin4.conf

加入内容

  1.  
    <VirtualHost *:80>
  2.  
    ServerName pgadmin.cn
  3.  
    # 自带内容
  4.  
    </VirtualHost>

如下图:

 

posted @ 2020-10-29 13:38  疯子110  阅读(459)  评论(0编辑  收藏  举报