标签:linux amazon aws apache-httpd
如何检查Apache是否安装在基于RHEL 6的Amazon Linux AMI中?在Ubuntu中,我使用:
dpkg --get-selections | grep apache
但在这种情况下,这不起作用.注意,我需要能够判断Apache是否已安装,即使它不是服务.
解决方法:
我想到了两个选择:
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 /中,所以它的存在可能只是一个指标.)
标签:linux,amazon,aws,apache-httpd 来源: https://codeday.me/bug/20190816/1666918.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。