以下步骤将指导您完成 Portal for ArcGIS 的静默安装过程。
注:
如果要升级到 11.5,请参阅升级 Portal for ArcGIS 以了解更多信息。
准备安装 Portal for ArcGIS
在开始 Portal for ArcGIS 的安装过程前,请完成以下操作:
- 验证站点是否满足或超过最低系统要求。
- 以具有管理权限的用户身份登录到计算机。 您无法以根用户身份安装 Portal for ArcGIS。
- 按 Portal for ArcGIS 使用的端口中所述的方式打开端口。
- 关闭服务器上的所有不重要应用程序。
- 从 My Esri 下载 Portal for ArcGIS 安装程序并浏览至所在文件夹。 或者,将 Portal for ArcGIS 媒体插入适当的驱动器以自动启动安装程序。
接下来即可开始执行 Portal for ArcGIS 安装。
在 Linux 上静默安装 Portal for ArcGIS
要在 Linux 上静默安装 Portal for ArcGIS,请完成以下步骤:
- 请阅读位于 <CD_ROOT or untar directory>/Documentation/EULA.pdf 的许可协议并接受其条款。
- 在提示符处静默运行安装程序。 请参阅下面的示例语法:<CD_ROOT or untar directory>/Setup -m silent -l yes 用法: Setup [Options] 选项 描述 -m; --mode MODE 可选。 默认为 GUI。 MODE 为以下选项之一:silent、console 或 gui。 -l; --license-agreement CHOICE 静默模式时必须指定。 CHOICE 可以为 Yes 或 No。 Yes 表示您已阅读并同意 Esri 主协议(E204、E300)。 请访问 http://www.esri.com/legal/licensing-translations 阅读此协议。 -d; --directory DIRECTORY 可选。 默认情况下,Portal for ArcGIS 安装在用户的 $HOME 目录中。 DIRECTORY 可指定其他安装目录。 路径 /arcgis/portal 将追加到安装目录。 如果您将安装程序指定至先前的安装目录,该目录中的内容将自动用于新的安装。 不支持 10.2 版本之前安装的内容。 -v; --verbose 安装程序在详细模式下运行。 -h; --help 显示命令行帮助并退出。 -e; --examples 显示这些选项的使用说明示例并退出。 注:安装 Portal for ArcGIS 后,您还可以使用 createportal 命令行实用程序创建一个门户。 
使用 createportal 命令行实用程序创建门户
可通过以下方式使用 createportal 实用程序:
- 以管理员身份在命令提示符中运行 createportal 实用程序,并指定名字、姓氏、用户名、密码、电子邮件、密码提示问题、答案和内容目录参数。
- 将提供一个包含指定参数的 createportal.properties 文件。
要使用 createportal 命令行实用程序,请运行包含 -h 或 -help 的 createportal.sh 脚本,如下所示:
<Portal for ArcGIS Installation Directory>/tools/createportal/createportal.sh -help
该实用程序的使用示例:createportal.sh [-fn <arg>] [-ln <arg>] [-u <arg>] [-p <arg>] [-e <arg>] [-qi <arg>] [-qa <arg>] [-d <arg>] [ -lf <arg>] [ -ut <arg>]
文件的使用示例:createportal.sh [-f <FILE>]
注:
如果在 createportal.properties 文件中引用路径,则需要转义反斜线,例如 C:\\arcgisportal 或 \\\\<Absolute path to>\\<portal arcgisportal>。
| 选项 | 描述 | 
|---|---|
| -fn; --firstname | 用于配置门户的初始管理帐户的名字。 确保以引号括起多词语条目。 | 
| -ln; --lastname | 用于配置门户的初始管理帐户的姓氏。 确保以引号括起多词语条目。 | 
| -u; --username | 用于配置门户的初始管理帐户的用户名。 用户名可以由数字 0-9、ASCII 字母 a-z 和 A-Z 以及点字符 (.) 组成。 | 
| -p; --password | 用于配置门户的初始管理帐户的密码。 密码可以由数字 0-9、ASCII 字母 a-z 和 A-Z 以及点字符 (.) 组成。 | 
| -e; --email | 用于配置门户的初始管理帐户的电子邮件地址。 | 
| -qi; --question | 用于检索忘记的密码的密码提示问题索引。 有关相应索引编号的可用问题如下: 
 | 
