sh 从源代码安装Debian Wheezy上的PostGIS和PGrouting

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 从源代码安装Debian Wheezy上的PostGIS和PGrouting相关的知识,希望对你有一定的参考价值。

#!/bin/bash

#install postgis 
apt-get install libxml++2.6-dev libgeos-3.3.3 libgeos-dev libgdal-dev gdal-bin libproj-dev binutils
wget http://postgis.refractions.net/download/postgis-2.0.0.tar.gz
tar xfvz postgis-2.0.0.tar.gz
cd postgis-2.0.0
./configure

make
sudo make install
sudo ldconfig
sudo make comments-install

sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/shp2pgsql
sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/pgsql2shp
sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/raster2pgsql

# install pgrouting
sudo apt-get install build-essential subversion cmake debhelper fakeroot postgresql-9.1-postgis postgresql-server-dev-9.1 libboost1.49-dev libcgal9 libcgal-dev
wget https://codeload.github.com/pgRouting/pgrouting/zip/pgrouting-2.0.0 -O pgrouting-2.0.0.zip
unzip pgrouting-2.0.0.zip
cd pgrouting-pgrouting-2.0.0/
mkdir build
cd build
cmake -L ..
make
sudo make install

# createdb -E UTF8 -T template0 --lc-collate=en_US.UTF-8 --lc-ctype=en_US.UTF-8 -D pg_default -O postgres routing;
# psql
# \c routing

# CREATE EXTENSION postgis;
# CREATE EXTENSION postgis_topology;
# CREATE EXTENSION pgrouting;

# CREATE EXTENSION postgis_sfcgal;
# CREATE EXTENSION fuzzystrmatch;
# CREATE EXTENSION address_standardizer;
# CREATE EXTENSION address_standardizer_data_us;
# CREATE EXTENSION postgis_tiger_geocoder;

以上是关于sh 从源代码安装Debian Wheezy上的PostGIS和PGrouting的主要内容,如果未能解决你的问题,请参考以下文章

sh 在Raspberry Pi上安装tmux 2.0(Debian 7.8)Raspbian Wheezy

sh 在Raspberry Pi上安装tmux 2.0(Debian 7.8)Raspbian Wheezy

sh 在Raspberry Pi上安装tmux 2.0(Debian 7.8)Raspbian Wheezy

sh 在debian wheezy中安装完整的ffmpeg(支持aac(m4a)和x264)

sh 在debian wheezy中安装完整的ffmpeg(支持aac(m4a)和x264)

sh 在debian wheezy中安装完整的ffmpeg(支持aac(m4a)和x264)