【问题标题】:Can't add Apache to start at boot with chkconfig (opensuse 13.1)无法使用 chkconfig 添加 Apache 以在启动时启动(opensuse 13.1)
【发布时间】:2014-09-08 15:55:19
【问题描述】:

我正在运行 opensuse 13.1,并安装了 Apache2 作为 LAMP 的一部分。

Apache2 工作得很好,只是我无法使其开机自动启动

我使用了“chkconfig -a apache2”命令(如here 所述) 这给出了一个错误"apache2: unknown service"

感谢任何提示。

【问题讨论】:

    标签: apache lamp opensuse


    【解决方案1】:

    Apache2 已迁移到 systemd。 chkconfig 仅适用于 SysV 服务。

    以下命令(显然)对我有用:

    systemctl enable apache2.service
    

    OpenSUSE 文档似乎不同步。

    【讨论】:

      【解决方案2】:

      查找服务的名称:

      ls -al /etc/init.d/
      

      (寻找 apache 或 httpd)

      然后在 chkconfig 中使用该名称。

      【讨论】:

      • 找不到 apache 或 httpd
      • 只是告诉你,我使用 [rcapache2 start] 命令启动 apache
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-19
      • 1970-01-01
      • 1970-01-01
      • 2017-03-19
      • 2013-10-29
      相关资源
      最近更新 更多