轉載自:https://blog.csdn.net/forrestGTJU/article/details/109818876
問題:
root@qdlwb:/home/lwb# chkconfig mysql on
chkconfig: command not found #沒有安裝chkcofig
方案:
第一步:root@qdlwb:/home/lwb# vim /etc/apt/sources.list
在這個文檔中得最后一行添加如下文本:
deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse
第二步:更新apt-get,在終端輸入sudo apt-get update
第三步:完成更新后,重新安裝sysv-rc-conf,在終端輸入sudo apt-get install sysv-rc-conf,即可成功安裝。
第四步:ls /usr/sbin | grep sysv #確認是否存在
第五步:更名
cp /usr/sbin/sysv-rc-conf /usr/sbin/chkconfig
ls /usr/sbin | grep chk #確認修改成功
第六步:#賦予權限
cd /usr/sbin
chmod 755 chkconfig
第七步:#測試一下
chkconfig