2020年06月24日

CentOS 8 PostgreSQL12 dnf

Linux downloads (Red Hat family) 

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





# 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