PostgreSQL 9.2 version is common in the repos, you can install this version if you want.
First, we download the postgresql 13 repo as follows.
1 |
yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm |
If you get an error like below while installing.
You can use the article named llvm-toolset-7 installation.
1 |
https://dbtut.com/index.php/2021/12/20/how-to-install-llvm-toolset-7-on-centos/ |
Error: Package: postgresql13-devel-13.0-1PGDG.rhel7.x86_64 (pgdg13)
Requires: llvm-toolset-7-clang >= 4.0.1
You could try using –skip-broken to work around the problem
We pass the problem by installing llvm-toolset-7 and we install our service by running the following command.
1 |
yum install -y postgresql13 postgresql13-devel postgresql13-contrib postgresql13-libs postgresql13-server -y |
After our service is installed, with the help of the following command, we ensure that the files required for our cluster are installed in the default directory with the help of the following command.
If you want to install the cluster files in a different directory, you can use the PostgreSQL 11 Installation article.
1 |
/usr/pgsql-13/bin/postgresql-13-setup initdb |
1 |
systemctl enable postgresql-13 |
Our service is enabled. Let’s start our postgresql-13 service with the help of the command below.
1 |
systemctl start postgresql-13 |
Our PostgreSQL 13 service is running and ready to be used.