美文网首页随笔-生活工作点滴
设置Apache2.4开机自启

设置Apache2.4开机自启

作者: 钾肥尔德 | 来源:发表于2019-07-05 14:01 被阅读1次
    cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd
    

    编辑/etc/rc.d/init.d/httpd,加入以下两行

    # chkconfig: 345 85 15
    # description: Activates/Deactivates Apache Web Server
    

    将httpd加入chkconfig

    chkconfig --add httpd
    chkconfig httpd on
    #systemctl enable httpd 也可以
    
    ln -s /etc/rc.d/init.d/httpd /etc/rc.d/rc5.d/S85httpd
    

    相关文章

      网友评论

        本文标题:设置Apache2.4开机自启

        本文链接:https://www.haomeiwen.com/subject/qdzshctx.html