|
<div id="cnblogs_post_body">首先安装一些依赖
apt-get update
apt-get install gcc
apt-get install zlib1g-dev
apt-get install g++
apt-get install libxml2
apt-get install libxml2-dev
apt-get install libgdal1-dev
1、安装postgresql
wget http://ftp.postgresql.org/pub/source/v9.1.4/postgresql-9.1.4.tar.gz
mkdir /usr/local/pgsql
tar -zxvf postgresql-9.1.4.tar.gz
cd postgresql-9.1.4
./configure -prefix=/usr/local/pgsql --without-readline
make
make install
2、安装geos
mkdir /usr/local/geos
wget http://download.osgeo.org/geos/geos-3.3.5.tar.bz2
tar jxf geos-3.3.5.tar.bz2
cd geos-3.3.5
./configure -prefix=/usr/local/geos
make
make install
3、安装proj4
mkdir /usr/local/proj4
wget http://download.osgeo.org/proj/proj-4.8.0.tar.gz
tar zxf proj-4.8.0.tar.gz
cd proj-4.8.0
./configure -prefix=/usr/local/proj4
make
make install
4、安装postgis
mkdir /usr/local/postgis
wget http://postgis.refractions.net/download/postgis-2.0.1.tar.gz
tar zxf postgis-2.0.1.tar.gz
cd postgis-2.0.1
./configure -prefix=/usr/local/postgis --with-pgconfig=/usr/local/pgsql/bin/pg_config --with-geosconfig=/usr/local/geos/bin/geos-config --with-projdir=/usr/local/proj4
PostGIS is now configured for x86_64-unknown-linux-gnu -------------- Compiler Info ------------- C compiler: gcc -g -O2 C++ compiler: g++ -g -O2 SQL preprocessor: /usr/bin/cpp -traditional-cpp -P -------------- Dependencies -------------- GEOS config: /usr/local/geos/bin/geos-config GEOS version: 3.3.5 GDAL config: /usr/bin/gdal-config GDAL version: 1.6.3 PostgreSQL config: /usr/local/pgsql/bin/pg_config PostgreSQL version: PostgreSQL 9.1.4 PROJ4 version: 48 Libxml2 config: /usr/bin/xml2-config Libxml2 version: 2.7.6 JSON-C support: yes PostGIS debug level: 0 Perl: /usr/bin/perl --------------- Extensions --------------- PostGIS Raster: enabled PostGIS Topology: enabled -------- Documentation Generation -------- xsltproc: xsl style sheets: dblatex: convert: mathml2.dtd: http://www.w3.org/Math/DTD/mathml2/mathml2.dtd |
|