Install PostgreSQL on Ubuntu – New user and database in 3 commands

Installing PostgreSQL is trivially easy.

You just have to use the same name for linux user, database user and the database name.

$ sudo apt-get update
$ sudo apt-get -y install postgresql
$ sudo -u postgres createdb tero
$ sudo -u postgres createuser tero

Use your own login name instead of “tero”.

$ psql

Yes, that’s all. You can now start writing SQL.

Posted in Uncategorized | Tagged , , , , , , , , | Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Picks

  • Boxing Clock for AndroidOcton8 Diving T-ShirtsShaking Tower Panda Android GameLearn Chinese with Android
  • Student projects