安裝步驟
Ubuntu 16.04
deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main
Ubuntu 18.04
deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main
更新並安裝
wget --uiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - sudo apt-get update apt-get install postgresql-11
修改設定檔
修改連線數 - postgresql.conf
max_connections = 2000
白名單 - pg_hba.conf
host all all 0.0.0.0/0 trust
其他指令
Mac 安裝 Client
brew install libpq
Client 遠端登入指令
psql -h [HOSTNAME] -p [PORT] -U [USERNAME] -W -d [DATABASENAME]
版本確認
psql —version