Mapserver/PostgreSQL/PostGIS Upgrades on Linux system

david techer davidtecher at YAHOO.FR
Thu Sep 29 19:39:23 EDT 2005


Hi Shanti

All I can do is to give you few changes/infos between commands for PostGIS > 0.X.X..

I try give few information for PostGIS+Geos+Proj+PostgreSQL but I think you know it already ;-)

If I tell a mistake here, thanks to make/give a better info ;-)

First thing to knwo is that postgis geo data are not storing in WKB format
but in WKB format for PostGIS >= 1.0.0. So please see information from PostGIS Web Site at
http://postgis.refractions.net/docs/ch04.html#RefObject...Once you have upgraded your data
in order to see these in your pgtool like pgadmin3, you will have to use a fonction like
AsEWKT(the_geom) to see WKT format...

POSTGIS:

For PostGIS < 1.0.X, I've had to open postgis-0.X.X/Makefile and I did USE_GEOS=1 and USE_PROJ=1

Nowadays you have to use ./configure with a few option..that's the second difference!

Then for upgrading from 0.8.2 to 1.0.X I don't want to do a mistake. So it's better 
for you sending a e-mail to postgis-mailing-list to know if there will be a problem or not. 
Because I don't know how huge are your data..I don't want to be responsible for an error ...Thanks!

POSTGRESQL:

Since july, PostgreSQL has been frozen for beta test for 8.1...Personnaly, I test it on my personal computer but for a stable
work (if it is your case) it's better for you using 8.0.3 

MAPSERVER and PHP:

MapServer 4.6.1 and PHP 5.0.5 worked for me! (I'm on a Debian...)...PHP built as a CGI as usual!


example for PostGIS 1.0.4 + PROJ 4.4.9 and GEOS 2.1.4:
#
# Create a directory for sources to download
#
export PATHSOURCES=${HOME}/${USERNAME}/sources
mkdir -p ${PATHSOURCES}
#
cd sources
#
#  PROJ will be as you know wil be install in /usr/local
# So ensusre that /usr/local/bin is in your ${PATH}
# Actually yes!
#
wget ftp://ftp.remotesensing.org/proj/proj-4.4.9.tar.gz
tar xvzf proj-4.4.9.tar.gz
cd proj-4.4.9
./configure && make && make install
#
# GEOS will be as you know wil be install in /usr/local
#
cd ..
wget http://geos.refractions.net/geos-2.1.4.tar.bz2
tar xvjf geos-2.1.4.tar.bz2
cd geos-2.1.4
./configure && make && make install
#
# Be careful to have /usr/local/lib in your file /etc/ld/so/conf
#
cat /etc/ld.so.conf | grep ^'/usr/local'
#
#  Or else
#
echo /usr/local/lib >> /etc/ld.so.conf 
ldconfig
#
#  Test if proj is installed by doing
#
proj
#
# that will send you somethin like 
#
Rel. 4.4.9, 29 Oct 2004 ...
...
#
#  Test if geos is installed by doing
#
geos-config --version
#
# 
# that will send you something like 
#
2.1.4
#=======================================
#   POSTGRESQL
#
# If U install PostgreSQL on a new machine
#
#  delete dependes/install postgresql if it has been isntalled by rpm
rpm -qa postgresql 
rpm -e postgresql 
rpm -e --nodeps postgresql
#
#  Download PostgreSQL sources from www.postgresql.org
#   and install if
#
cd ${PATHSOURCES}
wget  ftp://ftp.fr.postgresql.org/source/v8.0.3/postgresql-8.0.3.tar.gz
tar xvzf postgresql-8.0.3.tar.gz
cd postgresql-8.0.3
configure --prefix=/usr/local --enable-multibyte --with-CXX --enable-nls [...others options...]
#
# Notice:I install postgresql in /usr/local in order not to have my PATH ;-) by adding /usr/local/pgsql
# Then as usual make && make install
make
make install
#==================================================================
#  POSTGIS
#
cd ${PATHSOURCES}
wget  http://postgis.refractions.net/download/postgis-1.0.4.tar.gz
tar xvzf postgis-1.0.4.tar.gz
cd postgis-1.0.4
configure --enable-autoconf --with-geos=`which geos-config` --with-proj=`which proj` \
--with-pgsql-src=${PATHSOURCES}/postgresql-8.0.3
make
make install

===================================================================

MAPSERVER and PHP

Install curl, gdal, pdflib and so on as u are used to doing it

Personaly I used old version:
- curl 7.10.5
- gd 2.0.15-1
- gdal 1.2.0
I think on Red Hat there are already rpm availablefor these!


Regards.


--david;
-------------------------------------------------
Jean David TECHER
01MAP
35 Allée d'Irlande
34080 Montpellier
France
Tél: 04 67 45 60 27
e-mail: davidtecher(at)yahoo(dot)fr
sites: http://www.postgis.fr
       http://techer.pascal.free.fr/postgis/
-------------------------------------------------



Shanti P. a écrit :

>We are currently running:  MapServer 4.2.5, PostgreSQL 7.4.3, PostGIS
>0.8.2, PHP/MapScript 4.3.7 and Apache 1.3 on Linux Red Hat 2.6.5. We need
>to permorm upgrades on all applications -- does anyone have
>recommendations as far as order of upgrades, or links to sites outlining
>upgrade procedures in more detail? We've looked at Refractions, PostgreSQL
>sites etc. and have ideas for individual upgrades but if anyone has any
>specific suggestions or problems to look out for we'd appreciate it.
>
>  
>

	

	
		
___________________________________________________________________________ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com



More information about the mapserver-users mailing list