linux下systemctl enable (service名)时出现file exists的解决办法
来源:互联网 发布:淘宝会员怎么解绑虾米 编辑:程序博客网 时间:2024/06/07 05:49
有时候我们在Linux下(我主要是是在centos平台,想来不同的平台应该差异没有那么大)配置好一项服务的时候,会使用一个命令,那就是
systemctl enable (service名),
但是如果一次没有配置成功的话,经常需要重复的第二次配置,但是如果忘记remove时候,就会出现比较奇怪的错误,比如会提示报错说file exists,这时候就需要先systemctl disable (服务名)。
这是因为在systemctl enable (service名)时候,实际上是创建了一个链接,这里以我的vncserver@:1.service为例,我们可以看到实际上是创建了一个symlink,系统链接,从/etc/systemd/system/multi-user.target.wants/vncserver@:1.service 到 /etc/systemd/system/vncserver@:1.service
我们这时候在/etc/systemd/system/下面也是能够看得到这个vncserver@:1.service的链接
所以再次操作的时候,要记得使用 systemctl disable 命令清除掉
阅读全文
0 0
- linux下systemctl enable (service名)时出现file exists的解决办法
- Linux下出现Read-only file system的解决办法
- Linux下出现Read-only file system的解决办法
- Linux下出现Read-only file system的解决办法
- Linux下执行程序出现 Text file busy 时的解决办法
- Linux下执行程序出现 Text file busy 时的解决办法
- Linux下执行程序出现 Text file busy 时的解决办法。
- 关于vsftp出现Restarting vsftpd (via systemctl): Job for vsftpd.service failed because the control 的解决办法
- 关于vsftp出现Restarting vsftpd (via systemctl): Job for vsftpd.service failed because the control 的解决办法
- 关于vsftp出现Restarting vsftpd (via systemctl): Job for vsftpd.service failed because the control 的解决办法
- 远程解决centos的网络问题: service network start 出现RTNETLINK answers: File exists错误解决
- 远程解决centos的网络问题: service network start 出现RTNETLINK answers: File exists错误 【转】
- linux下rtnetlink answers file exists的解决方案
- linux下rtnetlink answers file exists的解决方案
- Git出现Unable to create 'E:/xxx/.git/index.lock': File exists.的解决办法
- linux系统安装php时编译php5.5.0出现“set --enable-opcache=no ”错误的解决办法
- Linux下出现 error: mysql.h: No such file or directory 的解决办法
- Centos7下的systemctl命令与service和chkconfig
- group by 高级用法超详细总结
- Qt之设置QWidget背景色
- 机器学习实战——KNN(K近邻算法)
- Java实现文件上传下载工具类
- Hibernate4中hibernate.cfg.xml文件的配置
- linux下systemctl enable (service名)时出现file exists的解决办法
- error: couldn't remove '/Users/mobilewise/Library/Developer/Xcode/DerivedData错误
- 1054. 求平均值 (字符串处理)
- 致自己
- 简单说 如何做一个chrome 去广告插件
- 怎样理解“互联网+”以及怎么“+”?
- SpringBoot非官方教程 | 第二篇:Spring Boot配置文件详解
- MFC 窗口最大化和最小化,全局变量的使用、static居中显示、static的背景色设置为透明、根据屏幕自适应调整界面大小
- JSP获取List集合大小