Amazon Linux AMIにApacheがインストールされていることを確認する

Amazon Linux AMIにApacheがインストールされていることを確認する

RHEL 6 ベースの Amazon Linux AMI に Apache がインストールされているかどうかを確認する方法は? Ubuntuでは以下を使用します。

dpkg --get-selections | grep apache

しかし、この場合は機能しません。サービスでなくても、Apacheがインストールされていることを知っておく必要があります。

ベストアンサー1

2つの選択肢が浮上しました。

yum info httpd

出力を確認してインストールされたことを確認すると、次のような結果が表示されます。

[0 1003 12:18:33] ~ % yum info httpd
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: ftp.halifax.rwth-aachen.de
 * extras: ftp.rrzn.uni-hannover.de
 * remi: mirror5.layerjet.com
 * remi-php56: mirror5.layerjet.com
 * remi-safe: mirror5.layerjet.com
 * updates: ftp.halifax.rwth-aachen.de
Installed Packages
Name        : httpd
Arch        : x86_64
Version     : 2.2.15
Release     : 47.el6.centos
Size        : 2.9 M
Repo        : installed
From repo   : updates
Summary     : Apache HTTP Server
URL         : http://httpd.apache.org/
License     : ASL 2.0
Description : The Apache HTTP Server is a powerful, efficient, and extensible
            : web server.

または

rpm -qf /etc/httpd

httpdの設定ディレクトリを担当すると思うパッケージがあることを確認してください。 CentOS6では、次のようになります。

[0 1001 12:12:46] ~ % rpm -qf /etc/httpd
httpd-2.2.15-47.el6.centos.x86_64

(最も簡単な最後のポイントは、RH / CentOSの規則は構成がにあることです/etc/httpd/。したがって、その存在は単なる指標になることができます。)

おすすめ記事