PostgreSQL V15 Database Installation on RHEL8 (64 bit)
- Go to the PostgreSQL website and select the operating system family as per your requirements. Here for this demo, I’m going to select Linux. Once you select Linux, it will ask which Linux distribution you want to go with. Choose, Red Hat/Rocky/CentOS.
2. Select PostgreSQL Release as per your business requirements. In this demo, I’ll go with Release 15.
3. Select PostgreSQL release Version: 15
Select Platform Version: Red Hat Enterprise
Select platform architecture: x86_64
Once you select all those criteria, you will get the entire setup script, go ahead and copy that script for installation purposes.
4. Open the terminal -> Install the repository RPM to get our OS ready for PostgreSQL 15 installation.
5. Before going ahead with the installation of PostgreSQL, the user needs to perform one more additional step if one is using RHEL8 or CentOS 8.
Both the OS come with an in-build PostgreSQL repository which we need to disable first.
Execute below command to disable the in-built PostgreSQL repository.
6. Execute below command to install PostgreSQL15.
7. PostgreSQL15 has been successfully installed. To check, go to /usr/pgsql-15/bin: where all the executables are located.
8. What is the location of the data directory now?
In Windows, you can set the location of the data directory during software installation (See more), however, In Linux, the data directory location has been set as the default location automatically at the time of Installation, and you can change it later on.
The default data directory location in Linux is: /var/lib/pgsql/15 (Release Number)
9. During installation, a default superuser (postgres) has been created but needs to set its password.
10. Enable & start the PostgreSQL service.
11. Launch SQL shell(psql) and start working.
PostgreSQL15 has been successfully installed on RHEL8!
If you find value in the knowledge shared, your applause on my post would be greatly appreciated!
=====================================
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo dnf -qy module disable postgresql
sudo dnf install -y postgresql16-server
sudo /usr/pgsql-16/bin/postgresql-16-setup initdb
sudo systemctl enable postgresql-16
sudo systemctl start postgresql-16
Tidak ada komentar:
Posting Komentar