Skip to content

Instantly share code, notes, and snippets.

@ayrilmaz
Last active July 12, 2021 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ayrilmaz/edb45e3b880d10350a388cdf256f8f82 to your computer and use it in GitHub Desktop.
Save ayrilmaz/edb45e3b880d10350a388cdf256f8f82 to your computer and use it in GitHub Desktop.
Install Postgres ubuntu
sudo apt install postgresql postgresql-contrib -y
sudo -u postgres psql
postgres=# ALTER USER postgres PASSWORD 'pass';
postgres=# \q
sudo nano /etc/postgresql/10/main/postgresql.conf
listen_addresses = '*'
sudo nano /etc/postgresql/10/main/pg_hba.conf
host all all 0.0.0.0/0 md5
sudo service postgresql restart
#remove
sudo apt-get --purge remove postgresql
dpkg -l | grep postgres
sudo apt-get --purge remove postgresql postgresql-doc postgresql-common
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment