首页投稿(暂停使用,暂停投稿)

GEE Build Instructions[译]以及实践中遇到

2017-04-18  本文已影响0人  ZYJ2016

Google Earth Enterprise是谷歌地球的企业版,谷歌将其于2017年3月开源在Github。本文介绍GEE的安装步骤,译自github上的英文文档。
原文地址:Build Instructions
GEE包含三个核心组件:

这次开源的产品包括了GEE Fusion、GEE Server 和 GEE Portable Server,GEE Client 和 GE API并不开源;
但是,由于GEE Fusion和GEE Server开源了,所以图像和地形四叉树的实现开始支持第三方开发人员建立视图,用于访问GEE Server数据库。


目录


在Ubuntu 14.04 LTS 和 RHEL 7上搭建Fusion和Server组件

在Ubuntu或RHEL/CentOS都要运行这些命令

  1. 根据下面的指令为您的Linux操作系统安装git
  2. 根据https://git-lfs.github.com指定的指令安装git-lfs
  3. 用git克隆gee-os的repo
    方法一:一步克隆并下载LFS文件(可能较慢并易错)
    git clone git@github.com:<username>/earthenterprise.git
    方法二:两步克隆并下载LFS文件
    GIT_LFS_SKIP_SMUDGE=1 git clone git@github.com:<username>/earthenterprise.git cd earthenterprise git lfs pull
  4. 在下面的搭建说明中,搭建GEE/Fusion的scons指令中有下列选项:
  1. 根据你要使用的平台,进行下面的步骤
  2. 运行单元测试
    cd NATIVE-OPT-x86_64/bin/tests ./RunAllTests.pl
    或者运行一个个人测试

