3

我希望 Apache2 启动 att boot。这就是我所拥有的

ls -l

/etc/init.d/rc5.d

列出了许多其他内容,其中包括:

lrwxrwxrwx 1 root root 10 Aug 18 10:35 S12apache2 -> ../apache2

/etc/init.d/确实位于'apache2'中。在ls -lapache2 列表中

-rwxr--r-- 1 root root 10635 Feb 18 22:09 apache2

/sbin/chkconfig -a apache2印刷

apache2                   0:off  1:off  2:off  3:on   4:off  5:on   6:off

为了让 Apache 在启动时启动,这不应该是必要的吗?

我通常开始手动使用sudo /usr/sbin/rcapache2 restart

/尼克拉斯

4

2 回答 2

3

chmod 755 /etc/init.d/apache2解决它

于 2011-08-18T12:56:34.333 回答
1

请注意,从 openSUSE 12 开始,systemd 是流行的 SysV init 守护进程的替代品。Systemd 与 SysV init 完全兼容(通过支持 init 脚本)。systemd 的主要优势之一是它通过积极地并行服务启动来大大加快启动时间。

永久启用 apache2 服务的命令:

# systemctl enable apache2.service

注意:在命令行启用服务时,它不会自动启动。它计划在下一次系统启动或运行级别/目标更改时启动。为了立即启动服务,显式运行systemctl start service_name.service(即systemctl start apache2.service)。

(有关 systemd 守护进程的更多信息:https ://doc.opensuse.org/documentation/html/openSUSE_122/opensuse-reference/cha.systemd.html )

于 2015-01-08T05:37:08.997 回答