


Cat postgres and SSL Passwords from auth. Sed -i.save 's/enabled=0/enabled=1/' /etc//CentOS-PowerTools.repo Install Prerequisites and Create auth.txt File Sed -i.save '/\/a\exclude=postgresql*' /etc//CentOS-Base.repo # This can be used for previous versions by adjusting the PG_VER below. Know more about– how to create a Database on PostgreSQL.# This script will install PostgreSQL 13 on CentOS 8 Note: Replace your-passwordin the above with a secure password that you want to set for the admin database user. Now, change the Admin database password- psql -c "ALTER USER postgres WITH PASSWORD ' your-password' " Login using Postgres system account- su - postgres To make sure our PostgreSQL is secured with a strong password, set a password for its system user and then default database admin user account using below given commands-Ĭhange user password sudo passwd postgres sudo systemctl start postgresql-13Ĭheck the status of the Service. The best place to get the latest binaries for both PostgreSQL and PostGIS is the PostgreSQL Yum repository Refer to Installing PostGIS 3.1 and PostgreSQL 13.

We have successfully initialized the Database, it’s time to start and enable the Database service so that it can start automatically after every system reboot. sudo /usr/pgsql-13/bin/postgresql-13-setup initdb sudo yum install postgresql13 postgresql13-serverĪfter installation, let’s initialize the PostgreSQL Database using initdb that will create a new PostgreSQL database cluster refers to a collection of databases managed by a single server instance. The thing we need to get this Database server’s version 13 is already in place, now it’s time to simply run the installation command to get the Server and Client packages. Command to install PostgreSQL on Amazon Linux 2

This will let Amazon Linux 2 know that we have recently added a new repo. Once you have added the repository using the command given above, just use the Yum Package manager to run the system update command. Name=PostgreSQL 13 for RHEL/CentOS 7 - x86_64 Just paste the below given whole block of command and hit the E nter key. Packages to install the latest stable PostgreSQL 13 database server & client (while writing the article) on Amazon Linux 2 are not available via the core repository. Secure PostgreSQL default Database Postgresql 13 installation on AWS Ec2 Amazon Linux 2 1.
