亦余心之所善兮,虽九死其犹未悔。这篇文章主要讲述CentOS/Rocky8中设置cockpit自启动相关的知识,希望能为你提供帮助。
在系统中使用虚拟机,之前使用的时virt-manager,但红帽子的文档中说使用cockpit进行逐渐替代,因此个人也逐渐转移自己的使用方法。但是cockpit这个服务配置自启动时遇到了问题,使用sudo systemctl enable cockpit报错如下:
The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled using systemctl.Possible reasons for having this kind of units are:
? A unit may be statically enabled by being symlinked from another units
.wants/ or .requires/ directory.
? A units purpose may be to act as a helper for some other unit which has
a requirement dependency on it.
? A unit may be started when needed via activation (socket, path, timer,
D-Bus, udev, scripted systemctl call, ...).
? In case of template units, the unit is meant to be enabled with some
instance name specified.
【CentOS/Rocky8中设置cockpit自启动】根据提示服务的unit文件中[Install]单元部分找不到WantedBy=, RequiredBy=, Also=, Alias=的相关设置,所以不能使用systemctl来配置自启动,修改文件/usr/lib/systemd/system/cockpit.service,末尾添加内容如下:
[Install]
WantedBy=multi-user.target
推荐阅读
- oeasy教您玩转python - 4 - # 调试程序
- #yyds干货盘点#用户身份与文件权限
- 操作符详解
- Zabbix主被动模式+server-proxy配置
- MySQL主从复制原理及搭建过程
- Linux中是谁占用了我的端口
- Dubbo 3 深度剖析 - 透过源码认识你
- 数据结构综合列表
- 单个资源预留的数据结构