← 返回卷宗
編程筆記

Google Earth Enterprise的安裝記錄

1、基於Centos,安裝:

sudo yum install git

2、執行指令

curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash

然而這條指令執行失敗,所以到了git-lfs的網站上查看,改執行:

curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
sudo yum install git-lfs
git lfs install

成功。

3、執行

sudo yum install epel-release

4、

sudo yum --setopt=group_package_types=mandatory,default,optional groupinstall "Development Tools"
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

這個安裝過程稍微久一些,大概幾分鐘。

5、通過git下載earthenterprise

GIT_LFS_SKIP_SMUDGE=1 git clone git@github.com:google/earthenterprise.git
cd earthenterprise
git lfs pull

第一條執行時間較久,下載大約300多M數據,第三條又下載,下載顯示是:Git LFS: (48 of 48 files) 535.49 MB / 457.47 MB。

6、因為已經在earthenterprise目錄下,直接執行:

cd earth_enterprise
scons -j8 release=1 build

等待,看到編譯的內容里居然還有QT,及QT的各種example,幾乎懷疑是不是裝錯了,在linux下,google fusion是一個UI界面,應該是它會用到。

漫長等待後運行出錯,推測應該是因為-j8的參數,這個數字指的是同時執行的任務,要與邏輯CPU數量相同,應該是租用的VPS只有單核的原因,故而修改為1.

cd earthenterprise/earth_enterprise
scons -j1 release=1 build

【注】在自己本地的虛擬機中也嘗試安裝中,出現一些問題,這一步會提示:configure: error: C++ compiler cannot create executables,那麼便需要先執行指令:

yum install gcc gcc-c++ gcc-g77

並且,在編譯openssl過程中,如果出現找不到find.pl的現象,是因為本機版本太新安裝了perl5,要與4兼容,需要手工建立find.pl文件,查看文章:《建立find.pl以兼容perl5編譯openssl》

7、安裝相關軟件,這裡將google文檔中提示的apt-get換成yum

sudo yum install g++ python python-pexpect python-tornado swig

8、運行server的build.py

cd src/portableserver/
./build.py

發現python少了pexpect庫,也沒有裝pip,只好:

yum install python-pip
pip install pexpect
./build.py

執行成功,返回

Library built.
Running tests ...
SUCCESS: 16 tests passed. 0 tests failed.

9、進入目錄中

cd build

文檔中說需要進行三步:

1. Extract all archive contents
2. cd portableserver-linux-5.1.3-20170412/server/ #(substituting your extracted directory)
3. python portable_server.py

所以:

tar -xzvf portableserver-linux-5.1.3-20170703.tar.gz
python portable_server.py

查看了一下源碼,知曉運行後端口是9335,測試成功 。

 

本文由 三符道長 撰於 2017年7月2日。轉載請註明出處。