在ubuntu14.04上安装postgis1.5
来源:互联网 发布:手机音频格式转换软件 编辑:程序博客网 时间:2024/04/28 03:07
How to install PostGIS 1.5 on Ubuntu 14.04
我的项目比较老,原来用的是PosgGre9.1 +postgis1.5,新安装的时候找不到postgis1.5,只有2.0以上,我装了2.2,发现原来的数据备份不能导进去,也不能用原来的数据schema,也用不了了,怎么办呢,只呢去装postgis1.5,postgis1.5的地理信息相关的数据格式处理,在2.2里找不到了。
安装吧,找了一圈,一下步骤就来装吧
Several components are needed, which can either be built from source or installed from pre-built packages, as shown below.
1 ,如果你装了postgresql了,这一步就不用了,其实9.5也可以,不一定非要装8.4,Install prerequisite packages using:
sudo apt-get install build-essential postgresql-8.4 postgresql-server-dev-8.4 libxml2-dev proj
2,这个就是必须了 Optional packages for testing PostGIS:
sudo apt-get install libcunit1-dev
3,Optional packages for building documentation:
sudo apt-get install xsltproc docbook-xsl imagemagick
(for building PDF documentation, add dblatex, but expect a large download)
Build GEOS 3.3.x
PostGIS 1.5 requires GEOS >= 3.1.1, however Ubuntu 10.04 only has GEOS 3.1.0 available in packages, so it needs to be built from source.
There are multiple ways to build GEOS, but this is the simplest:
wget http://download.osgeo.org/geos/geos-3.3.8.tar.bz2tar xvfj geos-3.3.8.tar.bz2cd geos-3.3.8./configuremakesudo make install
Build PostGIS
Download, configure, build and install:
wget http://download.osgeo.org/postgis/source/postgis-1.5.8.tar.gztar xfvz postgis-1.5.8.tar.gzcd postgis-1.5.8./configuremakesudo make installsudo ldconfig
Documentation/comments
From the postgis-1.5.8 directory:
cd docmakesudo make installsudo make comments-install
Template
Complete a post-install by creating a template, which can be re-used for creating multiple spatially-enabled databases. Or if you just want to make one spatially enabled database, you can modify the commands for your needs.
sudo -u postgres createdb template_postgissudo -u postgres createlang plpgsql template_postgissudo -u postgres psql -d template_postgis -c "UPDATE pg_database SET datistemplate=true WHERE datname='template_postgis'"sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sqlsudo -u postgres psql -d template_postgis -f /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sqlsudo -u postgres psql -d template_postgis -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis_comments.sql
如果你装的是9.1以上就不一定非要用这个来测试,成功就好了,打开pgadmin,登录看看,远程也可哦!
See also ¶
- 在ubuntu14.04上安装postgis1.5
- 在Ubuntu12.04上安装postgresql9.1和postgis1.5
- 在Ubuntu12.04上安装postgresql9.1和postgis1.5
- catmaid 5d在Ubuntu14.04上的安装
- mapnik在ubuntu14.04上的安装
- 在ubuntu14.04上安装sogoupinyin
- 在ubuntu14.04上安装emacs24.4
- 在ubuntu14.04上安装python3.4.3
- 在 ubuntu14.04 上安装 clang 3.6
- 在ubuntu14.04上安装spacemacs
- 在Ubuntu14.04上安装OpenRAVE
- 在Ubuntu14.04上安装Hadoop
- 在ubuntu14.04上安装vmware12专业版
- 在Ubuntu14.04上安装Oracle JDK
- 在Ubuntu14.04上安装OpenRAVE
- 在ubuntu14.04上安装mysql
- 在Ubuntu14.04上安装GMT5
- Torch7在ubuntu14.04上的安装
- Struts中<s:select></s:select>标签使用介绍
- node.js 异步I/O
- Android实现手指滑动控件缩放
- 五险一金
- IBM MQ 消息队列生僻字解决方法
- 在ubuntu14.04上安装postgis1.5
- 87 - Scramble String(DP)
- R语言之创建数据集
- Linux下压缩解压缩命令详解
- JAVA初学者第一个程序“Hello World”常见的错误及处理方法
- Android OkHttp完全解析 是时候来了解OkHttp了
- git push -u origin XXX 报错
- 【HTML5】H5的新标签简介
- 横竖屏切换和contentView的三种显示方式