OpenGeo Suite在Ubuntu14.04下安装

OpenGeo Suite is a complete geospatial platform for managing data and building maps and applications across web browsers, desktops, and mobile devices. Built on leading open source geospatial software, OpenGeo Suite has a robust and flexible architecture that enables organizations to reliably manage and publish geospatial data.

OpenGeo Suite是完整的地理信息平台,可以用于管理数据和构建地图及跨浏览器、桌面和移动设备的应用程序。基于领先的开源地理信息软件,OpenGeo Suite有鲁棒的和复杂的架构可靠地管理和发布地理数据。

  • Manage and store data reliably with PostGIS 借助PostGIS管理和存储数据
  • Publish maps and data from a variety of formats and sources with GeoServer 借助GeoServer发布一系列格式和数据源的地图和数据
  • Build flexible user interfaces and custom workflows in the browser with OpenLayers 借助OpenLayers在浏览器中创建复杂的用户接口和自定义工作流
  • Analyze and publish geospatial data on the desktop with QGIS 借助QGIS在桌面上分析和发布地理数据
  • Access and edit data using open standards from top to bottom,从上至下使用开源标准接入和编辑数据
  • including OGC standards like WMS, WFS, WCS, and others.包括了WMS、WFS和WCS等OGC标准



系统需求()

OpenGeo Suite for Ubuntu Linux has the following system requirements:

  • Memory: 512MB minimum (1GB recommended)
  • Disk space: 750MB minimum (plus extra space for any loaded data)
  • Browser: Any modern web browser is supported
  • Permissions: Super user privileges are required for installation


预处理

The commands in this section require root privileges.

  1. Change to the root user:提权

    sudo su -
    
  2. Import the Boundless GPG key:导入GPG key

    wget -qO- https://apt.boundlessgeo.com/gpg.key | apt-key add -
    
  3. Add the OpenGeo Suite repository:导入OpenGeo Suite安装源

    • If installing OpenGeo Suite on Ubuntu 12:

      echo "deb https://apt.boundlessgeo.com/suite/latest/ubuntu/ precise main" > /etc/apt/sources.list.d/opengeo.list
      
    • If installing OpenGeo Suite on Ubuntu 14:

      echo "deb https://apt.boundlessgeo.com/suite/latest/ubuntu/ trusty main" > /etc/apt/sources.list.d/opengeo.list
      
安装

  1. Update the repository list:

    apt-get update
    
  2. Search for OpenGeo Suite packages to verify that the repository list is correct. If the command does not return any results, examine the output of theapt command for any errors or warnings.检查源里的内容

    apt-cache search opengeo
    
  3. You have options on what packages to install:

    Note

    See the Packages section for details of individual packages.

    • To install typical server components:

      apt-get install opengeo-server
      
    • To install typical client components:

      apt-get install opengeo-client
      
    • To install typical client and server components:

      apt-get install opengeo
安装之后

OpenGeo Suite is comprised of two main services:

OpenGeo Suite两大组件tomcat和postgresql: tomcat是Geoserver,GeoWebCache,GeoExplorer的容器。Postgresql是基于Postgis扩展的数据库。

  1. The Tomcat web server that contains all the OpenGeo web applications such as GeoServer, GeoWebCache, and GeoExplorer.
  2. The PostgreSQL database server with the PostGIS spatial extensions.

Note

The Tomcat service used by OpenGeo Suite is pulled in from standard repository sources, and is not specific to OpenGeo Suite.

Controlling the Tomcat service

To start/stop/restart the Tomcat service:

sudo service tomcat7 start|stop|restart

Other options in addition to the above are try-restart,force-restart, andstatus.

Controlling the PostgreSQL service

To start/stop/restart the PostgreSQL service:

sudo service postgresql start|stop|restart

Other options in addition to the above are reload,force-reload, and status.

Note

If you have multiple versions of PostgresSQL installed you can specify which version to control with a third argument. For example:

sudo service postgresql start 9.3

Service port configuration

The Tomcat and PostgreSQL services run on ports 8080 and 5432 respectively. These ports can often conflict with existing services on the system, in which case the ports must be changed.

Tomcat默认端口8080,修改的话在/etc/tomcat7/server.xml.

PostgreSQL默认端口5432,修改的话在/etc/postgresql/9.3/main/postgresql.conf.

Changing the Tomcat port

To change the Tomcat port:

  1. Edit the file /etc/tomcat7/server.xml.
  2. Search for 8080 (around line 71) and change theport attribute to the desired value.
  3. Restart Tomcat.

Changing the PostgreSQL port

To change the PostgreSQL port:

  1. Edit the file /etc/postgresql/9.3/main/postgresql.conf.
  2. Search or the port property (around line 63) and change it to the desired value.
  3. Restart PostgreSQL.