Ubuntu 14.04.5 LTS搭建步骤:

  1. 安装git:
    sudo apt-get install git (installs version 1.9.1)
    执行下列步骤以得到git的最新版本(1.9.1版本目的在于和repository进行交互,但是如果你想要下载最新版本的git,操作步骤陈述如下):
    sudo -i add-apt-repository ppa:git-core/ppa apt-get update apt-get install git
    这样安装的版本是2.11 注:在进行之前确认退出“sudo”
  2. 安装下列包(如果没有安装的话)
    sudo apt-get install gcc g++ scons automake autoconf libperl4-corelibs-perl libtool xorg-dev doxygen python-dev alien swig libgtest-dev libstdc++6 libxml2-dev gettext libxinerama-dev libxft-dev libxrandr-dev libxcursor-dev libgdbm-dev libc6 libc6-dev libmng-dev zlib1g-dev libcap-dev libpng12-0 libpng12-dev freeglut3-dev flex libx11-dev bison++ bisonc++ libjpeg-dev libjpeg8-dev python2.7 python2.7-dev libogdi3.2-dev libgif-dev libxerces-c-dev libgeos-dev libgeos++-dev libfreetype6 libfreetype6-dev python-imaging libproj-dev python-setuptools libgif-dev libxerces-c-dev libcap-dev libpq-dev openssl
    3.构建第三方库:比如:GEEDIR=/googleclient/geo/earth_enterprise
    cd $GEEDIR/src scons -j8 optimize=1 third_party
  3. third_party/python/SConscript构建Fusion/Earth Server:用sandbox路径替换-idirafter
    `scons -j8 optimize=1

RHEL 7搭建步骤

  1. 安装git
    推荐:安装最新版本的git:
    i. enable IUS repo More Info.
    cd /tmp wget https://rhel7.iuscommunity.org/ius-release.rpm sudo yum install ius-release.rpm
    ii. 安装git 2.x
    sudo yum install git2u-all
    或者安装系统默认的版本(1.8)
    sudo yum install git
  2. 安装EPEL repo
    sudo yum install epel-release
    注,如果这个命令不能工作,尝试列出的替换方法here
  3. enable optional repo
    sudo subscription-manager repos --enable=rhel-7-server-optional-rpms sudo subscription-manager repos --enable=rhel-7-server-optional-source-rpms
  4. 安装开发工具
    sudo yum --setopt=group_package_types=mandatory,default,optional groupinstall "Development Tools"
  5. 安装扩展包
    sudo yum install scons perl-Perl4-CoreLibs xorg-x11-server-devel python-devel perl-Alien-Packages gtest-devel openssl-devel libxml2-devel libXinerama-devel libXft-devel libXrandr-devel libXcursor-devel gdbm-devel libmng-devel libcap-devel libpng12-devel libXmu-devel freeglut-devel zlib-devel libX11-devel bison-devel openjpeg-devel openjpeg2-devel geos-devel proj-devel ogdi-devel giflib-devel xerces-c xerces-c-devel
  6. 构建第三方库
    GEEDIR=/googleclient/geo/earth_enterprise
    cd $GEEDIR/src scons -j8 optimize=1 third_party
  7. 构建Fusion/Earth Server
    scons -j8 optimize=1

如果你有5.1.3安装程序

如果你有GEE和Fusion 5.1.3安装程序,那么有一个构建部署脚本可以简化构架和安装的过程。将来这个脚本将会更新,以脱离之前的安装程序单独运行。

  1. 安装GEE和Fusion 5.1.3
  2. 如上克隆repo
  3. 构建并部署
    cd $GEEDIR/src ./tmp/build_and_deploy_gee.sh --build

在Linux和Windows上构建 Portable Server

一个用来在Linux和Windows上构建 Portable Server的Python脚本正在被评估。经过批注,合并,Portable Server将按下列段落描述被构建。
软件构建需要:

Portable 运行需要:

Portable on Linux

确认你安装了Python, the pexpect Pip package, as well as tornado, g++, and Swig with Python support
例如:
sudo apt-get install g++ python python-pexpect python-tornado swig
运行
earthenterprise/earth_enterprise/src/portableserver/build.py
构建脚本会产生一个名字看起来像thenterprise/earth_enterprise/src/portableserver/build/portableserver-linux-5.1.3-20170412.tar.gz的压缩文档(archive)。文件名的构建日期部分将会根据你构建的日期改变。
为了从这个archive包运行Portable Server:

1. 提取所有的文档内容
2. cd portableserver-linux-5.1.3-20170412/server/ #(substituting your extracted directory)
3. python portable_server.py

在启动服务前,你可以根据你的配置需要编辑portableserver-linux-5.1.3-20170412/server/portable.cfgportableserver-linux-5.1.3-20170412/server/remote.cfg
清除构建文件,运行
earthenterprise/earth_enterprise/src/portableserver/build.py --clean

Portable on Windows

安装g++编译器

你可以用g++编译器安装 MinGW,或者run the build from a Git-BASH or Git-Cmd shell fromGit-Scm, which should come with g++。
确认g++在你的PATH

安装Swig with Python Support

  1. 下载一个Windows版的Swig Zip
  2. 解压Zip到想要的安装目录
  3. 添加你期望的安装目录到你的PATH

安装Python

下载并安装 Python 2.7或更高版本
如果你安装了Python,确认你装了pexpecttornado
cd \Python27\Scripts pip install pexpect tornado
把你的Python安装路径添加到PATH

构建Portable Server

用你PATH里的g++,swig,python打开一个command prompt。
运行
python earthenterprise\earth_enterprise\src\portableserver\build.py
构建脚本会产生一个名字看起来像thenterprise/earth_enterprise/src/portableserver/build/portableserver-linux-5.1.3-20170412.tar.gz的压缩文档(archive)。文件名的构建日期部分将会根据你构建的日期改变。
为了从这个archive包运行Portable Server:

1. 提取所有的文档内容
2. cd portableserver-linux-5.1.3-20170412/server/ #(substituting your extracted directory)
3. python portable_server.py

在启动服务前,你可以根据你的配置需要编辑portableserver-linux-5.1.3-20170412/server/portable.cfg和portableserver-linux-5.1.3-20170412/server/remote.cfg
清除构建文件,运行
earthenterprise/earth_enterprise/src/portableserver/build.py --clean


实践中遇到的问题

在实际操作过程中,我卡在git lfs pull这一步,存在lfs上的东西无法批量下载。
克隆的库只有300多M,完整的应该有七八百M。
手动下载和替换可以解决部分报错,但是数量太大无法全部实现。
这里有一个与我遇到相同报错的Issues:Fatal error: libjs/jsautocfg.h: No such file or directory
开发者给出的答复是“你没有装git lfs,或没有执行git lfs pull”
提问者对此答复的回答是“Thanks. It works now.”
可能是因为他们都是外国用户吧(然而我尝试翻墙仍然下不动)。

上一篇下一篇

猜你喜欢

热点阅读