LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 01-17-2012, 02:57 PM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
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?
 
Old 01-17-2012, 03:05 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
1 members found this post helpful.
Old 01-17-2012, 03:08 PM   #3
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ 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.
 
Old 01-17-2012, 04:55 PM   #4
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 77
Nope. I ever logged in as root, and omitted the 'sudo' process completely. It was my 1st thought too but sadly not the issue.
 
Old 01-18-2012, 02:21 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 01-18-2012, 07:54 AM   #6
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ 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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do I get "bash: chkconfig: command not found" when I try to run chkconfig? non-thrash Fedora 10 05-20-2010 12:31 PM
chkconfig not found by bash, but is installed JimBass Linux - Newbie 4 05-09-2010 01:32 PM
chkconfig not working??? abefroman Linux - Server 6 12-22-2008 01:30 PM
I can't "service squid start" , and chkconfig squid on not working Niceman2005 Linux - Software 0 11-10-2004 08:18 PM
chkconfig --del not working?? kbaker Linux - General 1 09-30-2002 05:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 06:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration