8

By default, if my Linux is booted, some services
like httpd, named start automatically.
I want to start them manually, I want to remove them from autostartup.
In the internet, it is said that it is possible with systemctl and chkconfig commands.
My Linux supports both of them.
How exactly and which command I can do it with?
My Linux version is: Redhat EL5.

it dev
  • 305
  • 1
  • 4
  • 11

1 Answers1

16

If your system has both:

chkconfig service off

systemctl disable service

RHEL5 uses chkconfig by default. On a side note, I recommend upgrading because RHEL 5 has been EOL since March 31st, 2017 unless you have purchased the Extended Life Cycle Support Add-On subscription.

Nasir Riley
  • 10,665
  • 2
  • 18
  • 27
  • If I write on the terminal: `chkconfig httpd off` --> will it remove `httpd` from autostart? – it dev Apr 08 '19 at 09:57
  • What do you recommend upgrading? O/S? Is RHEL 5 only has been EOL? Or all releases of RHEL ? – it dev Apr 08 '19 at 10:01
  • 1
    @itdev 1) Yes, that command will stop the service from starting at boot. It would then need to be started manually which is what you want. 2) RHEL 5 is EOL. RHEL 6 and RHEL 7 are still supported. I recommend going to RHEL 7 as 6 is EOL next year. – Nasir Riley Apr 08 '19 at 11:40
  • Thank you for perfect explanation! And last question, how is it advised going to RHEL 7? By installing new OS or just by upgrading OS with some commands? – it dev Apr 08 '19 at 12:37
  • @itdev You must perform a fresh install. – Nasir Riley Apr 08 '19 at 12:55