在CentOS上配置pgAdmin的步骤如下:
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libzstd-1.5.2-1.el7.x86_64.rpm
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/l/llvm5.0-devel-5.0.1-7.el7.x86_64.rpm
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/l/llvm5.0-5.0.1-7.el7.x86_64.rpm
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/l/llvm5.0-libs-5.0.1-7.el7.x86_64.rpm
yum install -y ./libzstd-1.5.2-1.el7.x86_64.rpm
yum install -y centos-release-scl-rh llvm5*
yum install -y epel-release
sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo yum install -y postgresql15-server postgresql15-devel
sudo /usr/pgsql-15/bin/postgresql-15-setup initdb
sudo systemctl enable postgresql-15
sudo systemctl start postgresql-15
sudo systemctl restart postgresql-15
sudo systemctl status postgresql
tar -xvf pgadmin4-x.x.x-linux-x64.tar.gz -C /opt
echo 'export PATH=$PATH:/opt/pgadmin4/bin' >> ~/.bashrc
source ~/.bashrc
pgadmin
并按回车键启动pgAdmin。在pgAdmin的浏览器界面中,点击左上角的“+”号,选择“Servers”。
点击“Create”创建一个新的服务器。
在“General”选项卡中,输入以下信息:
点击“Save”按钮保存设置。
双击新创建的服务器以连接到PostgreSQL数据库。
请注意,以上步骤可能因CentOS版本和PostgreSQL版本的不同而略有差异。建议参考官方文档以获取最准确的信息。