Barra de espaço
Barra de espaço

This tutorial describes a detailed procedure showing how to perform the installation of PostgreSQL on a computer running Ubuntu or Debian operating system 

YOUTUBE

In our channel you can view the video of this tutorial.



DATE & TIME

Follow the steps shown in the video tutorial below to configure the correct date & time on your system.

 


Install PostgreSQL using the command below.

 

# apt-get install postgresql postgresql-client


Check in which IP address the PostgreSQL server is running with the command below.

# netstat -nl | grep -E "(Local|5432)"

 

Initially, the PostgreSQL service will only be running on the ip address localhost (127.0.0.1)

If you want to change all IP addresses the server, stop the Postgree service, locate your configuration file and edit it using the following commands.

# /etc/init.d/postgresql stop
# updatedb
# locate postgresql.conf

 

Edit the configuration file postgresql.conf and Change the listen_address line 127.0.0.1 to the value * and restart the service.

# /etc/init.d/postgresql restart


To test your setup try to connect as postgres user to the database service Postgre using the commands below.

# su postgres
# psql


Use the commands below to change the password for the user postgres.

\password postgres
\q

 

Try to connect again with the command below.

# psql -h 127.0.0.1 -U postgres


CONCLUSION

This tutorial showed the intallation of PostGreSQL.