Last login: Tue May 8 12:41:42 2018 from 192.168.72.1
[wangshumin@CentOSNode1 ~]$ yum install httpd -y
已加载插件:fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
您需要 root 权限执行此命令。
[wangshumin@CentOSNode1 ~]$ sudo yum install httpd -y
[sudo] wangshumin 的密码:
已加载插件:fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
base | 3.6 kB 00:00:02
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
Determining fastest mirrors
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 httpd.x86_64.0.2.4.6-67.el7.centos.6 将被 安装
--> 正在处理依赖关系 httpd-tools = 2.4.6-67.el7.centos.6,它被软件包 httpd-2.4.6-67.el7.centos.6.x86_64 需要
--> 正在处理依赖关系 /etc/mime.types,它被软件包 httpd-2.4.6-67.el7.centos.6.x86_64 需要
--> 正在检查事务
---> 软件包 httpd-tools.x86_64.0.2.4.6-67.el7.centos.6 将被 安装
---> 软件包 mailcap.noarch.0.2.1.41-2.el7 将被 安装
--> 解决依赖关系完成
依赖关系解决
=============================================================================================================================================================================================
Package 架构 版本 源 大小
=============================================================================================================================================================================================
正在安装:
httpd x86_64 2.4.6-67.el7.centos.6 updates 2.7 M
为依赖而安装:
httpd-tools x86_64 2.4.6-67.el7.centos.6 updates 88 k
mailcap noarch 2.1.41-2.el7 base 31 k
事务概要
=============================================================================================================================================================================================
安装 1 软件包 (+2 依赖软件包)
总下载量:2.8 M
安装大小:9.6 M
Downloading packages:
(1/3): mailcap-2.1.41-2.el7.noarch.rpm | 31 kB 00:00:02
(2/3): httpd-tools-2.4.6-67.el7.centos.6.x86_64.rpm | 88 kB 00:00:20
(3/3): httpd-2.4.6-67.el7.centos.6.x86_64.rpm | 2.7 MB 00:01:30
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
总计 29 kB/s | 2.8 MB 00:01:40
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : httpd-tools-2.4.6-67.el7.centos.6.x86_64 1/3
正在安装 : mailcap-2.1.41-2.el7.noarch 2/3
正在安装 : httpd-2.4.6-67.el7.centos.6.x86_64 3/3
验证中 : mailcap-2.1.41-2.el7.noarch 1/3
验证中 : httpd-2.4.6-67.el7.centos.6.x86_64 2/3
验证中 : httpd-tools-2.4.6-67.el7.centos.6.x86_64 3/3
已安装:
httpd.x86_64 0:2.4.6-67.el7.centos.6
作为依赖被安装:
httpd-tools.x86_64 0:2.4.6-67.el7.centos.6 mailcap.noarch 0:2.1.41-2.el7
完毕!
[wangshumin@CentOSNode1 ~]$ sudo vim /var/www/html/index.html
[wangshumin@CentOSNode1 ~]$ systemctl restart httpd
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ===
[wangshumin@CentOSNode1 ~]$ sudo netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd
tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 1385/dnsmasq
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 914/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 913/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1221/master
tcp 0 0 192.168.72.141:1883 0.0.0.0:* LISTEN 1977/mosquitto
tcp6 0 0 :::111 :::* LISTEN 1/systemd
tcp6 0 0 :::80 :::* LISTEN 9277/httpd
tcp6 0 0 :::22 :::* LISTEN 914/sshd
tcp6 0 0 ::1:631 :::* LISTEN 913/cupsd
tcp6 0 0 ::1:25 :::* LISTEN 1221/master
[wangshumin@CentOSNode1 ~]$