# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)
#Install the repository RPM:
sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
# Install PostgreSQL:
yum install postgresql12 postgresql12-server
EPELのインストール
sudo rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
PostGISインストール
yum install --enablerepo=epel postgis31_12
sudo /usr/pgsql-12/bin/postgresql-12-setup initdb
sudo systemctl enable postgresql-12
sudo systemctl start postgresql-12
# パスワード変更
sudo su - postgres
psql -c "ALTER USER postgres with password 'YourPassword'"
コメント