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

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


网页题目:centos7设置Apache开机自启动-创新互联
转载来于:http://azwzsj.com/article/jsscg.html