CentOS 7.2 安裝 ArcGIS for Server 10.4 筆記

CentOS 7.2 安裝 ArcGIS for Server 10.4 筆記

安裝環境說明: CentOS 7.2 64 位(全新的騰訊雲服務器)

1. 安裝 Xvfb

$ yum install xorg-x11-server-Xvfb

2. 建立 arcgis 用戶組,建立arcgis用戶

// 建立用戶組arcgis
$ groupadd arcgis

// 建立用戶ags
$ useradd -g arcgis ags

// 設置用戶 ags 的密碼
$ passwd ags

3. 上傳安裝包並解壓

// 上傳安裝包
$ scp ArcGIS_for_Server_Linux_104_149446.tar.gz root@x.x.x.x:/hgy/

// 解壓
$ tar -xzvf ArcGIS_for_Server_Linux_104_149446.tar.gz
/*
解壓後的文件夾下面有以下文件:
Documentation  Install.htm  serverdiag  Setup  setup_resources
其中 Setup 是程序安裝腳本
*/

4. 切換到用戶 ags,運行安裝腳本

// 執行安裝腳本
$ ./Setup

運行安裝腳本後會進行安裝環境檢測,檢測經過才能夠開始安裝。java

個人安裝出現瞭如下錯誤提示:vim

/*
------------------------------------------------------------------------
There were 2 failure(s) and 2 warning(s) found:

FAILURES:
------------------------------------------------------------------------
*** DIAG003: The hostname of this machine contains one or more invalid
characters.  Valid characters include alpha numeric a-z, 0-9, '-'
and '.' characters.  See RFC952.

*** DIAG005: For ArcGIS Server to run properly, the file handle limits
for the install user are required to be set to 65535 and the number of
processes limits set to 25059. The current file handle limit is 1000000
and the number of processes limit is 3893.

To set these limits, you\'ll need to edit the /etc/security/limits.conf
file as super user and add the following lines:

        ags soft nofile 65535
        ags hard nofile 65535
        ags soft nproc 25059
        ags hard nproc 25059

In order for the new values to take effect, you'll need to log out and
then log back in as the ags user. To verify, run:

        ulimit -Hn -Hu
        ulimit -Sn -Su

For additional details, see the ArcGIS for Server installation guide.


WARNINGS:
------------------------------------------------------------------------
*** DIAG024: The hostname entry in the /etc/hosts file must be in the
following format:

        <IP> <FQDN> <Machine_name>

For example:

        111.222.333.444 hostname.esri.com hostname

Federating an ArcGIS Server site with Portal for ArcGIS will fail if
this entry is formatted differently.  Update the hostname entry before
creating your ArcGIS Server site.

*** DIAG004: The following required packages were not found:
        fontconfig

These packages are required for the proper support of ArcGIS Server.
Check the ArcGIS for Server System Requirements for details.

*/

根據提示,一個一個地來解決問題。centos

  • (1) 解決 hostname 問題
// 查看 hostname
$ hostname

// 果真不符合規則
// 修改hostname
$ hostnamectl set-hostname centos.arcgis
  • (2) 解決 limits 問題
// 編輯 limits.conf 文件
$ vim /etc/security/limits.conf

/* 追加
ags soft nofile 65535
ags hard nofile 65535
ags soft nproc 25059
ags hard nproc 25059
*/

// 根據提示:切換用戶過去又切換回來,檢查
/*
[root@VM_0_14_centos security]# su root
[root@VM_0_14_centos security]# su ags
[ags@VM_0_14_centos security]$ ulimit -Hn -Hu
open files                      (-n) 65535
max user processes              (-u) 25059
[ags@VM_0_14_centos security]$ ulimit -Sn -Su
open files                      (-n) 65535
max user processes              (-u) 25059
*/
  • (3) 安裝 fontconfig
$ yum install fontconfig
  • (4) 繼續安裝
// 執行安裝腳本
$ ./Setup

沒有再報錯,一路 Enter 下去便可。瀏覽器

受權

運行到最後一步會提示輸入受權文件路徑。服務器

/*
===============================================================================
Authorization File
------------------

Please enter the full path to your authorization file provided by Esri.

Example:
/path/to/server.ecp


Path: (Default: /path/to/file.ecp): /hgy/xxx.ecp
*/
受權文件獲取以及上傳過程略。

安裝完成的提示以下:ssh

/*
===============================================================================
Installation Complete
---------------------

Congratulations. ArcGIS 10.4 for Server has been successfully installed to:

/home/ags/arcgis/server

You will be able to access ArcGIS Server Manager by navigating to
http://centos.hgy.wd:6080/arcgis/manager.

PRESS <ENTER> TO EXIT THE INSTALLER:
*/

開放端口

雖然安裝好了,可是還須要開放端口 6080 和 6443 才能在外網訪問。tcp

// 添加配置
$ /sbin/iptables --insert INPUT -p tcp --dport 6080 -j ACCEPT
$ /sbin/iptables --insert INPUT -p tcp --dport 6443 -j ACCEPT

// 保存
service iptables save

// 重啓
/bin/systemctl restart iptables

完成以上操做就能夠在本地用瀏覽器訪問 ArcServer 了。ide

基本操做

查看服務是否在運行ui

$ netstat -lntp
/*
[root@centos ~]# netstat -lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
///....
tcp        0      0 0.0.0.0:6443            0.0.0.0:*               LISTEN      8377/java
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      740/sshd
tcp        0      0 0.0.0.0:6080            0.0.0.0:*               LISTEN      8377/java
*/

服務啓動和關閉this

// 進入安裝目錄
$ cd /home/ags/arcgis/server

/*
這個目錄下有不少文件,其中
startserver.sh 
stopserver.sh 
分別用來啓動和關閉服務
*/

(完)

參考資料

【1】《CentOS 6.9安裝ArcGIS Server 10.2簡明教程》. CSDN. https://blog.csdn.net/mgsky1/...

相關文章
相關標籤/搜索