「Ubuntu使用」ubuntu pgAdmin4的安装
apt安装PostgreSql以后,没有自带的图形化管理工具,所以安装pgAdmin4并尝试连接。
pgAdmin4下载网址:https://www.pgadmin.org/download
我选择的是APT安装方式,然后有如下代码提示:
# # Setup the repository # #公钥下载,我下载的时候会提示是否覆盖,要选-是 # Install the public key for the repository (if not done previously): curl -fsS https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo gpg --dearmor -o /usr/share/keyrings/packages-pgadmin-org.gpg # Create the repository configuration file: 注册仓库 sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/packages-pgadmin-org.gpg] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update' # # Install pgAdmin # # Install for both desktop and web modes: sudo apt install pgadmin4 #以下是不同安装方式,参考。只是安装的话,执行到上一句就可以了。 # Install for desktop mode only: sudo apt install pgadmin4-desktop # Install for web mode only: sudo apt install pgadmin4-web # Configure the webserver, if you installed pgadmin4-web: sudo /usr/pgadmin4/bin/setup-web.sh