Last active
August 29, 2015 13:56
-
-
Save mriddle/8838982 to your computer and use it in GitHub Desktop.
Upgrades postgres 9.1 to 9.3 with PostGIS 2.1 on Ubuntu (precise)
This file contains hidden or 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
| echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | sudo tee -a /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 upgrade | |
| sudo apt-get install postgresql-9.3 postgresql-9.3-postgis-2.1 postgresql-contrib-9.3 libpq-dev postgresql-9.3-postgis-2.1 | |
| cd /tmp | |
| sudo service postgresql stop | |
| sudo -H -u postgres /usr/lib/postgresql/9.3/bin/pg_upgrade \ | |
| -b /usr/lib/postgresql/9.1/bin \ | |
| -B /usr/lib/postgresql/9.3/bin \ | |
| -d /var/lib/postgresql/9.1/main \ | |
| -D /var/lib/postgresql/9.3/main \ | |
| -o ' -c config_file=/etc/postgresql/9.1/main/postgresql.conf' \ | |
| -O ' -c config_file=/etc/postgresql/9.3/main/postgresql.conf' | |
| sudo service postgresql start |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To disable a pg cluster - change
autotodisabledin/etc/postgresql/9.1/main/start.confLook at using pg_upgrade with
--jobsand--linksto speed up upgrade