Working with Tomcat

OpenGeo Suite packages软件包目录位于  /usr/share/opengeo
JRE 指向目录使用的是  /etc/default/tomcat7 中的JAVA_HOME变量
Tomcat 目录位于  /etc/tomcat7 ,容器目录 /etc/tomcat7/Catalina/localhost/

Changing the Tomcat Java

If you wish to use the Oracle Java 7 JRE (rather than the OpenJDK 7 installed by default):

  1. Download and install Oracle Java 7 JRE.

  2. Open /etc/default/tomcat7 and update the JAVA_HOME environment variable.

    Note

    Make sure the line is uncommented (does not start with #).

  3. Save and close the file.

  4. Restart Tomcat.

Using OpenGeo Suite with custom Tomcat

OpenGeo Suite packages can be used to manage the contents /usr/share/opengeo components while making use of your own Tomcat application server.

  1. Install OpenGeo Suite.

  2. Stop your Tomcat service.

  3. Navigate to /etc/tomcat7/Catalina/localhost/.

  4. Create the geoserver.xml with the following content:

    <Context displayName="geoserver"
             docBase="/usr/share/opengeo/geoserver"
             path="/geoserver"/>
    
  5. Create the geowebcache.xml with the following content:

    <Context displayName="geowebcache"
             docBase="/usr/share/opengeo/geowebcache"
             path="/geowebcache"/>
    
  6. Create the dashboard.xml with the following content:

    <Context displayName="dashboard"
             docBase="/usr/share/opengeo/dashboard"
             path="/dashboard"/>
    
  7. Create the geoexplorer.xml with the following content:

    <Context displayName="geoexplorer"
             docBase="/usr/share/opengeo/geoexplorer"
             path="/geoexplorer"/>
    
  8. Create the docs.xml with the following content:

    <Context displayName="docs"
             docBase="/usr/share/opengeo/docs"
             path="/docs"/>
    
  9. Restart Tomcat.

Adding other system parameters

You can add other system or application-specific parameters that will be picked up upon restart.

  1. Open /etc/default/tomcat7 in a text editor.
  2. Add the desired parameters to the bottom of the file.
  3. Save and close the file.
  4. Restart Tomcat.

Working with GeoServer

GeoServer Data Directory 是Geoserver存放配置和文件数据的目录,默认位置在 /var/lib/opengeo/geoserver.

Geoserver配置文件是 /usr/share/opengeo/geoserver/WEB-INF/web.xml,其中 GEOSERVER_DATA_DIR 指定了数据目录:

<context-param>
   <param-name>GEOSERVER_DATA_DIR</param-name>
    <param-value>/path/to/new/data_dir</param-value>
</context-param>

GeoServer Data Directory

The GeoServer Data Directory is the location on the file system where GeoServer stores all of its configuration, and (optionally) file-based data. By default, this directory is located at:/var/lib/opengeo/geoserver.

To point GeoServer to an alternate location:

  1. Edit the file /usr/share/opengeo/geoserver/WEB-INF/web.xml.

  2. Search for GEOSERVER_DATA_DIR section, uncomment, and change its value accordingly.

    <context-param>
       <param-name>GEOSERVER_DATA_DIR</param-name>
        <param-value>/path/to/new/data_dir</param-value>
    </context-param>
    
  3. Restart Tomcat.

Enabling spatial reference systems with Imperial units

A fix is available for spatial reference systems measured in Imperial units (feet). This setting is recommended for all users, and strongly recommended for those working withUS State Plane projections measured in feet.

To enable this fix:

  1. Add the following parameter to /etc/default/tomcat7:

    -Dorg.geotoools.render.lite.scale.unitCompensation=true
    
  2. Restart Tomcat.

Update GeoJSON output

GeoServer GeoJSON output is now provided in x/y/z order as required by the specification. In addition, thecrs output has changed to support full URN representation of spatial reference systems:

"crs": {
   "type": "name",
   "properties": {
      "name": "urn:ogc:def:crs:EPSG::4326"
   }
}

Note

Previously, the output was:

"crs": {
   "type": "EPSG",
   "properties": {
      "code": "4326"
   }
}

To restore the previous crs representation for compatibility reasons (especially when working with OpenLayers 3):

  1. Add the following context parameter to /usr/share/opengeo/geoserver/WEB-INF/web.xml:

    <context-param>
        <param-name>GEOSERVER_GEOJSON_LEGACY_CRS</param-name>
        <param-value>true</param-value>
    </context-param>
    
  2. Restart Tomcat.

PostgreSQL configuration

PostgreSQL configuration is controlled within the postgresql.conf file. This file is located at /etc/postgresql/9.3/main/postgresql.conf.


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值