加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

postgreSQL和postGis安装笔记

发布时间:2020-12-13 18:00:57 所属栏目:百科 来源:网络整理
导读: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

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读