Results 1 to 8 of 8

Thread: disabling services from cli

Hybrid View

  1. #1

    disabling services from cli

    need to disable sendmail and APM from starting up in redhat 7.2 and should I even disable the APM power management thing? I turned it off in the bios and at a lug meeting i was told you don't need it.

  2. #2

    Re: disabling services from cli

    /etc/init.d/apmd stop should do it.
    but for the sendmail service sendmail stop should do it to.

  3. #3

    Re: disabling services from cli

    Agar: do you ever try to find answers to your questions? I mean there are ~7 topics (in a short span of time) that you started into which you asked simple questions. Did you ever try to find the answer with manpages, with google before? If you did not you should, it will help you gain more autonomy.

  4. #4

    Re: disabling services from cli

    Agar: Don't worry about it! If this were a real busy board short on resourses then I would agree with GnuVince - but I am frustrated half the time becuase there are not enough questions asked here. So as far as I am conserned keep asking - hell - ask me how to spell linux if ya wanna

  5. #5

    Re: disabling services from cli

    One of the joys of Red Hat. From a command line, type setup

    one of the options is to enable/disable startup services.

    Those that are controlled by xinetd you can use chkconfig

    chkconfig <service> on/off/status that type of thing.

    for those NOT controlled by xinetd, you can use setup or you can use service. service apm stop service apm start, that kind of thing. Problem with that is that's it's only for that session. If you don't disable them in setup, or hand editing the /etc/rc.d/ files, they will start up again at next boot.

  6. #6

    Re: disabling services from cli

    haha sorry about all the simple questions. I try and play with as many things as I can on my small network and I get impatient when I can't get things to work. Other times I don't find the info I'm looking for in man pages or tutorials and whatnot so I ask.

  7. #7

    Re: disabling services from cli

    As KP mentioned chkconfig is the utility you want. Red Hat's modifications to irix's chkconfig now include support for services run from xinetd directly. Very useful feature. If you run
    chkconfig --list
    you'll see "xinetd based services:" at the bottom followed by a list of services with their state (on|off). So for example, if you wanted to quickly turn off (which also disables it from future reboots) finger you would simply issue the command:
    chkconfig finger off
    Neat huh? However there is one "gotcha" When the configuration is changed, xinetd is signaled automagically to reload the new configuration with the command "/etc/rc.d/init.d/xinetd restart", that is executed by chkconfig. What does that mean? Well, active sessions of services offered through xinetd (ie., Telnet, FTP, etc) are immediaately terminated. So unless you want to modify the xinetd script so that the reload option sends a SIGUSER1 signal (soft reconfiguration), just plan your chkconfig use when the service isn't being used by someone.

    So to recap here are some basic usages of chkconfig:
    chkconfig --list | grep sendmail Since --list by itself results in everything being displayed you pipe it through grep to narrow it down. You can parse it anyway you want, like
    chkconfig --list | grep "3:on"
    to see all runlevel 3 services or send the whole thing to a file chkconfig --list > services.txt to look at later, etc.
    chkconfig --level 35 sendmail off this would turn off sendmail for runlevels 3 and 5 (run /sbin/runlevel if your not sure which rl your using) and will leave it off.
    chkconfig --del sendmail at times removing a service altogether may be in order, sendmail for example, on client machines where incomming mail for local accounts is not required, running sendmail as a daemon may not be necessary. What this command does is remove all sendmail scripts from /etc/rc.d/rc#.d/ (where # is the runlevel) but leaves the main sendmail script located in /etc/rc.d/init.d/ intact, just in case you want to re-establish sendmail as a service for runlevels again.

    In short, you have two types of services. Those run from xinetd and those run standalone. chkconfig can handle them both. These are just a few examples to get you going. "man chkconfig" for futher info.

  8. #8

    Re: disabling services from cli


Similar Threads

  1. disabling IRQ 3
    By kanaka in forum Linux - Hardware, Networking & Security
    Replies: 7
    Last Post: 02-06-2007, 09:11 AM
  2. Disabling Firewall
    By honey bee in forum Linux - General Topics
    Replies: 2
    Last Post: 02-02-2007, 02:47 AM
  3. Disabling the monitor??
    By Rampage in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 06-30-2003, 12:53 AM
  4. disabling sound
    By chadm1967 in forum Linux - General Topics
    Replies: 3
    Last Post: 09-22-2002, 03:02 AM
  5. Disabling the console log
    By chadm1967 in forum Linux - General Topics
    Replies: 1
    Last Post: 12-16-2001, 12:30 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts