![]() It is recommended to create a new user and grant privileges as needed for the databases that we consume. Because this user will have the default access privileges to all the default databases, templates in the PostgreSQL server. It is recommended not to enable password for this user. Once we successfully install PostgreSQL 12 on Ubuntu, a default user for PostgreSQL is created with the username postgres without any password. Sudo systemctl restart postgresql Create user and database in PostgreSQL This can be done by running the following command sudo systemctl daemon-reload We won’t be changing any of these files but we are interested in knowing that these files will allow you to custom configure the installation of PostgreSQL database server.Īlso it is to be noteworthy to understand that a reload of database server is required that makes any changes are effective. The pg_hba.conf is located in /etc/postgresql/12/main/. You can play with various settings for logs, log rotations, timezones, max connections by altering the values in nf. psql -V Configure PostgreSQL 12 Database Server on UbuntuĪll the PostgreSQL configuration files are located in the /etc/postgresql/12/main/nf file. Type q to quit and return to access the command prompt again.Īlso verify the version of psql client by running the following command. Verify the version of PostgreSQL server by typing the following command sudo -u postgres psql -c 'select version() ' Run the following command to see PostgreSQL server’s status if its active. Verify the installation to see if the PostgreSQL database service is up and running successfully. If you want a specific version, use postgresql-12 or similar instead of postgresql: sudo apt -y install postgresql-12 Verify PostgreSQL 12 Installation on Ubuntu Install the latest version of PostgreSQL. Update the package lists apt a.k.a Advanced Packaging Tool by running the following command sudo apt update Import the repository signing key by running the following command wget -quiet -O - | sudo apt-key add. Run the following command to create the file repository configuration: sudo sh -c 'echo "deb $(lsb_release -cs)-pgdg main" > /etc/apt//pgdg.list' ![]() Once you are able to successfully access the terminal, run the following commands to install postgresql-12. Or you should be able to SSH to the Ubuntu OS.įor production facing deployments the GUI is not enabled as it is not required, so you at least should be able to SSH in to the box as a SUDO user.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |