chkconfig command not found
时间:2020-03-05 15:31:49 来源:igfitidea点击:
问题:
需要在引导时启动tomcat
$sudo chkconfig --add tomcat -bash: chkconfig: command not found
我以为它没有安装,但它是在地方。
$sudo yum install chkconfig Loaded plugins: fastestmirror Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository addons is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration Repository contrib is listed more than once in the configuration Loading mirror speeds from cached hostfile * base: mirror.symnds.com * extras: mirror.cogentco.com * updates: mirror.lug.udel.edu Setting up Install Process Package chkconfig-1.3.30.2-2.el5.x86_64 already installed and latest version Nothing to do
在Google上快速搜索后发现,它可能位于/sbin/chkconfig。
$sudo /sbin/chkconfig chkconfig version 1.3.30.2 - Copyright (C) 1997-2000 Red Hat, Inc. This Jan be freely redistributed under the terms of the GNU Public License. usage: chkconfig --list [name] chkconfig --add <name> chkconfig --del <name> chkconfig [--level <levels>] <name> <on|off|reset|resetpriorities>
bash希望chkconfig脚本其中?
$sudo which chkconfig which: no chkconfig in (/usr/bin:/bin)
好的,让我们创建一个符号链接
sudo ln -s /sbin/chkconfig /usr/bin/
现在能用了吗?
$sudo chkconfig chkconfig version 1.3.30.2 - Copyright (C) 1997-2000 Red Hat, Inc. This Jan be freely redistributed under the terms of the GNU Public License. usage: chkconfig --list [name] chkconfig --add <name> chkconfig --del <name> chkconfig [--level <levels>] <name> <on|off|reset|resetpriorities>