使用须知

此 15 分钟的教程演示如何配置 Web 代理以访问外部 Web 站点。

背景信息

Oracle 建议在专用子网中创建 Cloud Manager 和托管实例,以提高安全性。在专用子网中创建的实例没有公共 IP 地址,因此无法与 Internet 建立直接出站连接。但是,Cloud Manager 必须能够连接到 Internet 上的站点。

Cloud Manager 实例需要 Internet 访问的某些目标目标包括 Oracle Cloud Infrastructure API 访问、Terraform 插件站点、My Oracle Support 下载站点、Python 模块下载站点和 Oracle YUM 存储库。

要连接到 Internet,可以设置 NAT 网关。设置 NAT 网关后,您可以使用各种方法来设置入站连接,例如 VPN 或堡垒。如果您出于任何原因不想使用 NAT 网关,还可以通过配置 Web 代理来启用对 Internet 的访问,如本教程中所述。这是可选设置。

这是安装 PeopleSoft Cloud Manager 系列中的第十五个教程。按列出的顺序阅读教程。可选教程提供了用于设置的替代方法。

需要做哪些准备?

  • 请参阅教程“准备安装 PeopleSoft Cloud Manager”中的先决条件。
  • 确保子网的安全列表允许 Cloud Manager 实例 VM 连接到 Web 代理的代理端口。

步骤 1:输入 Cloud Manager 堆栈的 Web 代理详细信息

  1. 安装和配置 Web 代理,并具有可用的 Web 代理主机 IP 地址或全限定域名 (FQDN) 和端口号。
  2. 按照教程中的步骤在资源管理器中安装 PeopleSoft Cloud Manager 堆栈。

    在 "Create Stack"(创建堆栈)页面的 "Networking"(网络)部分中,添加 Web 代理详细信息。例如,对于代理主机 webproxy.example.com 和代理端口 80,请输入:

    webproxy.example.com:80
  3. 完成 Cloud Manager 安装。

步骤 2:获取 Web 代理配置信息

Cloud Manager 映像包含一个脚本,用于输出配置与 Web 代理的连接所需的环境变量。

  1. 使用 SSH 访问 Cloud Manager 实例 VM,如“Log in to the Cloud Manager Instance(登录到云管理器实例)”教程中所述。
  2. 转到目录 /home/opc/bootstrap。
    $ cd /home/opc/bootstrap
  3. 运行 proxy_vars.sh,并指定 Web 代理主机名或 IP 地址以及端口。
    $ bash proxy_vars.sh <proxy host> <proxy port>

    例如,使用代理主机 webproxy.example.com 和代理端口 80:

    $ bash proxy_vars.sh "webproxy.example.com" 80
  4. 该脚本将输出必须设置的多个变量以及必须修改的文件的说明。

    找到以 ~/.bashrc 开头的部分。下面是该部分的示例输出:

    ############## ~/.bashrc #################################################
    # Overwrite the value of variable _JAVA_OPTIONS
    # in the file  ~/.bashrc of psadm2 user after bootstrapping Cloud Manager
    # using the new value shown below. After saving the file, source it with . .bashrc
    # and then restart app server domain and process scheduler domain
    ###########################################################################
    
    export _JAVA_OPTIONS='-Djava.security.egd=file:/dev/./urandom -Dhttps.proxyHost=webproxy.example.com -Dhttps.proxyPort=80 -Dhttp.nonProxyHosts="127.0.0.1|localhost|10.0.2.3|cm-instance-infodev|cm-instance-infodev.subnet2.psftvcninfodev.oraclevcn.com|xxx.xxx.xxx.xxx"'
  5. 对文件 ~/.bashrc 执行脚本建议的更改(如下一节中所述)。脚本中的其他更改不是必需的。

