码迷,mamicode.com
首页 > 其他好文 > 详细

centos设置服务开机启动失败问题

时间:2019-02-15 18:21:04      阅读:407      评论:0      收藏:0      [点我收藏+]

标签:tar   from   depend   direct   for   sql   设置   ssi   lvm   

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
重新设置开机启动

centos设置服务开机启动失败问题

标签:tar   from   depend   direct   for   sql   设置   ssi   lvm   

原文地址:https://www.cnblogs.com/jinyuanliu/p/10384802.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!