感觉arcgis server在Windows系统下过于消耗资源,现将其配置到linux下,仅用于学习用。文中安装截图较多。因水平有限,难免有不周之处,请指教。
一、安装前准备
配置linux环境:此处为CentOS 6.5 X86_64
1、所需安装包
(1)、ArcGIS_for_Server_Linux_103_142158.tar.gz
(2)、ArcgisServer103 crack.ecp (和window许可文件是一个,也可以将TXT保存为.ecp格式)


主机与虚拟机互拷贝文件,如果VmWare Tools 工具不好用,不能互拷贝文件,可创建共享目录。详情参见:【https://jingyan.baidu.com/article/fb48e8be3a8e7e6e622e14e3.html】
我的Linux系统是CentOS 6.5,共享文件夹被放在【/mnt/hgfs/】目录下,即在【/mnt/hgfs/shared】中就可以找到被共享的文件了,如下图所示:
/mnt/hgfs/共享/ArcgisServer103 crack.ecp
本地VMware设置共享目录

linux共享目录(系统默认共享目录)

2、安装环境
挂载数据------启动进入虚拟机(无先后顺序)


切换至root用户下

可切换管理员账户
用户名:root
密码:123
查询IP地址:ifconfig

查询主机名(hostname):cat /etc/sysconfig/network

如果没有IP,需要添加IP(最好是固定的IP,这个很重要)
二 安装的前提条件
1 添加ip和主机名映射
(1) 查看 ip: ifconfig
(此处将IP设置成了10.168.17.126)1、修改IP

2、重启网络,执行命令 /etc/rc.d/init.d/network restart

(2)查看主机名: cat /etc/sysconfig/network


(3)①vi命令查看并编辑/etc/hosts文件: vi /etc/hosts

查看和编辑hosts文件以添加ip和机器名映射
②手动添加
在打开的hosts文件中添加ip和机器名映射,如:
10.168.17.126 weiw

命令查看:cat /etc/hosts

注:除了需要安装Portal for ArcGIS,否则机器名无需采用完全限定机器名的方式,而只采用普通机器名如weiw的形式:
10.168.17.126 weiw
添加ip和机器名的映射(不输入IP,这样也可以访问(安装后的访问截图))

2 建立ArcGIS Server安装账户
建立ArcGIS Server 安装账户的用户arcgis及其所属的组esri

教程英文版

创建ArcGIS Server用户和所属组
中文版:
对ArcGIS Server 安装账户设置密码(arcgis)--需要输入两次一样的(第一次报错无所谓)

英文版:

8)在home目录下创建ArcGISServer目录,授权 ArcGIS Server账户对文件夹的权限:
先手动或命令创建ArcGISServer文件夹,再执行下面两句赋权限命令
-R必须大写,小写会报错,如下中间所示-r报错了【没有那个文件或目录】

3 添加文件句柄和进程数限制
编辑/etc/security/limits.conf文件,添加文件句柄和进程数限制,格式如下:
<ArcGIS Server installation user> soft nofile 65535
<ArcGIS Server installation user> hard nofile 65535
<ArcGIS Server installation user> soft nproc 25059
<ArcGIS Server installation user> hard nproc 25059
注意:ArcGIS Server installation user(ArcGIS Server 安装 的 用户名),此处设置为 arcgis
执行命令 vi /etc/security/limits.conf

编辑limits.conf

编辑以添加文件句柄和进程数

4 对Temp文件夹的要求(可省略此步骤)
默认情况下,ArcGIS for Server安装过程中的资源会解压到/tmp目录下。因此安装用户需要对此目录具有读、写和执行权限。安装过程需要1.5G的空间,若/tmp下空间不够用,资源将会提取到用户的Home目录下。如果连Home的空间也不足,安装则会报错。或者可通过设置IATEMPDIR环境变量设置一个临时位置。
临时空间仅在软件安装过程中需要,安装完毕后这些提取出的资源会被直接移除。
为该文件夹赋予文件全部权限(读、写、运行) chmod 777 /tmp

5 赋予安装账户对Server安装文件的所有权
①命令 解压.tar.gz格式的安装包

tar命令解压.tar.gz
②手动解压

对ArcGISServer文件进行权限查看:
ls -l
可以看到(未赋权限前):

chmod 777 -R ArcGISServer 文件夹赋权限
ls -l 查看权限(赋权限后)

赋予安装账户对安装包的所有权 chown赋予所有权


安装ArcGISServer

然后开始自动执行(此步骤未来及截图,采用网络教程上图)

进入安装界面


选择安装目录(默认即可)




安装完成,选择许可文件
将离线生成的ecp文件拷贝至当前机器上,并确保安装账户对其具有可读权限

检查离线许可ecp文件
说明所有账户都对ecp文件拥有可读可写权限。



选择许可文件


因为ArcGISServer 文件夹有读写权限,其他文件夹没有,所以解压到此文件夹下,如下图

安装+许可完成,关闭窗体

关闭安装窗体,自动转到server页面

--------Create New Site

-----默认用户名:siteadmin
-----密码:123(随意设置)

账户名:siteadmin
密码:123

跟服务器目录:/home/arcgis/arcgis/server/usr/directories
配置存储:/home/arcgis/arcgis/server/usr/config-store

配置中

配置完毕,可以登录了



常用的geometry服务及打印服务(默认是关闭的,可开启下)

完成安装
问题1:重启linux系统后,Arcgis server不能访问到?
原因:Arcgis server服务设置的不是自动启动,需要手动启动下,如下图所示

问题2:
虚拟机里可访问 arcgis server服务:http://10.168.17.126:6080/arcgis/rest/services 但是主机或其他机器不可访问(能ping通),这是因为防火墙原因,可添加6080端口到防火墙白名单中
在虚拟机linux里面,如下设置

其他机器访问服务地址(http:ip:6080/arcgis/rest/services)或管理地址(http:ip:6080/arcgis/manager)均正常
参考文章
4、https://jingyan.baidu.com/article/fb48e8be3a8e7e6e622e14e3.html