Friday, October 22, 2010

Postgis 1.4.* with postgresql 8.4 Ubuntu 9.10 /9.04

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

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

1 comment:

Pages

About Me

My photo
- A competent M.S. Software Engineer and B.E. (Comp) with 6 years of rich experience in Java/ C / C++ / Oracle/PHP/Postgresql/Mysql in IT industry.
- Resourceful in developing Applications with various platforms and different domains.
A strategic planner with expertise in designing internal control systems towards the accomplishment of corporate business goals.
- A keen analyst with exceptional relationship management skills and abilities in liaising with different clients.
- Team player with excellent analytical and communications skills.
Worked with development projects with software brands like Cognizant and Infosys
Specialties
- Master in struts
- Good hands on in core Java
- Understanding of other building blocks of Enterprise applications like middle ware technologies.
- Knowledge of database like Oracle,postgresql,mysql