Postgresql installation and create a user

Installing postgressql

$ sudo apt-get install postgresql

Installing pgadmin3

$ sudo apt-get install pgadmin3

To set password to the user postgres

$ sudo -u postgres psql postgres

postgres=# \password postgres

Create new user

$ sudo -u postgres createuser –superuser $USER

Set the password to the created user

$ sudo -u postgres psql

postgres=# \password $USER

Create database and go inside the database

$ createdb test

$ psql test



One thought on “Postgresql installation and create a user

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s