我正在运行Arch Linux(最新的)计算机,并试图使MySQL在启动时启动。安装systemd软件包后,我可以使用systemctl,因此可以执行以下操作:
systemctl start mysqld.service
systemctl [stop|status|restart] mysqld.service
很好,当我想手动启动/停止时,效果很好,但是,要使其在启动时启动(通过在systemctl上使用“启用”,我会得到一些讨厌的输出):
[root@rudivarch ~]# systemctl enable mysqld.service
Failed to issue method call: No such file or directory
显然,由于其他命令运行良好,我对此感到非常困惑,并花了很多时间试图弄清楚... systemctl status输出如下:
[root@rudivarch ~]# systemctl status mysqld.service
mysqld.service
Loaded: loaded (/etc/rc.d/mysqld)
Active: inactive (dead) since Tue, 31 Jan 2012 15:32:28 +0000; 1min 25s ago
Process: 589 ExecStop=/etc/rc.d/mysqld stop (code=exited, status=0/SUCCESS)
Process: 257 ExecStart=/etc/rc.d/mysqld start (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/mysqld.service
有人对为什么“启用”不起作用有任何想法吗?