![]() If you stuck or have any questions, please send us the message using below comments section. Perfect, above confirm that our PostgreSQL database is secure. Exit out of the PostgreSQL prompt by typing: q This will bring you back to the postgres Linux command prompt. Now, if you switch to postgres user it will prompt you to enter password every time. psql This will log you into the PostgreSQL prompt, and from here you are free to interact with the database management system right away. $ psql -c "ALTER USER postgres WITH PASSWORD 'your-password' " So, to secure the database, set the password to user postgres as shown below, $ sudo passwd postgres Example is shown below: $ sudo su - postgres So, to connect to database, first switch to user ‘postgres’ and enter psql command. When we install postgresql database then a user named “ postgres” is created automatically and can connect to database without password. Verify postgresql service status, run $ sudo systemctl status postgresql-15Ībove output confirms that postgreqsql service is up and running. Run following systemctl commands to start and enable postgresql service, $ sudo systemctl start postgresql-15 To initialize the database, run beneath command, $ sudo /usr/pgsql-15/bin/postgresql-15-setup initdb Once package installation is completed, verify the version by running following command, $ psql -V ![]() $ sudo dnf install postgresql15-server -yĪbove command will install postgresql server and its client. $ sudo dnf install -yĢ) Install PostgreSQL 15 on Rocky Linux 9Īs we have already configured postgresql repository, now we are all set to install postgresql 15, run $ sudo dnf update -y So, to install postgresql 15, add its repository by running following command from the terminal. In the default package repository of Rocky Linux 9, postgresql 13.7 is available. ![]() Without any further delay, let’s jump into the installation steps of PostgreSQL, 1) Enable PostgreSQL 15 Repository ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |