centos7 设置Apache开机自启动

发布时间:2020-06-15 08:50:26 作者:大漠新人
来源:网络 阅读:1283

查看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

推荐阅读:
  1. (Centos7)Supervisor安装部署
  2. Centos7 yum安装LAMP

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

centos7 apache 开机自启动

上一篇:Ubuntu18.04 + CUDA10.0 + tensorflow-gpu 安装过程

下一篇:V$LATCH_CHILDREN视图

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》