If we don't already have PostgreSQL installed, we must install it.sql
$ sudo apt-get install postgresqlThis command installs the PostgreSQL server and various other packages.
post
If we install the PostgreSQL database from packages, it is automatically added to the start up scripts of the operating system. If we are only learning to work with the database, it is unnecessary to start the database each time we boot the system. The above command removes any system startup links for the PostgreSQL database.
spa
We check if the PostgreSQL server is running. If not, we need to start the server.
rest
On Ubuntu Linux we can start the server with the service postgresql start command.
postgresql
We use the service postgresql stop command to stop the PostgreSQL server.server
$ sudo service postgresql restart
ip
Stopping postgresql-9.5 service: [ OK ]rem
Starting postgresql-9.5 service: [ OK ]get
We use the service postgresql restart command to restart the PostgreSQL server.
it