| -qa; --answer | 您为参数 -qi 选择的密码提示问题的答案。 确保以引号括起多词语条目。 | 
| -d; --contentDirectory | 用于存储门户中托管的数据的内容目录的绝对路径和名称。 默认情况下,会在此位置创建门户内容目录: <Portal for ArcGIS Installation Directory>/usr/arcgisportal | 
| -f; --file | createportal 实用程序的属性文件。 默认情况下,createportal.properties 文件位于此位置: <Portal for ArcGIS Installation Directory>\tools\createportal | 
| -lf; --licenseFile | 这也是门户许可文件的路径。 | 
| -ut; --userTypeID | 这是初始管理员的用户类型的 ID。 设置此参数属于可选操作。 要为 -ut 参数生成组织可用的兼容用户类型列表,请运行 listadministratorusertypes 实用程序。 如果未指定用户类型 ID,且门户许可文件包含单个兼容的用户类型,则将分配该用户类型。 如果许可文件包含多个兼容的用户类型,则将分配临时用户类型,且初始管理员必须在登录后选择用户类型。 | 
| -h; --help | 显示命令行帮助并退出。 | 
以下为 createportal.properties 文件示例:#
#
# Portal for ArcGIS site creation properties
#
# First name for initial administrator account
PORTAL_ADMIN_FIRSTNAME =
# Last name for initial administrator account
PORTAL_ADMIN_LASTNAME =
# User name for initial administrator account
# Can only have the numbers 0-9, the ASCII letters a-z, A-Z and the dot character (.)
PORTAL_ADMIN_USERNAME =
# Password for primary site administrator.
# Can only have the numbers 0-9, the ASCII letters a-z, A-Z and the dot character (.)
PORTAL_ADMIN_PASSWORD =
# Initially, leave PORTAL_ADMIN_PASSWORD_ENCRYPTED set to false.
# When you run the tool the first time, the password will be
# encrypted and PORTAL_ADMIN_PASSWORD_ENCRYPTED will change to true
PORTAL_ADMIN_PASSWORD_ENCRYPTED = false
# E-mail address for initial administrator account
# e.g username@domain.com
PORTAL_ADMIN_EMAIL =
#This is the index of the secret question to retrieve a forgotten password.
#The list of questions with their respective index numbers is as follows:
#1, What city were you born in ?"
#2, What was your high school mascot?"
#3, What is your mother's maiden name?"
#4, What was the make of your first car?"
#5, What high school did you go to?"
#6, What is the last name of your best friend?"
#7, What is the middle name of your youngest sibling?"
#8, What is the name of the street on which you grew up?"
#9, What is the name of your favorite fictional character?"
#10, What is the name of your favorite pet?"
#11, What is the name of your favorite restaurant?"
#12, What is the title of your favorite book?"
#13, What is your dream job?"
#14, Where did you go on your first date?");
PORTAL_ADMIN_SECURITY_QUESTION_INDEX =
# Answer to the secret question
# e.g \"My Answer\"
PORTAL_ADMIN_SECURITY_QUESTION_ANSWER =
# Portal content directory where portal will store default and user-generated content.
# By default, the portal content directory will be created locally,
# e.g./<Portal for ArcGIS installation directory>/usr/arcgisportal.
PORTAL_CONTENT_DIRECTORY =
# The path to the portal license file
PORTAL_LICENSE_FILE =
# The ID of the user type for the Initial Administrator
PORTAL_USER_TYPE_ID =
在工具退出之前,您将收到一条消息,表明已成功创建门户。
使用 listadministratorusertypes 命令行实用程序来识别兼容的用户类型
要识别针对与管理员角色兼容的组织许可的用户类型 ID 列表,请运行 listadministratorusertypes 命令行实用程序。 这将为 createportal 工具中的 -ut 参数提供输入列表。 运行带有 -lf 的工具,如下所示,将门户许可文件用作输入:
<Portal for ArcGIS Installation Directory>/tools/createportal/listadministratorusertypes.sh
该实用程序的使用示例:listadministratorusertypes.sh [-lf <arg>] 或 listadministratorusertypes.sh [--listadministratorusertypes <arg>]
安装后配置
如果希望 Portal for ArcGIS 开始使用该操作系统,请完成特定于以下操作系统的步骤。
操作系统支持 systemd
如果您的操作系统支持使用 systemd 引导和管理进程(例如,如果您使用的是 Red Hat 7.x),请遵照以下步骤将 Portal for ArcGIS 配置为开始使用该操作系统:
- 在 shell 命令内,切换至根用户。
- 将 <Portal for ArcGIS installation directory>/framework/etc/arcgisportal.service 单元文件复制到 /etc/systemd/system. 中。文件复制完成后,请确认 /etc/systemd/system/arcgisportal.service 已将其文件权限设置为 600。注:该文件随 Portal for ArcGIS 11.5 一同安装。 
- 仍然以根用户的身份运行以下命令,以在 /etc/systemd/system/multi-user.target.wants 中自动创建链接:# systemctl enable arcgisportal.service
- 欲验证 systemd 服务是否配置正确,请重新启动服务后检查其状态。# systemctl stop arcgisportal.service # systemctl start arcgisportal.service # systemctl status arcgisportal.service注:为防止服务产生过多线程并占用所有服务器资源,SLES12 SP2 及更高版本中包含的 systemd v228 及更高版本会将待创建的最大线程数设置为 512。 如果系统使用频繁,则 SLES12 上的用户可能需要启用和提高此限制。 要以根用户身份启用和提高此限制,请在将单元文件部署到 /etc/systemd/system 文件夹之前,针对该文件取消注释并编辑以下行:# TasksMax=512 
- 结束根用户会话。
- 重新启动操作系统,然后验证 Portal for ArcGIS 是否正确重启。
支持 SysV 的操作系统
如果您的操作系统支持使用 SysV 引导和管理进程,请遵循以下步骤将 Portal for ArcGIS 配置为与操作系统一同启动:
- 在 shell 命令内,切换至根用户。
- 将 <Portal for ArcGIS installation directory>/framework/etc/arcgisportal shell 脚本复制到下面提供的相应受支持的 Linux 基于分发的位置:- RHEL:/etc/rc.d/init.d/
- SUSE:/etc/init.d/
 
- 将目录更改为适用的 init.d 文件夹并检查 arcgisportal 脚本,以确认根用户至少拥有读权限和运行 权限。
- 按如下编辑脚本:- 将 portalhome 变量更新到 Portal for ArcGIS 安装目录,例如 /home/username/arcgis/portal。 
- 仅针对 RHEL,在 # Description: Portal for ArcGIS Service 之前添加以下行: - # chkconfig: 35 99 01 
- 将编辑内容保存到 arcgisportal 脚本中。 
 
- 仍以根用户身份,以合适的运行级别运行以下命令,以便在 /etc/rc*.d 中自动创建链接:- RHEL:$ chkconfig --add arcgisportal $ chkconfig arcgisportal on
- SUSE:$ insserv arcgisportal $ chkconfig arcgisportal on
 
- RHEL:
- 结束根用户会话。
- 重新启动操作系统,然后验证 Portal for ArcGIS 是否正确重启。