rpm -ivh https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm # PostgreSQL 11 yum -y install postgresql11-server postgresql11-contrib # init db /usr/pgsql-11/bin/postgresql-11-setup initdb # enable / start systemctl enable postgresql-11 systemctl start postgresql-11
# 切換 user sudo -i -u postgres # 進入 PostgreSQL psql