Installing Postgres
Installing Postgres

Setting Up The Postgresql Database

Install Postgres

If you are using ubuntu 16.04 this is very easy to set up. First thing is to update your system:

sudo apt-get update

Now use apt-get to install Postgres:

sudo apt-get install postgresql postgresql-contrib

Check that Postgres is installed by opening another terminal and switch to the default Postgres user:

sudo -i -u postgres

Then log into Postgres:

psql

You can also access Postgres without switching accounts using this command:

sudo -u postgres psql

While in the Postgres terminal, create a password for the Postgres user:

\password postgres

Create a new user

While logged in as the Postgres’ default user you can create new users and adjust their roles.

postgres@satalite2:~$createuser --interactive

Or if you did not switch accounts:

sudo -u postgres createuser --interactive

Database GUI

I found DBeaver is the easiest to install on Ubuntu here is the link:

Once DBeaver installs select Postgres. Then connect to your database using the password you created.

Host is localhost and database and User are set to postgres
['Brian Mayrose']
['Postgresql', 'Development', 'Postgres', 'Tutorial', 'Ubuntu']