在 Ubuntu 上启动 pgAdmin 的方式,取决于你是怎么安装的(桌面版 pgAdmin 4 还是 Web 版 pgAdmin 4)。下面分别说明:
pgadmin4
或
pgadmin4-desktop
如果命令不存在,说明你可能装的是 Web 版。
sudo systemctl start pgadmin4
设置开机自启(可选):
sudo systemctl enable pgadmin4
打开浏览器,访问:
http://localhost/pgadmin4
或
http://127.0.0.1/pgadmin4
pgadmin4
或手动运行:
python3 -m pgadmin4
查看监听端口:
sudo netstat -tulnp | grep 80
检查服务状态:
sudo systemctl status pgadmin4
sudo systemctl status postgresql
127.0.0.1 或 localhost如果你愿意,可以告诉我:
我可以给你更准确的一步到位命令。