mkdir /c/PostgreSQL
然后进入 c:\msys\1.0\home\XXX\sources
2.2下载 PostgreSQL 源代码 (8.0.0 version) 或者更高的版本
这里是8.0.0的下载地址 ftp://ftp2.fr.postgresql.org/pub/unix/postgresql/source/v8.0.0/postgresql-8.0.0.tar.gz
将你下载的代码放在 c:\msys\1.0\home\XXX\sources\PostgreSQL 这里。
进入msys然后执行:
cd ~/sources/PostgreSQL
tar xvzf postgresql-8.0.0.tar.gz
cd postgresql-8.0.0
configure --prefix=/c/PostgreSQL/8.0.0
make
make install
2.3.Geos and Proj
下载下面的软件 Geos and Proj
http://geos.refractions.net/geos-2.1.1.tar.bz2
ftp://ftp.remotesensing.org/proj/proj-4.4.9.tar.gz
把geos-2.1.1.tar.bz2和Proj-4.4.9.tar.gz 放在 c:\msys\1.0\home\XXX\sources\Geos 和c:\msys\1.0\home\XXX\sources\Proj
2.3.2. 编译
cd ~/sources/Geos
tar xvjf geos-2.1.1.tar.bz2
cd geos-2.1.1
configure --prefix=/c/PostgreSQL/8.0.0 && make && make install
cd ~/sources/Proj
tar xvzf proj-4.4.9.tar.gz
cd proj-4.4.9
configure --prefix=/c/PostgreSQL/8.0.0 && make && make install
还有可能需要ln这个命令进行映射,自己研究吧,详细的看编译的过程!
2.3.3.DLL creation
你必须建立两个(dll) 名字为: libproj.dll and libgeos.dll 在c:\PostgreSQL\8.0.0\lib 目录下cd /c/PostgreSQL/8.0.0/lib
PostGIS (version 1.0.0)下载地址:
http://postgis.refractions.net/postgis-1.0.0.tar.gz
将它移动到 c:\msys\1.0\home\XXX\sources\PostGIS 目录中去
2.4.2.Compilation and Installation
进入msys然后执行下面的命令
cd ~/sources/PostGIS
tar xvzf postgis-1.0.0.tar.gz Form MinGW, do the followings
cd ~/sources/PostGIS/postgis-1.0.0
configure --enable-autoconf --with-geos=/c/PostgreSQL/8.0.0/bin/geos-config \
--with-proj=/c/PostgreSQL/8.0.0 \
--with-pgsql-src=/home/$USERNAME/sources/PostgreSQL/postgresql-8.0.0 --prefix=/c/PostgreSQL/8.0.0
Form MinGW, do the followings
cd ~/sources/PostGIS/postgis-1.0.0
configure --enable-autoconf --with-geos=/c/PostgreSQL/8.0.0/bin/geos-config \
--with-proj=/c/PostgreSQL/8.0.0 \
--with-pgsql-src=/home/$USERNAME/sources/PostgreSQL/postgresql-8.0.0 --prefix=/c/PostgreSQL/8.0.0 Form MinGW, do the followings
cd ~/sources/PostGIS/postgis-1.0.0
configure --enable-autoconf --with-geos=/c/PostgreSQL/8.0.0/bin/geos-config \
--with-proj=/c/PostgreSQL/8.0.0 \
--with-pgsql-src=/home/$USERNAME/sources/PostgreSQL/postgresql-8.0.0 --prefix=/c/PostgreSQL/8.0.0 $USERNAME - 就是你登陆的用户[windows平台]
继续执行下列命令: