装好了httpd服务
查看是否有httpd进程
ps -ef|grep httpd
有就kill掉
然后启动服务
# systemctl start httpd.service
[root@VM_28_69_centos ~]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since 五 2017-05-05 18:30:20 CST; 9s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 12091 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Main PID: 12251 (httpd)
Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
CGroup: /system.slice/httpd.service
├─12251 /usr/sbin/httpd -DFOREGROUND
├─12252 /usr/sbin/httpd -DFOREGROUND
├─12253 /usr/sbin/httpd -DFOREGROUND
├─12254 /usr/sbin/httpd -DFOREGROUND
├─12255 /usr/sbin/httpd -DFOREGROUND
└─12256 /usr/sbin/httpd -DFOREGROUND
5月 05 18:30:20 VM_28_69_centos systemd[1]: Starting The Apache HTTP Server...
5月 05 18:30:20 VM_28_69_centos systemd[1]: Started The Apache HTTP Server.
[root@VM_28_69_centos ~]#
当端口80被占用
kill掉80端口程序,再启动
# netstat -nlp|grep :80
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 7305/udp
tcp6 0 0 :::80 :::* LISTEN 7307/(squid-1)
[root@VM_28_69_centos conf]# kill -9 7307
[root@VM_28_69_centos conf]# netstat -nlp|grep :80
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 7305/udp
[root@VM_28_69_centos conf]# systemctl start httpd.service