第一步:找出默认软件库上的Apache版本
为了查找Centos上软件库里的Apache版本,在命令行下输入以下指令:yum info httpd
如果你的centos保持着默认的配置的话,你很可能会按到类似的结果:[root@crosp ~]# yum info httpd
Loaded plugins: fastestmirror
epel/x86_64/metalink | 19 kB 00:00
epel | 4.3 kB 00:00
(1/3): epel/x86_64/group_gz | 170 kB 00:00
(2/3): epel/x86_64/primary_db | 4.6 MB 00:00
(3/3): epel/x86_64/updateinfo | 780 kB 00:00
Loading mirror speeds from cached hostfile
* base: mirrors.ircam.fr
* epel: mirrors.ircam.fr
* extras: centos.mirror.fr.planethoster.net
* updates: centos.mirror.fr.planethoster.net
Available Packages
Name : httpd
Arch : x86_64
Version : 2.4.6
Release : 45.el7.centos.4
Size : 2.7 M
Repo : updates/7/x86_64
Summary : Apache HTTP Serve