LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Some commands not running in primary nameserver using cetos 5.6 (https://www.linuxquestions.org/questions/linux-newbie-8/some-commands-not-running-in-primary-nameserver-using-cetos-5-6-a-908520/)

SarahGurung 10-17-2011 12:08 AM

Some commands not running in primary nameserver using cetos 5.6
 
hello everyone,

when i logged into my primary name server and typed the command chkcongig --list (as i have been newely recruited),it said that the command is not found...is it that i have to add path in _bash_profile?if so then how and what should i add?

And when i used the command yum check-update,it said yum-lock..what does that mean and what should i do?
Please help me...it has centos 5.6...

routers 10-17-2011 12:33 AM

chkcongig --list <- your typo

use
Quote:

[root@host ~]# chkconfig --list
about yum lock u need to kill or stop existing process

Quote:

[root@host ~]# ps x |grep yum
and kill the pid number with eg kill -9 654643

ps: stop yum-updatesd if it running

SarahGurung 10-17-2011 02:00 AM

thanks ...

ya updatesd is running continuously...but how to stop it and can u please tell me why is it running?

and i'm not clear about the chkconfig command again,can you please elaborate your explanation?

hen770 10-17-2011 02:18 AM

On CentOS it should be chkconfig with "f" not with "g" as you have wrote above.
Also try to be root if not then try /sbin/chkconfig.

routers 10-17-2011 02:54 AM

Quote:

Originally Posted by SarahGurung (Post 4500286)
thanks ...

ya updatesd is running continuously...but how to stop it and can u please tell me why is it running?

and i'm not clear about the chkconfig command again,can you please elaborate your explanation?

first:
yup , yum-updatesd is running by default , for me i no need this services "that for me"
so i just remove the software with "yum remove yum-updatesd"
because this yum-updatesd is use for auto update system which i no need


second

chkconfig is use for controlling when you want to start or off the program from running
chkconfig --list will give you list of current status of program

example: chkconfig sendmail off <- this will off sendmail from running
for more info look here http://www.centos.org/docs/5/html/De...chkconfig.html

SarahGurung 10-17-2011 03:45 AM

well hen770,it tried with chkconfig only,the above one is a typing mustake,sorry....

and "Routers", i logged in as root and tried that command,it's saying chkconfig command not found...i want to see the services running and their runlevels and status as well...so what could be the possible problem?

routers 10-17-2011 03:58 AM

then do

Code:

yum install chkconfig
as root

SarahGurung 10-17-2011 04:05 AM

it has been already installed by my boss,it's a running and live server,he isn't here so i was tryin to see the services by doing ssh and logging in as root but says command not found....when my boss did ssh last time,that command was working but isnt working from my pc..

So i was wondering that maybe i need to configure the _bash_profile and add some system path or variables,i'm not quite sure..

can anyone help on this?

routers 10-17-2011 04:41 AM

ls -l /sbin/chkconfig

post the output here

and dont forget to run with su -

SarahGurung 10-17-2011 05:06 AM

hey thank you so much "routers".....will never forget your help...

it worked now....Thank you once again....

if you don't mind then can you please tell me how can i put off all the listed services that were listed by chkconfig --list?

deep27ak 10-17-2011 05:20 AM

you can use this command

Code:

#chkconfig --level 345 (service_name) off

here '345' are the levels where you want the service to be off

to make the service 'on' just put the 'off' to 'on'

SarahGurung 10-17-2011 05:40 AM

thanks mr.deepak,you have helped me a lot...can you also tell me what does runlevel 2 and 4 stand for?

deep27ak 10-17-2011 05:58 AM

IN red hat linux

run level 2---it is user defined run level which is not used
run level 4---is where you the system boots without networking features


you 're always welcome :)

SarahGurung 10-17-2011 06:01 AM

ok thanks a lot...got it...

will get back to you if i get any doubts again........

thanks once again.....

michaelk 10-17-2011 06:15 AM

It depends on the distribution. Redhat runlevels are:
Quote:

0 Halt
1 Single-User mode
2 Multi-user mode no GUI, no networking
3 Multi-User mode, no GUI with networking
4 Not used/User-definable
5 Multi-User mode, GUI with networking.
6 Reboot


All times are GMT -5. The time now is 11:22 PM.