zoukankan      html  css  js  c++  java
  • Linux上添加服务(htttpd,samba等等)

    service httpd restart   出现 httpd:unrecognized service 错误

    vi /etc/rc.d/rc.local #在/etc/rc.d/rc.local中增加启动apache的命令
    添加:
    /usr/local/apache2/bin/apachectl start
    或者               

     #将apache注册为系统服务

    # cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd

    #chmod 700 /etc/rc.d/init.d/httpd
    #vi /etc/rc.d/init.d/httpd
       在第三行后增加
       #Comments to support chkconfig on RedHat Linux
       #chkconfig: 2345 90 90
       #description:http server
    注意:没有这几行,在使用chkconfig时会提示你:service httpd does not support chkconfig。
    chkconfig --add httpd
    chkconfig --level 2345 httpd on

  • 相关阅读:
    匿名内部类详解
    成员内部类详解
    内部类
    局部内部类详解
    switch
    Enum 类型
    循环
    标号
    软件开发模型
    RUP
  • 原文地址:https://www.cnblogs.com/zikai/p/4964830.html
Copyright © 2011-2022 走看看