/etc/profile缺少/sbin路径 最近发现apache mysql 开机不能自动启动
Tofloor
poster avatar
ajivanet
deepin
2017-08-30 17:58
Author
查了发现很多命令不能用  chkconfig  
使用whereis 发现在  /sbin 里面,但是不能执行
所以在 /etc/profile 里面的  第一个else 里面追加了  :/sbin

命令恢复了, 重启电脑,apache mysql 都能正常开机自启动了。
仅供参考
Reply Favorite View the author
All Replies
avatar
jingle
deepin
2017-08-30 18:22
#1
sudo apt-get install chkconfig
Reply View the author
avatar
DebuggerX
deepin
2017-08-30 18:53
#2
现在是用systemctl命令代替chkconfig了,所以默认没有chkconfig。。。
列出所有服务:systemctl list-unit-files
查看mysql服务:systemctl list-unit-files | grep mysql
开机启动mysql:systemctl enable mysql.service
禁止开机启动:systemctl disable mysql.service
运行mysql服务:systemctl start mysql.service
停止mysql服务:systemctl stop mysql.service
Reply View the author