Installation Environment:
Ubuntu 64bit
PostgreSQL 9.0
1. Installing PostgreSQL
Enter the following command
sudo apt-get install PostgreSQL
You will be prompted to install the required disk space, enter "Y" and the Setup program will complete automatically. After installation, the system creates a database Superuser "Postgres" with a blank password. This user is both a non-logged operating system user and a database user.
2. Modify the password of Ubuntu user Postgres
Enter the following command
sudo passwd postgres
3. Modify the password of the database super user Postgres
1) switch to Ubuntu under Postgres user
sudo su postgres
2) Log in to the Postgres database
Psql Postgres
This way you will see the Postgres prompt message as follows:
Psql (9.0.0)
Type ' help ' for help.
and the command line prompt symbol for Postgres appears:
postgres=#
3) Enter the following command
ALTER USER postgres with PASSWORD ' PASSWORD '
Type "\q" to return to the Ubuntu command line.
PostgreSQL installs on Ubuntu