#Introduction.
Depending on the operating system that you are using, there are several command line tools that you can use to install PostgreSQL on a Linux server. These include popular tools like Git Bash, Tabby, ConEmu, PowerShell among others.
My favorite command tool editor is Git Bash but the command lines outlined below should work just fine with the other tools.
#Preparing your terminal for installation.
First you need to update your terminal. To update, open Git Bash and enter the code 'sudo apt update' and then enter.
Secondly, once the above command runs successfully, you need to upgrade the terminal by keying in and running the command line, 'sudo apt upgrade -y'.
#Installation Command Lines.
There are two versions of PostgreSQL databases that you need to install in your machine: PostgreSQL and PostgreSQL -contrib. The first one is the standardized open-source database system, and the second one refers to a community modified and enhanced database system.
To install the above databases, just enter and run the following command line on your editor: 'sudo apt install PostgreSQL PostgreSQL -contrib'.
#Activation of the PostgreSQL database.
Congratulations! You have installed PostgreSQL successfully on the server. Now is the time to kickstart and enable your database by running the command lines below chronologically:
'sudo systemctl start PostgreSQL'
'sudo systemctl enable PostgreSQL'
Once the above commands run successfully, you can finally check the status of your installation by running the command line:
'sudo systemctl status PostgreSQL'
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)