Created
May 9, 2016 13:38
-
-
Save jadercorrea/bd9c21067ae590059e9fb152b4a1387b to your computer and use it in GitHub Desktop.
Postgres install commands for Elementary OS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Postgres | |
$ sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list" | |
$ wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - | |
$ sudo apt-get update | |
$ sudo apt-get install postgresql-common | |
$ sudo apt-get install postgresql-9.3 libpq-dev | |
$ sudo -u postgres createuser username -s | |
Acessar postgres: | |
$ sudo -u postgres psql | |
Mudar senha: | |
postgres=# \password username | |
Sair: | |
\q |
Worked perfectly for me thank you so much @jadecorrea just a small doubt where do we enter for username and password
Had to do a bit of modification to the commands to work in elementary OS 6.1 Jólnir.
- Replaced
precise
tofocal
(Ubuntu 20.04 LTS):
sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
- Replaced
postgresql-9.3
topostgresql-9.6
(version latest i see at the time of writing)
sudo apt-get install postgresql-9.6 libpq-dev
Every other command is the same.
thanks...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Glad to hear that, @marcos-costa.