步骤 3:在 Cloud Manager 实例中完成 Web 代理配置

  1. 使用 SSH 登录到 Cloud Manager 实例 VM,然后更改为 psadm2 用户。
    sudo su - psadm2
  2. 创建 /home/psadm2/.bashrc 的备份副本。
  3. 打开 /home/psadm2/.bashrc 文件进行编辑,例如使用 vi。
  4. 注释掉或删除以 export _JAVA_OPTIONS 开头的行,并将其替换为 proxy_vars.sh 输出中的值。
  5. 保存文件。
  6. 使用此命令获取文件(输入点、空格和文件名 .bashrc)。
    $ . .bashrc
  7. 退出 psadm2 会话,然后退出 Cloud Manager 的 SSH 会话。
  8. 登录到新的 SSH 会话,然后更改为 psadm2 用户。
  9. 使用 PeopleSoft PSADMIN 实用程序重新启动应用程序服务器和进程调度器域。
    $ psadmin

    PSADMIN -- PeopleTools Release: 8.61.03 Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. -------------------------------- PeopleSoft Server Administration -------------------------------- PS_CFG_HOME /opt/oracle/psft/home/psadm2/psft/pt/8.61 PS_HOME /opt/oracle/psft/pt/ps_home8.61.03 PS_APP_HOME /opt/oracle/psft/pt/ps_app_home 1) Application Server 2) Process Scheduler 3) Web (PIA) Server 4) Switch Config Home 5) Replicate Config Home 6) Refresh Config Home q) Quit Command to execute (1-6, q): q

    请参见 PeopleTools:System and Server Administration 、"Using the Application Server Administration Menu" 和 "Using the Process Scheduler Menu"。请参阅 Oracle 帮助中心上的 PeopleSoft PeopleTools 、联机帮助和 PeopleBooks。

步骤 4:启用对 Oracle Cloud Infrastructure 服务的 Internet 访问

安装 Cloud Manager 的 VM 必须有权访问多个 Oracle Cloud Infrastructure 服务。配置 Web 代理以确保访问此部分中列出的 REST API 端点。默认会阻止所有其他网站。

其中一些是基于部署区域,而另一些是独立于该区域。Oracle Cloud Infrastructure 文档按服务名称和区域列出了服务的 REST API 端点。

请参阅 Oracle Cloud Infrastructure 文档中的 API Reference and Endpoints

例如,对于 Cloud Manager 所需的服务,下面是阿什本区域的 REST API 端点。

Oracle Cloud Infrastructure 服务 阿什本区域的 REST API 端点
核心服务 API(网络卷、计算卷和块存储卷) https://iaas.us-ashburn-1.oraclecloud.com
数据库服务 API https://database.us-ashburn-1.oraclecloud.com
文件存储服务 API(文件系统和挂载目标) https://filestorage.us-ashburn-1.oraclecloud.com
身份和访问管理服务 API
(用户、组、区间和策略)*
https://identity.us-ashburn-1.oraclecloud.com
对象存储服务 API https://objectstorage.us-ashburn-1.oraclecloud.com
Vault 密钥检索 API https://secrets.vaults.us-ashburn-1.oci.oraclecloud.com
Vault 密钥管理 API https://vaults.us-ashburn-1.oci.oraclecloud.com
Vault 密钥管理 API https://kms.us-ashburn-1.oraclecloud.com

* 如果您要部署在主区域以外的区域,则还需要主区域的身份和访问管理服务 REST API 端点。

您还应配置 Web 代理以允许访问 Oracle Cloud Infrastructure 中部署的服务。有关一种方法,请参见 Oracle Cloud Infrastructure 文档中的 IP Address Ranges

步骤 5:启用对 Yum 站点的 Internet 访问

配置 Web 代理以确保对 yum 服务器的 Linux 更新访问权限。

https://yum.oracle.com

要加快访问速度,请使用特定于区域的 yum URL 之一;例如:

  • 美国东部(阿什本)地区— https://yum-ash.oracle.com
  • 美国西部(菲尼克斯)地区— https://yum-phx.oracle.com
  • 德国中部(法兰克福)地区— https://yum-fra.oracle.com
  • 英国(伦敦)区域— https://yum-lhr.oracle.com

有关连接到相应 yum 服务器的信息,请参阅在 Oracle Cloud Infrastructure 中连接到 Yum 镜像入门。

请参见 Configuring a System to Use Oracle Linux Yum Server 中的“在 Oracle Linux 中管理软件”部分。

步骤 6:启用对其他 URL 的 Internet 访问

本节包括外部站点的 URL。配置 Web 代理以确保访问本节中列出的 URL。

  • My Oracle Support-https://updates.oracle.com
  • OAuth 2.0 My Oracle Support 下载授权 -https://login-ext.identity.oraclecloud.com
  • ARU Akamai CDN URL — https://aru-akam.oracle.com

后续步骤

在 Oracle Cloud Infrastructure 中为 PeopleSoft Cloud Manager 环境创建负载平衡器(可选)

了解更多