以下是在Linux上配置pgAdmin的一般步驟:
sudo apt update。sudo apt install curl ca - certificates gnupg。curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt - key add,sudo sh - c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list',然后apt update。sudo apt install pgadmin4。sudo dnf install https://dl.fedoraproject.org/pub/epel/epel - release - latest - 9.noarch.rpm。sudo dnf install -y https://ftp.postgresql.org/pub/pgadmin/pgadmin4/yum/pgadmin4 - redhat - repo - 2 - 1.noarch.rpm。sudo dnf makecache。sudo dnf install pgadmin4 - y。/etc/pgadmin4/pgadmin4.conf,設置監聽端口等,如DEFAULT_SERVER = '0.0.0.0',SERVER_PORT = 5050等。sudo /usr/pgadmin4/bin/setup - web.sh,設置管理員郵箱和密碼。sudo systemctl start pgadmin4,并設置開機自啟sudo systemctl enable pgadmin4。sudo ufw allow 5050/tcp。http://your_server_ip:5050,使用之前設置的郵箱和密碼登錄。