Skip to content

Instantly share code, notes, and snippets.

@mraxus
Forked from bradrydzewski/install.sh
Last active August 29, 2015 14:03
Show Gist options
  • Save mraxus/154c2d5b8bc3135a5706 to your computer and use it in GitHub Desktop.
Save mraxus/154c2d5b8bc3135a5706 to your computer and use it in GitHub Desktop.
#!/bin/bash
# remove existing 9.1 installation
sudo /etc/init.d/postgresql stop
sudo apt-get --force-yes -fuy remove --purge postgresql postgresql-9.1 postgresql-client
# install zip
sudo apt-get install -y zip
# install 9.3
sudo apt-get install python-software-properties
sudo add-apt-repository 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main'
sudo apt-get update
sudo apt-get install -y postgresql-9.3 postgresql-contrib
# update the postgres config files
sudo /bin/bash -c "cat <<EOF > /etc/postgresql/9.3/main/pg_hba.conf
local all postgres trust
local all all trust
host all all 127.0.0.1/32 trust
host all all ::1/128 trust
EOF"
# restart
sudo /etc/init.d/postgresql restart
@mraxus
Copy link
Author

mraxus commented Jul 14, 2014

Modified Brads install script by adding 'postgresql-contrib'.
Needed for PSQL to use EXTENSIONs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment