Skip to content

Instantly share code, notes, and snippets.

@jenlij
Created August 20, 2017 18:16
Show Gist options
  • Save jenlij/a6e1b6229a681af25e309c46d4ace55e to your computer and use it in GitHub Desktop.
Save jenlij/a6e1b6229a681af25e309c46d4ace55e to your computer and use it in GitHub Desktop.
$ sudo apt-get install postgresql postgresql-contrib
$ sudo -i -u postgres
$ psql
$ create role ubuntu;
$ alter role ubuntu with superuser;
$ alter role ubuntu with createdb;
$ alter role ubuntu with login;
$ \q
$ exit
$ sudo vim /etc/postgresql/9.5/main/pg_hba.conf
(In pg_hba.conf, find the rows labeled IPv4 and IPv6, and change 'md5' to 'trust')
$ sudo systemctl restart postgresql
$ psql -f schema.sql ubuntu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment