【发布时间】:2014-04-04 12:23:52
【问题描述】:
我希望我的已编译 apache2 服务器在我的 OpenSuse 12.3 服务器启动时运行。
我按照https://serverfault.com/questions/16839/how-do-i-get-apache-to-startup-at-bootime-on-linux中列出的程序,即:
创建文件 /etc/init.d/apache2
-
将其添加到服务中
chkconfig --add apache2
我可以看到它在 YaST 的运行级别管理器中列出(不确定确切的名称,因为我的发行版是西班牙语)
apache2 Yes*
我认为这意味着该服务配置为在启动时启动,但在我检查时并未运行。
我的/etc/init.d/apache2的内容是:
#!/bin/bash
#
### BEGIN INIT INFO
# Provides: apache2
# Default-Start: 3 5
# Description: Controlar el servidor apache2
### END INIT INFO
/home/servidor/apache/bin/apachectl $@
我尝试更改文件的权限,通过 systemd 启用服务,几乎所有我在网上找到的东西都无济于事:
systemctl start apache2.service
systemctl enable apache2.service
chkconfig apache2 on
任何帮助将不胜感激。
【问题讨论】:
标签: apache boot opensuse runlevel