1、安装某服务设置开机启动的时候报错

[root@node1 ~]# systemctl enable lvm2-lvmetad.service
The unit files have no [Install] section. They are not meant to be enabled
using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
.wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
D-Bus, udev, scripted systemctl call, ...).

2、添加配置

vim /usr/lib/systemd/system/lvm2-lvmetad.service 

在最后添加如下内容:

[Install]
WantedBy=multi-user.target
重新设置开机启动

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-27
  • 2022-01-07
  • 2021-08-30
  • 2022-02-10
  • 2022-02-19
猜你喜欢
  • 2022-12-23
  • 2021-07-06
  • 2022-12-23
  • 2021-09-06
  • 2022-12-23
  • 2021-07-18
  • 2022-02-10
相关资源
相似解决方案