Basic Server Setup
To start off, we need to change the PostgreSQL postgres user password; we will not be able to access the server otherwise. As the “postgres” Linux user, we will execute the psql command.
In a terminal, type:
Dapper
sudo -u postgres psql template1
Gutsy/Hardy
sudo -u postgres psql postgres
Then, at the new prompt type these two commands, replacing <***password***> with the new password (keep this safe ) :
ALTER USER postgres WITH ENCRYPTED PASSWORD ' <***password***> ';
\q
Create database
To create the first database, which we will call "mydb", simply type :
sudo -u postgres createdb mydb
Comments