5.2. 启动集群的 JBoss EAP AMI(使用 mod_cluster 和 VPC)


本主题列出了启动 Apache HTTP 服务器实例以充当 mod_cluster 代理的步骤和虚拟私有云(VPC)的 NAT 实例。

有关系统路径的详情,请参阅系统路径

如需了解有关为 Amazon EC2 配置 JBoss EAP 子系统的信息,请参阅将 JBoss EAP 子系统配置为在云平台上工作

注意
  • 您可以使用镜像提供的示例配置脚本。

Amazon Virtual Private Cloud(Amazon VPC)是 Amazon Web Services(AWS)的一项功能,允许您隔离专用网络中的一组 AWS 资源。此专用网络的拓扑和配置可以根据您的需求进行自定义。

有关 Amazon VPC 的更多信息,请参阅 Amazon Virtual Private Cloud

注意

如果您在 VPC 中使用 mod_cluster 负载平衡器启动群集,则 JBoss EAP 服务器无法被公共访问。mod_cluster 负载平衡器可以是连接到互联网的唯一端点。

如需设置域控制器实例,请参阅启动实例到 Serve 作为域控制器

如需设置主机控制器实例,请参阅启动一个或多个实例作为主机控制器

如需有关 S3 域控制器发现的信息,请参阅启动 one 或 More Instances to Serve 作为主机控制器

5.2.1. 使用 VPC 和 mod_cluster 启动集群 AMI

注意

配置 VPC 是可选的。如需更多信息,请参阅《Amazon VPC 用户指南》中的检测您支持的平台和是否具有默认 VPC 部分。

  1. 安装 jbcs-httpd24-mod_cluster-native 软件包及其所有依赖项。mod_cluster 配置文件安装在 /opt/rh/jbcs-httpd24/root/etc/httpd/conf.d/mod_cluster.conf 中。

有关安装 Red Hat JBoss Core Services Apache HTTP 服务器的详情,请查看 Apache HTTP 服务器安装指南

  1. mod_cluster 禁用广播。在 /opt/rh/jbcs-httpd24/root/etc/httpd/conf.d/mod_cluster.conf 配置文件中将以下内容添加到 VirtualHost

    ServerAdvertise Off
    EnableMCPMReceive
    # AdvertiseFrequency # comment out AdvertiseFrequency if present
  2. 允许 SELinux 中的端口.如果需要,配置 iptables。可以使用 semanage port -a -t http_port_t -p tcp $PORT_NR 命令,在 SELinux 中允许端口。
  3. 配置 JBoss EAP,以在 mod_cluster 侦听的地址上查找 mod_cluster 代理。

    注意

    提供了 /opt/rh/eap7/root/usr/share/wildfly/docs/examples/configs/standalone-ec2-ha.xml 示例配置文件。您需要在 modcluster 子系统中配置 代理 列表。

    您可以使用以下方法之一定义 代理 列表:

    • 定义 带有适当主机和端口的 outbound -socket-binding,名为 mod-cluster-proxy 1:

      <outbound-socket-binding name="mod-cluster-proxy1">
          <remote-destination host="${jboss.modcluster.proxy1.host}" port="${jboss.modcluster.proxy1.port}"/>
      </outbound-socket-binding>
    • modcluster 子系统中的 proxies 属性设置为具有适当主机和端口的 mod-cluster-proxy1

      /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mod-cluster-proxy1:add(host={${jboss.modcluster.proxy1.host}}, port={${jboss.modcluster.proxy1.port}})
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部