LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Chkconfig Installed But Not Working (https://www.linuxquestions.org/questions/red-hat-31/chkconfig-installed-but-not-working-924294/)

carlosinfl 01-17-2012 02:57 PM

Chkconfig Installed But Not Working
 
I've got a RHEL 5.7 server running and when it boots, Apache (httpd) is not being enabled so I verified I had 'chkconfig' package installed:

Code:

[root@venus ~]# rpm -qa | grep chkconfig
chkconfig-1.3.30.2-2.el5

Now I also verified the 'man' page which is also installed but when I try any of the commands, I get an error indicating that the command 'chkconfig' isn't recognized in Bash:

Code:

[root@venus ~]# chkconfig --list 2345
bash: chkconfig: command not found

[root@venus ~]# chkconfig --add httpd
bash: chkconfig: command not found

I called Red Hat and they were no help. They wanted to do some custom start script rather than resolve the problem. I do have the start scripts all present in /etc/init.d/ but I have no idea why 'chkconfig' utility isnt working. Anyone?

acid_kewpie 01-17-2012 03:05 PM

this sort of error is usually down to you having run "su" to become root instead of "su -", meaning you don't have /sbin/ in your path Did I guess right? You can run "/sbin/chkconfig" to use the absolute path.

T3RM1NVT0R 01-17-2012 03:08 PM

@ Reply
 
Hi carlosinfl,

acid_kewpie is right if you have gained access using su then make sure you either run su - root or su -. Another thing that I have noticed is that the package is not showing up the architecture.

Syntax is also not correct. chkconfig --list 2345 is not correct. The correct way is chkconfig --list <service name>. If you want to turn a service on on all levels then run chkconfig <service name> on.

carlosinfl 01-17-2012 04:55 PM

Nope. I ever logged in as root, and omitted the 'sudo' process completely. It was my 1st thought too but sadly not the issue.

acid_kewpie 01-18-2012 02:21 AM

well no one mentioned sudo. sudo is not su.

so did you try the other things we mentioned? I'm sure you can check for yourself to see if the files actually exist or not. You shouldn't be hitting a brick wall this quickly.

T3RM1NVT0R 01-18-2012 07:54 AM

@ Reply
 
Did you check if /sbin/chkconfig file exist or not? If yes, then try to run it as /sbin/chkconfig. If that also didn't work try to run
Code:

rpm -qf /sbin/chkconfig
and see what information you get.


All times are GMT -5. The time now is 02:32 PM.