centos7下配置httpd

下载HTTPD服务
[root@gaojingbo ~]# yum -y install httpd
启动
[root@gaojingbo yum.repos.d]# systemctl restart httpd
[root@gaojingbo yum.repos.d]# systemctl enable httpd
查看80端口
[root@gaojingbo yum.repos.d]# ss -ant|grep :80
ESTAB 0 0 10.30.162.36:59096 103.65.41.126:80
FIN-WAIT-1 0 1 10.30.162.36:37108 103.65.41.125:80
ESTAB 0 0 10.30.162.36:59098 103.65.41.126:80
SYN-SENT 0 1 10.30.162.36:59088 103.65.41.126:80
SYN-SENT 0 1 10.30.162.36:37188 103.65.41.125:80
SYN-SENT 0 1 10.30.162.36:59090 103.65.41.126:80
SYN-SENT 0 1 10.30.162.36:59094 103.65.41.126:80
LISTEN 0 128 :::80 :::*
查看进程
[root@gaojingbo yum.repos.d]# ps aux |grep httpd
root 10570 0.0 0.0 230380 5164 ? Ss 15:27 0:00 /usr/sbin/http -DFOREGROUND
apache 10571 0.0 0.0 232464 3152 ? S 15:27 0:00 /usr/sbin/http -DFOREGROUND
apache 10572 0.0 0.0 232464 3152 ? S 15:27 0:00 /usr/sbin/http -DFOREGROUND
apache 10573 0.0 0.0 232464 3152 ? S 15:27 0:00 /usr/sbin/http -DFOREGROUND
apache 10574 0.0 0.0 232464 3152 ? S 15:27 0:00 /usr/sbin/http -DFOREGROUND
apache 10576 0.0 0.0 232464 3152 ? S 15:27 0:00 /usr/sbin/http -DFOREGROUND
root 10654 0.0 0.0 112708 952 pts/0 S+ 15:29 0:00 grep –color=auto httpd

[root@gaojingbo conf.modules.d]# vim /var/www/html/index.html
写入HTML文件
[root@gaojingbo conf.modules.d]# firefox 10.30.162.36
打开浏览器就能看到你所配置的网页信息

你可能感兴趣的:(linux基础)