Results 1 to 10 of 10

Thread: Disabling services on starup

  1. #1
    Join Date
    Apr 2003
    Posts
    13,270
    Rep Power
    35

    Default Disabling services on starup

    I installed mysql server and an asp server on my computer and I now see that they startup when I boot into mandrake.

    How do I disable these servers from starting up when I log in to mandrake?
    "The best software is the one that fits your needs." - A_A

    Virus free since: date unknown
    Anti-virus free since: August 2008

  2. #2
    Join Date
    Aug 2002
    Posts
    1,257
    Rep Power
    0

    Default Re: Disabling services on starup

    You can remove the Symbolic link to the program executable found in /etc/rc.d/init.d form the corresponding runlevel directory e.g /etc/rc.d/rc5.d -- which corresponds to runlevel 5.

  3. #3
    Join Date
    Sep 2002
    Posts
    3,270
    Rep Power
    0

    Default Re: Disabling services on starup

    Quote Originally Posted by tech_guru
    You can remove the Symbolic link to the program executable found in /etc/rc.d/init.d form the corresponding runlevel directory e.g /etc/rc.d/rc5.d -- which corresponds to runlevel 5.
    Omar I expect better from you.

    Arch: Do not manually remove symlinks as suggested... this is an
    inefficient method that can cause unforeseen problems.

    There is a standard linux program called chkconfig
    Open a pure console, or x based terminal and run this command

    man chkconfig

    You should get a screen like this....
    Code:
    CHKCONFIG(8)                                         CHKCONFIG(8)
    
    
    
    NAME
           chkconfig - enable or disable system services
    
    
    SYNOPSIS
           chkconfig -t|--terse [names]
           chkconfig -s|--set [name state]
           chkconfig -e|--edit [names]
           chkconfig -c|--check name [state]
           chkconfig -l|--list [--deps] [names]
           chkconfig -a|--add [names]
           chkconfig -d|--del [names]
    
    
    DESCRIPTION
           chkconfig is used to manipulate the runlevel links at boot
           time (see init.d(7)).  It can be thought of as a  frontend
           to  insserv(8).  Chkconfig can run in six different modes:
           terse list mode, set mode, edit mode, list mode, add  mode
           and  delete mode. The last three modes were added for com*
           patiblity reasons.
    Read it and be edified.

    Now an example of the command in action:

    prometheus:/home/gillion # chkconfig --list

    Will prouduce the following output... ( i shortened and modfied it )
    Code:
    SuSEfirewall2_final       0 off   1 off   2 off   3 on    4 on    5 on    6 off
    SuSEfirewall2_init        0off   1off   2on    3on    4 on    5 on    6 off
    SuSEfirewall2_setup       0off   1off   2off   3on    4on    5on    6off
    acct                      0off   1off   2off   3off   4off   5off   6off
    acpid                     0off   1off   2off   3off   4off   5off   6off
    alsasound                 0off   1off   2on    3on    4off   5on    6off
    apache2                   0off   1off   2off   3off   4off   5off   6off
    apmd                      0off   1off   2on    3on    4off   5on    6off
    atalk                     0off   1off   2off   3off   4off   5off   6off
    atd                       0off   1off   2off   3off   4off   5off   6off
    autofs                    0off   1off   2off   3off   4off   5off   6off
    bluetooth                 0off   1off   2off   3on    4off   5on    6off
    As you can guess, the numbers are the runlevels that certain services will be or not be started for.

    Manually removing symlinks is to invite pain. It can be done but it is time consuming and inefficient.

    You can use chkconfig to specify that a service be shutdown or started for an specified set of runlevels or all runlevels.

    Thats fexibility in my opinion.

    By the way mandrake has a gui/console level tool that can turn on and off services.
    You get to it (if i accurately recall) by using by the command drakservices which is possible in either GUI and TextMode.

    --omar remind me to let the air out of your car tires one of these days or at least scratch the paint job.

    Gillion
    Those who do not understand UNIX are doomed to reinvent it poorly.

  4. #4
    Join Date
    Aug 2002
    Posts
    1,257
    Rep Power
    0

    Default Re: Disabling services on starup

    Yes Chkconfig is the right tool...
    I tried to-reinvent the wheel poorly....

    Wise man told me there is always a Unix tool command for whatever you can think of....

  5. #5
    Join Date
    Apr 2003
    Posts
    13,270
    Rep Power
    35

    Default Re: Disabling services on starup

    Thanks Tech_guru, Gillion.

    Will try it out.
    "The best software is the one that fits your needs." - A_A

    Virus free since: date unknown
    Anti-virus free since: August 2008

  6. #6
    Join Date
    Aug 2002
    Posts
    3,959
    Rep Power
    25

    Default Re: Disabling services on starup

    The equivalent tool on Red Hat is ntsysv.

    You can use it to decide which rpm's will start when the system boots.

    Just type ntsysv and the programme will open up.

    I guess you can configure compiled programmes so that ntsysv will work as well. The rpm's are configured by default.

  7. #7
    Join Date
    Apr 2003
    Posts
    13,270
    Rep Power
    35

    Default Re: Disabling services on starup

    Thanks guys. That worked.
    Gillion, the gui service tool under mandrake is drakxservices.
    "The best software is the one that fits your needs." - A_A

    Virus free since: date unknown
    Anti-virus free since: August 2008

  8. #8
    Join Date
    Sep 2002
    Posts
    3,270
    Rep Power
    0

    Red face Re: Disabling services on starup

    <edit jamrock post>
    The equivalent tool on Red Hat is ntsysv.

    You can use it to decide which services will start when the system boots into a specificied runlevel.

    Just type ntsysv on an consle or xterminal and the program will open up.

    It is strictly a matter of installing a System V style init script for any program you want to start at boot for a specified runlevel. Once this init script is inplace in /etc/init.d then ntsysv will pick it up and create a menu entry for it. ntsysv is just another fancy interface to chkconfig.

    To reduce confusion. The configuration of certain programs to start at boot/run level occurs when the rpm application itself runs the pre-install or post-install scripts embedded in the rpm archive/package.
    So when making an rpm, you the packager, must ensure that your scripts are fully functional and "bug free" so that come install time they run without drama. these scripts are key to the magic behind transparent service installations.

    </edit jamrock post>

    I couldn't resisit it anymore.

    --gillion
    Last edited by Gillion; Aug 18, 2004 at 08:17 AM.
    Those who do not understand UNIX are doomed to reinvent it poorly.

  9. #9
    Join Date
    Aug 2002
    Posts
    3,959
    Rep Power
    25

    Default Re: Disabling services on starup

    It is strictly a matter of installing a System V style init script for any program you want to start at boot for a specified runlevel. Once this init script is inplace in /etc/init.d then ntsysv will pick it up and create a menu entry for it.
    Agreed. I just don't want to have to explain the whole boot up and /etc/init.d process.

    I am setting up a new domain controller and I want to see how long we can go before rebooting. I will be creating scripts for all the compiled programmes to make it easy to restart them.

    I will have to install the equivalent rpm's on a test machine and have a look at the scripts that get created. I also need to get a better understanding of the whole boot up and shut down processes. I have read about it but I don't have the full understanding.

  10. #10
    Join Date
    Sep 2002
    Posts
    3,270
    Rep Power
    0

    Default Re: Disabling services on starup

    ohh when you get the understanding of it... you'll kick yourself silly
    Those who do not understand UNIX are doomed to reinvent it poorly.

Posting Permissions

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