-
-
Save mraxus/154c2d5b8bc3135a5706 to your computer and use it in GitHub Desktop.
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
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Modified Brads install script by adding 'postgresql-contrib'.
Needed for PSQL to use EXTENSIONs