# vim /etc/yum.repos.d/CentOS-Base.repo [base] ... exclude=postgresql* [updates] ... exclude=postgresql* # yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm # yum install -y postgresql13-server # /usr/pgsql-13/bin/postgresql-13-setup initdb # systemctl start postgresql-13 && systemctl enable postgresql-13
Create database
# sudo -u postgres createdb database_name
(On Linux systems, there is no default password set)
# sudo -u postgres psql postgres \password postgres <new_password> <new_password> \q