zoukankan      html  css  js  c++  java
  • linux将apache设置为系统服务和开机自启

    1> 查看一下/etc/init.d/下是否存在httpd这个服务

    ls /etc/init.d/ | grep httpd 如果没有执行下一步

    2>将自己安装目录下的apachect1复制到该目录下并改为httpd

    cp /home/houqingdong/http-exe/bin/apachect1 /etc/init.d/httpd 注:红色为自己的安装目录

    3>执行 chkconfig --add httpd 目的是想新增所制定的系统服务 但是会出现以下警告:

    Linux下将Apache(httpd)新增为系统服务及开机自启动

    这里说的是httpd服务不支持chkconfig , 添加支持: vi /etc/init.d/httpd 在 #!/bin/sh 下添加这两句:

    #chkconfig:345 85 15

    #description:Start and stop the Apache HTTP Server 最终结果为:

    Linux下将Apache(httpd)新增为系统服务及开机自启动

    4> 执行: chkconfig --add httpd

    chkconfig httpd on 就可以添加成功了

    5>查看一下是否添加成功:

    chkconfig --list httpd

    Linux下将Apache(httpd)新增为系统服务及开机自启动

  • 相关阅读:
    oracle-sql脚本
    vue生命周期
    使用vue搭建项目(创建手脚架)
    bootcss
    miniMobile(手机)
    mui(手机)
    layui
    Element
    如何学好Spring
    使用Vue做评论+localStorage存储(js模块化)
  • 原文地址:https://www.cnblogs.com/gyrgyr/p/10741979.html
Copyright © 2011-2022 走看看