ubuntu源码安装postgresql
<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 -O2C++ compiler: g++ -g -O2SQL preprocessor: /usr/bin/cpp -traditional-cpp -P-------------- Dependencies --------------GEOS config: /usr/local/geos/bin/geos-configGEOS version: 3.3.5GDAL config: /usr/bin/gdal-configGDAL version: 1.6.3PostgreSQL config: /usr/local/pgsql/bin/pg_configPostgreSQL version: PostgreSQL 9.1.4PROJ4 version: 48Libxml2 config: /usr/bin/xml2-configLibxml2 version: 2.7.6JSON-C support: yesPostGIS debug level:0Perl: /usr/bin/perl--------------- Extensions ---------------PostGIS Raster: enabledPostGIS Topology: enabled-------- Documentation Generation --------xsltproc: xsl style sheets: dblatex: convert: mathml2.dtd: http://www.w3.org/Math/DTD/mathml2/mathml2.dtd
页:
[1]