2020年06月24日

PostgreSQL12 CentOS8 dnf Install

PostgreSQL12 Install


Linux downloads (Red Hat family)

https://www.postgresql.org/download/linux/redhat/
1.png

 
1.
dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm2.
2.png
2.
dnf -qy module disable postgresql
3.png
3.
dnf install -y postgresql12-server
4.png
4.
/usr/pgsql-12/bin/postgresql-12-setup initdb5.
5.png
5.
systemctl enable postgresql-126.
systemctl start postgresql-12
6.png

6. \l
7.png








# Install the repository RPM:
dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm

# Disable the built-in PostgreSQL module:
dnf -qy module disable postgresql

# Install PostgreSQL:
dnf -y install postgresql12-server

# Optionally initialize the database and enable automatic start:
/usr/pgsql-12/bin/postgresql-12-setup initdb
systemctl enable postgresql-12
systemctl start postgresql-12

 su postgres
 psql
 \l
 alter role postgres with password 'dbPasswd123';
 create database testdb1;
 \q

firewall-cmd --add-port=5432/tcp --zone=public --permanent
firewall-cmd --reload
systemctl restart postgresql-12

posted by a23 at 15:44| Comment(0) | PostgreSQL
この記事へのコメント
コメントを書く
お名前: [必須入力]

メールアドレス: [必須入力]

ホームページアドレス: [必須入力]

コメント: [必須入力]

認証コード: [必須入力]


※画像の中の文字を半角で入力してください。