如何找到已安装的 IBM HTTP Server 版本和架构?

如何确定 IBM HTTP Server 的版本和架构

IBM HTTP Server (IHS) 是基于 Apache HTTP 构建的 Web 服务器,它可被安装在多种操作系统上,例如 AIX、Linux、Solaris、Windows、HP-UX 和 z/OS。

目前,IHS 主要有四个主要版本可供选择。

对于技术堆栈的审计以及确保您使用的是最新版本来说,了解服务器上所安装的 IHS 版本至关重要。

本文将介绍两种查找已安装的 IBM HTTP Server 版本和架构的方法。

使用 versionInfo.sh 脚本查询

这可能是确定服务器上已安装版本的首选且最可靠的方法。

  • 首先,登录到您的 IBM HTTP Server。
  • 然后,导航到 IHS 的安装路径。
  • 进入 bin 目录并执行以下脚本:

  [[email protected] bin]# ./versionInfo.sh | grep Version

  WVER0012I: VersionInfo reporter version 1.15.1.48, dated 2/8/12

  Version Directory       /opt/IBM/HTTPServer/properties/version

  Version               8.5.5.9

  Installed Features   IBM HTTP Server 64-bit with Java, Version 6

  [[email protected] bin]#
  

要获取架构信息,您可以使用以下 grep 命令:


  [[email protected] bin]# ./versionInfo.sh | grep Arch

  Architecture         x86-64 (64 bit)

  [[email protected] bin]#
  

通过以上信息,可以得知在本示例中,服务器使用的是 8.5.5.9 版本和 64 位架构。

通过日志文件查看 IHS 版本

如果您的访问权限受限,无法直接执行 versionInfo.sh 脚本,那么您可以使用日志文件来查找版本信息。前提是您可以访问服务器的日志文件。

登录到 IBM HTTP Server,然后访问存储 IHS 日志的目录。

查看 error_log 文件,找到服务器启动时的日志行,其中应该包含了版本信息,如下所示:


  [Mon May 02 06:13:54 2016] [notice] IBM_HTTP_Server/8.5.5.9 (Unix) configured -- resuming normal operations
  

请注意,日志文件中不包含服务器的架构信息。

如果您需要查询服务器上的 IBM HTTP Server 的历史版本信息,可以使用 historyInfo.sh 脚本:


  [[email protected] bin]# ./historyInfo.sh

  WVER0210I: Copyright (c) IBM Corporation 2002, 2012; All rights reserved.

  WVER0212I: HistoryInfo Reporter Version 1.7.1.28, Dated 10/18/11

  --------------------------------------------------------------------------------

  IBM WebSphere Product History Report

  --------------------------------------------------------------------------------

  Report at date and time May 2, 2016 6:21:57 AM PDT

  Installation

  --------------------------------------------------------------------------------

  Product Directory   /opt/IBM/HTTPServer

  Version Directory   /opt/IBM/HTTPServer/properties/version

  DTD Directory       /opt/IBM/HTTPServer/properties/version/dtd

  Log Directory       /var/ibm/InstallationManager/logs

  Installation Event

  --------------------------------------------------------------------------------

  Install Manager Offering ID       com.ibm.websphere.IHSILAN.v85

  Action                             install

  Version                           8.5.5.9

  Package                           com.ibm.websphere.IHSILAN.v85_8.5.5009.20160225_0435

  Log File Name                     20160502_0337.xml

  Timestamp                         2016-05-02 04:47:47-0700

  Result                             success

  Installed Features                 IBM HTTP Server 64-bit with Java, Version 6

  --------------------------------------------------------------------------------

  End History Report

  --------------------------------------------------------------------------------

  [[email protected] bin]#
  

希望以上步骤能帮助您找到 IBM HTTP Server 的版本和架构信息。

您喜欢阅读这篇文章吗?欢迎分享给其他人。