apt update
apt install postgresql -y

 

这个会安装psql server同时也会安装psql client

 

 

postgreSQL - install postgressql in Ubuntu_ip地址

 

 

如果从internet访问这个postgreSQL database,即使ip地址放开,也无法ping通,但是可以通过psql来访问

postgreSQL - install postgressql in Ubuntu_客户端_02

 

 

 

connect to remote database:

psql -U xman@mypostgresql888 -h mypostgresql888.postgres.database.azure.com -d postgres

 

 

postgreSQL - install postgressql in Ubuntu_sql_03

 

 

 

可以单独安装psql 客户端:

 

apt install postgresql-client-common

 apt install postgresql-client-*

 

 

 

 

 

 

 

 

tcpping 测试结果:

 

postgreSQL - install postgressql in Ubuntu_客户端_04