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设置服务开机启动失败问题的更多相关文章

  1. centos设置服务开机启动

    Linux CentOS设置服务开机启动的方法 by 天涯 · 2013/07/26 CentOS设置服务开机启动的两种方法 1.利用 chkconfig 来配置启动级别 在CentOS或者RedHa ...

  2. CentOS设置服务开机启动的方法

    CentOS设置服务开机启动的两种方法 1.利用 chkconfig 来配置启动级别在CentOS或者RedHat其他系统下,如果是后面安装的服务,如httpd.mysqld.postfix等,安装后 ...

  3. CentOS设置服务开机启动的两种方法

    一.通过服务的方式设置自启动 1.  在/etc/init.d 下建立相关程序的启动脚本 2.  chkconfig --add mysqld(添加服务到chkconfig列表中) chkconfig ...

  4. centos 6 与 centos 7 服务开机启动、关闭设置的方法

    简单说明下 centos 6 与 centos 7 服务开机启动.关闭设置的方法: centos 6 :使用chkconfig命令即可. 我们以apache服务为例: #chkconfig --add ...

  5. CentOS设置服务开机自动启动【转】

    CentOS设置服务开机自动启动[转]Posted on 2012-06-28 16:00 eastson 阅读(4999) 评论(0) 编辑 收藏 CentOS安装好apache.mysql等服务器 ...

  6. CentOS设置程序开机启动程序/服务的方法(转)

    注意:CentOS 6下基本没什么问题,CentOS 7估计不一定能行. 在CentOS系统下,主要有两种方法设置自己安装的程序开机启动. 1.把启动程序的命令添加到/etc/rc.d/rc.loca ...

  7. centos设置服务开机自启动

    在CentOS或者RedHat其他系统下,如果是后面安装的服务,如httpd.mysqld.postfix等,安装后系统默认不会自动启动的.就算手动执行/etc/init.d/mysqld start ...

  8. centos设置服务开机自动启动的方法

    centos安装好apache,mysql等服务器程序后,并没有设置成开机自动启动的,为避免重启后还要手动开启web等服务器,还是做下设置好,其实设置很简单,用chkconfig命令就行了. 例如要开 ...

  9. centos设置tomcat开机启动

    1.编辑开机启动脚本 vi /etc/init.d/tomcat8 #!/bin/bash # tomcat8:start|stop|restart # chkconfig: 345 90 10 # ...

随机推荐

  1. zookeeper的监控

    1.idea插件: zookeeper https://blog.csdn.net/long290046464/article/details/52974061 优点:直接查看,不用来回切换监控 缺点 ...

  2. 使用text-align:justify,让内容两端对齐,兼容IE及主流浏览器的方法

    如果不喜欢看分析过程,可以跳到最后看最终兼容方案 史前方法: 以前实现两端对齐是这样的: <p class="box1">密  码</p> <p cl ...

  3. ojdbc6下载地址

    https://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html oracle驱动先去官网下 ...

  4. python csv与字典操作

    # encoding: utf-8 import csv d1 = {'banana':3,'apple':4,'pear':1,'orange':2} d2 = {'banana':3,'orang ...

  5. docker-compose 案例

    官网示例: 安装wordpress version: " services: db: image: mysql:5.7 volumes: - db_data:/var/lib/mysql r ...

  6. python 面向对象(三)类与类之间的关系 初始化方法一些类

    ###################总结################# 面试的时候 让写python一些特殊方法 __init__ 创建对象的时候初始化 __new__对象实例化调用第一个方法 ...

  7. CentOS 6.8升级OpenSSH7.7p

    近期因centos 6.x 默认openssh扫描存在大量漏洞,基于安全考虑,需要将openssh_5.3p1升级为最新版,网上查了很多教程,发现openssh存在大量依赖,不解决依赖问题很难保证其他 ...

  8. UESTC - 1999 也许这是唯一能阻止乐爷AK的方法( Just for Fun )(回文树)

    https://vjudge.net/problem/UESTC-1999 题意 对于一个初始为空的字符串S,你可以进行以下两种操作: 1. 在S的末尾加一个小写字母. 2. 移除S的最后一个字母. ...

  9. tomcat源码研究之源码导入eclipse

    版本:8.5.x官网:https://tomcat.apache.org/svn.html1. 下载源码,git镜像:https://github.com/apache/tomcat85 .2. 导入 ...

  10. ueditor 百度编辑器 粘贴的table表格样式边线

    粘贴html的table表格会有间隔大,黑色边线,可以在: ueditor.all.js 里 找到以下处,修改里面的样式即可 me.ready(function () { utils.cssRule( ...