postgreSQL和postGis安装笔记

前端之家收集整理的这篇文章主要介绍了postgreSQL和postGis安装笔记前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1.Postgresql安装配置

1)所需安装包:

Postgresql-8.2.6.tar.gz

Proj-4.6.0.tar.gz

Geos-3.0.0.tar.bz2

Postgis-1.3.2.tar.gz

2)首先安装Postgresql

#tar zxvf postgresql-8.2.6.tar.gz

#cd postgresql-8.2.6

#./configure –prefix=/usr/local/pgsql

#make

#make intal

3)Proj的安装:

#tar zxvf proj-4.6.0.tar.gz

#cd proj-4.6.0

#./configure –prefix=/usr/local/proj

#make;make install

4)Geos的安装

#tar zxvf geos-3.0.0.tar.bz2

#cd geos-3.0.0

#./configure –prefix=/usr/local/geos

#make;make install

5)Postgis的安装

#tar zxvf postgis-1.3.2.tar.gz

#cd postgis-1.3.2

#LDFLAGS=-lstdc++ ./configure --prefix=/user/local/postgis --with-pgsql=/usr/local/pgsql/bin/pg_config --with-proj=/usr/local/proj --with-proj-libdir=/usr/local/proj/lib --with-geos=/usr/local/geos/bin/geos-config --with-geos-libdir=/usr/local/geos/lib

#make;make install

2.环境变量配置

1)#vi ~/.bash_profile

2)增加环境变量:

PGLIB =/ usr / local / pgsql / lib
PGDATA
=$ HOME / pgsql_data
PGsql_HOME
=/ usr / local / pgsql
PROJ_HOME
=/ usr / local / proj
GEOS_HOME
=/ usr / local / geos
POSTGIS_HOME
=/ usr / local / postgis
LD_LIBRARY_PATH
=$ PGsql_HOME / lib: $ PROJ_HOME / lib: $ GEOS_HOME / lib: $ POSTGIS_HOME / lib
MANPATH
=$ MANPATHH . GBK
exportPGLIBPGDATAPGsql_HOMEPROJ_HOMEGEOS_HOMEPOSTGIS_HOMELD_LIBRARY_PATH
原文链接:https://www.f2er.com/postgresql/197385.html

猜你在找的Postgre SQL相关文章