我们专注攀枝花网站设计 攀枝花网站制作 攀枝花网站建设
成都网站建设公司服务热线:400-028-6601

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

centos7设置Apache开机自启动

查看Apache是否加入到到开机自启动列表
systemctl list-unit-files | grep httpd
httpd.service disabled

创新互联总部坐落于成都市区,致力网站建设服务有成都做网站、网站建设、网络营销策划、网页设计、网站维护、公众号搭建、小程序设计、软件开发等为企业提供一整套的信息化建设解决方案。创造真正意义上的网站建设,为互联网品牌在互动行销领域创造价值而不懈努力!

将Apache加入到开机自启动中
systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

再次确认
systemctl list-unit-files | grep httpd
httpd.service enabled

启动Apache
systemctl start httpd
netstat -lnt | grep 80
tcp 0 0 10.211.55.15:80 0.0.0.0:* LISTEN

查看Apache状态
systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2019-12-16 15:16:35 CST; 7min ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 2040 (httpd)
Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
Tasks: 6
CGroup: /system.slice/httpd.service
├─2040 /usr/sbin/httpd -DFOREGROUND
├─2041 /usr/sbin/httpd -DFOREGROUND
├─2042 /usr/sbin/httpd -DFOREGROUND
├─2043 /usr/sbin/httpd -DFOREGROUND
├─2044 /usr/sbin/httpd -DFOREGROUND
└─2045 /usr/sbin/httpd -DFOREGROUND


网站标题:centos7设置Apache开机自启动
分享路径:http://shouzuofang.com/article/pcdssd.html

其他资讯