六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 678|回复: 0

ubuntu源码安装postgresql

[复制链接]

升级  32%

4

主题

4

主题

4

主题

童生

Rank: 1

积分
16
 楼主| 发表于 2013-1-4 02:28:55 | 显示全部楼层 |阅读模式
<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
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表