Just for the record. The EC2 instance I used was ami-ccf615 from http://alestic.com .
Once login (totally fresh).
apt-get update apt-get install vim
#The sources are still not available on the regular package servers... edit the sources vim /etc/apt/sources.list add deb http://ppa.launchpad.net/pitti/postgresql/ubuntu jaunty main deb-src http://ppa.launchpad.net/pitti/postgresql/ubuntu jaunty main sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8683D8A2 sudo apt-get update sudo apt-get install postgresql-8.4
#This changes the port from 5433 to 5432 sudo sed -i.bak -e 's/port = 5433/port = 5432/' /etc/postgresql/8.4/main/postgresql.conf sudo /etc/init.d/postgresql-8.4 stop sudo /etc/init.d/postgresql-8.4 start apt-get install postgresql-server-dev-8.4 libpq-dev apt-get install libgeos-dev wget http://postgis.refractions.net/download/postgis-1.4.0.tar.gz apt-get install proj tar xvfz postgis-1.4.0.tar.gz cd postgis-1.4.0 ./configure make make install sudo su postgres
#change the postgres password to "atlas" so that you can later login psql -c"ALTER user postgres WITH PASSWORD 'atlas'" createdb geodb (with password atlas) createlang -dgeodb plpgsql psql -dgeodb -f /usr/share/postgresql/8.4/contrib/postgis.sql psql -dgeodb -f /usr/share/postgresql/8.4/contrib/spatial_ref_sys.sql psql -dgeodb -c"select postgis_lib_version();"
#This should return 1.4.0
exit
13 comments:
Thanks. Ubuntu 9.10RC doesn't have postgis 1.4 packaged yet, so this was very useful.
psql -dgeodb -c"ALTER user postgres WITH PASSWORD 'atlas'"
I don't think this line is right. the geodb isn't created yet until the next line...
Thanks, this was very useful!
@nbv4 you are right. Just changed it
This was an enormous help!
Thanks very much.
thank you very much for this original tutorial that is the only which figure out this problem tnx :):)
This is *JUST* what I was looking for to get postgis 1.4 onto Karmic. Thank you so very much.
Nice post! Thank you!
thanks javier!
but I reckon postgresql repo is not working anymore.
adding 'deb http://archive.ubuntu.com/ubuntu jaunty-backports main universe multiverse restricted' to sources.list is not solving the problem.
is there any other source for postgresql 8.4?
Thank you for this orientation. It was very useful.
The ubuntugis ppa has compatible builds of postgis 1.5.1 for lucid
#add the repository (fetches pgp keys as well)
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
#change the postgres password to "atlas" so that you can later login
psql -c"ALTER user postgres WITH PASSWORD 'atlas'"
createdb geodb (with password atlas)
createlang -dgeodb plpgsql
psql -dgeodb -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql
psql -dgeodb -f psql -dgeodb -f /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql
psql -dgeodb -c"select postgis_lib_version();"
#This should return 1.5.1
exit
Thanks Kehan!
Post a Comment