The above SQL query sets the user password to demoPassword. So, let’s set the password for the postgres user: postgres=# ALTER USER postgres PASSWORD 'demoPassword' This is an admin user of PostgreSQL and it gets created during the installation process.Īllowing administrative access to the database without any password isn’t a good idea. In this example, we have used the postgres user. In the above output, the postgres=# prompt indicated the active connection with the PostgreSQL server. Let’s see this in action using the psql utility: $ sudo -u postgres psql Here, we can see that the version of PostgreSQL is 15.īy default, we can connect to the PostgreSQL server without using any password. Next, let’s verify that the PostgreSQL service is up and running: $ sudo systemctl status postgresqlįinally, check the PostgreSQL version using the psql command line utility: $ psql -version Let’s install the PostgreSQL client and server using the below apt command: $ sudo apt install postgresql postgresql-client -y The postgresql package installs the default version of the PostgreSQL database server whereas the postgresql-client package installs the client utility. 2) Install PostgreSQL 15 Database Server and Client The above command will take a few seconds to complete. We can achieve this using the apt update command as shown below: $ sudo apt update To begin, let’s fetch the latest versions of the packages. $ wget -qO- | sudo tee /etc/apt//pgdg.asc &>/dev/null $ sudo sh -c 'echo "deb $(lsb_release -cs)-pgdg main" > /etc/apt//pgdg.list' PostgreSQL 15 package is not available in the default package repository, so enable its official package repository using following commands. Without any further delay, let’s deep dive into PostgreSQL 15 installation steps, 1) Enable PostgreSQL Package Repository The actual hardware configuration will vary with data volume. Please note that this is a minimal requirement for the demo environment.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |