自官方CentOS8的维护结束,改为CentOS Stream时,我们公司的大部分生产环境都切换为了SUSE Linux Enterprise Server 15 SP3
。
在制作镜像安装服务时遇到了无法enable服务的问题:
host:~ # systemctl enable metricbeat.service
Synchronizing state of metricbeat.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable metricbeat
/sbin/insserv: No such file or directory
host:~ #
是因为SUSE不自带insserv-compat
软件包,安装即可:
zypper install -y insserv-compat
完事~
host:~ # systemctl enable metricbeat.service
Synchronizing state of metricbeat.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable metricbeat
Created symlink /etc/systemd/system/multi-user.target.wants/metricbeat.service → /lib/systemd/system/metricbeat.service.
冶心·练体·得技