CentOS-72-安装-ArcGIS-for-Server-104-笔记

46次阅读

共计 3860 个字符,预计需要花费 10 分钟才能阅读完成。

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

运行安装脚本后会进行安装环境检测,检测通过才可以开始安装。

我的安装出现了以下错误提示:

/*
------------------------------------------------------------------------
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.

*/

根据提示,一个一个地来解决问题。

  • (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
*/

授权文件获取以及上传过程略。

安装完成的提示如下:

/*
===============================================================================
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 才能在外网访问。

// 添加配置
$ /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 了。

基本操作

查看服务是否在运行

$ 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
*/

服务启动和关闭

// 进入安装目录
$ cd /home/ags/arcgis/server

/*
这个目录下有很多文件,其中
startserver.sh 
stopserver.sh 
分别用来启动和关闭服务
*/

(完)

参考资料

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

正文完
 0