19.3.2. 安装 JBoss EAP 6 附带的 Apache HTTP 服务器(ZIP 方式)
预备条件
- 根用户或管理员权限。
- 被支持的 Java 版本。
- 安装下列软件包:
- krb5-workstation
- mod_auth_kerb
- elinks(apachectl 功能所必需的)
- 您必须安装 Apache Portability Runtime(APR)。在 Red Hat 企业版 Linux 里,请安装
apr-util-devel。
注意
apr-util-ldap。
注意
过程 19.2. 安装 Apache HTTP 服务器
在 Red Hat 客户门户找到对应您的平台的 JBoss EAP 下载列表。
登录到 Red Hat 客户服务门户 https://access.redhat.com。点击 Downloads,然后选择Product Downloads列表里的 Red Hat Enterprise Application Server。从 Version 下拉菜单里选择正确的 JBoss EAP 版本。从列表里选择 HTTP Binary。
找到对应您的操作系统和架构的 Apache HTTP Server 选项。点击 Download 链接,下载包含 Apache HTTP 服务器的 ZIP 文件到本地主机。解压 ZIP 到要运行 Apache HTTP 服务器的位置。
在您首选的服务器上解压 ZIP 文件到一个临时位置。ZIP 文件将创建 jboss-ews-version-number 下的httpd目录。复制httpd文件夹并将其放在您要安装 JBoss EAP 6 的目录里,这个目录通常被称为 EAP_HOME。您的 Apache HTTP 服务器现在位于EAP_HOME/httpd/目录。正如其他 JBoss EAP 6 文档里找到的那样,您现在可以用 HTTPD_HOME 表示这个位置。运行 Post-Installation 脚本并创建 apache 用户和组帐号
在终端窗口里,切换到根用户帐号,进入EAP_HOME/httpd目录并执行下列命令。./.postinstall
然后,通过下列命令检查是否存在名为apache的用户:id apache
如果这个用户不存在,那您需要添加它及合适的用户组。为此,请执行下列命令:/usr/sbin/groupadd -g 91 -r apache 2> /dev/null || : /usr/sbin/useradd -c "Apache" -u 48 -g 91 -s /sbin/nologin -r apache 2> /dev/null || :
执行这个命令后,如果apache用户将运行 HTTPD 服务器,你需要修改 HTTP 目录的所有权:chown -R apache:apache httpd
要测试上述命令是否执行成功,请检查apache用户是否具有对 Apache HTTP 服务器安装路的执行权限。ls -l
输出结果应该类似于:drwxrwxr-- 11 apache apache 4096 Feb 14 06:52 httpd
配置 Apache HTTP 服务器。
用下列命令切换到新的用户帐号sudo su apache
并配置 Apache HTTP 服务器为apache用户来满足机构的需要。您可以参考 Apache Foundation 的文档:http://httpd.apache.org/。启动 Apache HTTP 服务器。
用下列命令启动 Apache HTTP 服务器:EAP_HOME/httpd/sbin/apachectl start
停止 Apache HTTP 服务器。
用下列命令停止 Apache HTTP 服务器:EAP_HOME/httpd/sbin/apachectl stop

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.