Skip to main content

更改门户内容目录

安装 Portal for ArcGIS 时,会创建目录以存储门户用户保存和上传的内容。 这称为门户内容目录。 默认位置为 <Portal for ArcGIS installation directory>/arcgis/portal/usr/arcgisportal/content

安装 Portal for ArcGIS 时,会创建目录以存储门户用户保存和上传的内容。 这称为门户内容目录。 默认位置为 C:\arcgisportal\content

您可以使用 Portal Administrator Directory 更改门户内容目录的位置。 例如,您可能会决定将其放在另一台拥有更大磁盘空间或更严格备份环境的计算机上。 建议您在对最终用户开放门户前执行此更改操作。

注:

indexdbtemp 等其他目录均包含在 <Portal for ArcGIS installation directory>/arcgis/portal/usr/arcgisportal/ 下。 也可以修改这些目录,但必须将其保留在本地门户计算机上。 Portal for ArcGIS 不支持将这些目录放到网络共享中。

注:

indexdbtemp 等其他目录均包含在 C:\arcgisportal\ 下。 也可以修改这些目录,但必须将其保留在本地门户计算机上。 Portal for ArcGIS 不支持将这些目录放到网络共享中。

按照以下步骤更改门户内容目录的位置。

  1. 使用安装 Portal for ArcGIS 时所用的账户登录计算机。

  2. 在所需的新位置中创建门户内容目录的副本。

  3. 在新位置创建门户内容目录的副本。

  4. 授予用于安装 Portal for ArcGIS 的账户对新目录的读写权限。 如果此为网络位置,应确保账户可以访问目录。

  5. 授予 Portal for ArcGIS 账户对文件夹的读写文件权限。

  6. 如果要通过共享的网络路径访问此文件夹,则共享文件夹并授予 Portal for ArcGIS 账户对目录的读写权限。

  7. 以门户中默认管理员角色的成员身份登录到 Portal Administrator Directory。

    URL 格式为 https://organization.example.com/arcgis/portaladmin

  8. 单击系统 > 目录 > 内容 > 编辑目录以编辑目录位置。

  9. 路径文本框中输入以下 JSON 字符串,并根据您选择的位置执行相应的编辑操作:{ "type": "fileStore", "provider": "FileSystem","connectionString": "/net/share/portal/content"}

    注:

    当存在特定属性时,连接字符串将被加密。例如,当内容位于 Microsoft Azure Blob 存储容器中,或将公钥和私钥用于 Amazon S3 存储段中的内容时,可能会出现这种情况。 在这种情况下,JSON 字符串将以这种方式表示:

    Amazon Web Services

    {
     "type": "cloudStore",
     "provider": "Amazon",
     "connectionString": {
       "accessKeyId": "<access_key>",
       "secretAccessKey": "<secret_key>",
       "region": "<region>",
       "endpoint": "s3.<region>.amazonaws.com",
       "credentialType": "accessKey"
     },
     "objectStore": "<bucket>"
    }
    

    Microsoft Azure

    {
     "type": "cloudStore",
     "provider": "Azure",
     "connectionString": {
       "accountName": "<account_name>",
       "accountEndpoint": "blob.core.windows.net",
       "accountKey": "<account_key>",
       "credentialType": "accessKey"
     },
     "objectStore": "https://<account_name>.blob.core.windows.net/<container>"
    }
    
  10. 路径文本框中输入以下 JSON 字符串,并根据所选位置执行相应的编辑操作:{ "type": "fileStore", "provider": "FileSystem","connectionString": "C:\\arcgisportal\\content"}

    1. 在输入共享网络位置时,连接字符串的语法格式如下:"connectionString":"\\\\<machinename>\\arcgisportal\\content"
    注:

    当存在特定属性时,连接字符串将被加密。 当内容位于 Microsoft Azure Blob 存储容器中,或将公钥和私钥用于 Amazon S3 存储段中的内容时,可能会出现这种情况。 在这种情况下,JSON 字符串将以这种方式表示:

    Amazon Web Services

    {
     "type": "cloudStore",
     "provider": "Amazon",
     "connectionString": {
       "accessKeyId": "<access_key>",
       "secretAccessKey": "<secret_key>",
       "region": "<region>",
       "endpoint": "s3.<region>.amazonaws.com",
       "credentialType": "accessKey"
     },
     "objectStore": "<bucket>"
    }
    

    Microsoft Azure

    {
     "type": "cloudStore",
     "provider": "Azure",
     "connectionString": {
       "accountName": "<account_name>",
       "accountEndpoint": "blob.core.windows.net",
       "accountKey": "<account_key>",
       "credentialType": "accessKey"
     },
     "objectStore": "https://<account_name>.blob.core.windows.net/<container>"
    }
    
  11. 单击编辑目录应用所做更改。

  12. 单击系统 > 目录 > 内容验证新文件路径是否在被使用。

  13. 单击系统 > 目录 > 内容,并验证新文件路径是否在被使用。

您的门户现在将在新的内容目录中进行读取和写入。 或者,您可以删除旧内容目录或对其进行重命名,例如,从 admin/arcgis/portal/usr/arcgisportal/content 更改为 admin/arcgis/portal/usr/arcgisportal/content_old

您的门户现在将在新的内容目录中进行读取和写入。 或者,您可以删除旧内容目录或对其进行重命名,例如,从 C:\\arcgisportal\\content 更改为 C:\\arcgisportal\\content_old