25.2.2.2. 非群集实例

25.2.2.2.1. 启动非群集的 JBoss EAP 6 实例
概述

本节涵盖在 Red Hat AMI(Amazon Machine Image)上启动 JBoss EAP 6 非群集实例的步骤。

必须具备的条件

过程 25.1. 在 Red Hat AMI(Amazon Machine Image)上启动 JBoss EAP 6 非群集实例。

  1. 配置 User Data 字段。可配置的参数位于:第 25.4.1 节 “永久性的配置参数”第 25.4.2 节 “自定义脚本参数”

    例 25.1. 『User Data』字段示例

    这个例子展示了非群集 JBoss EAP 6 实例的“User Data” 字段。用户 admin 的密码已被设置为 adminpwd
    JBOSSAS_ADMIN_PASSWORD=adminpwd
    JBOSS_IP=0.0.0.0 #listen on all IPs and interfaces
    
    # In production, access to these ports needs to be restricted for security reasons
    PORTS_ALLOWED="9990 9443"
    
    cat> $USER_SCRIPT << "EOF"
    
    # Get the application to be deployed from an Internet URL
    # mkdir -p /usr/share/java/jboss-ec2-eap-applications
    # wget https://<your secure storage hostname>/<path>/<app name>.war -O /usr/share/java/jboss-ec2-eap-applications/<app name>.war 
    
    # Create a file of CLI commands to be executed after starting the server
    cat> $USER_CLI_COMMANDS << "EOC" 
    # deploy /usr/share/java/jboss-ec2-eap-applications/<app name>.war
    EOC
    
    EOF
    
    
  2. 对于产品实例

    对于产品实例,在 User Data 字段的 USER_SCRIPT 行下面添加下列内容,确保在引导时进行安全更新。
    yum -y update

    注意

    yum -y update 应该经常运行以应用安全修复和增强。
  3. 启动 Red Hat AMI 实例。
结果

已在 Red Hat AMI 上配置并启动 JBoss EAP 6 的非群集实例。