Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i disable unwanted services at boot?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How do I disable unwanted services from starting at boot-up. I am running Redhat linux as a desktop and mainly use it to compile c++. I do like kde desktop, but i know there are loads of services running in the background that just slows the machine down.

Also, how do I know which services are safe to disable. I really need only the basic services running. I have been a windoze user till recently, please offer some advice to a newly initiated. cheers ;-!
 
Hi,



The stuff that starts at boot time is generally controlled via the sysv init process. That is to say the servers / daemons (or services if you prefer) are started or stopped by reference to what run-level the system is at. On Redhat the run-levels are :



0 - halt (Do NOT set initdefault to this)

1 - Single user mode

2 - Multiuser, without NFS (The same as 3, if you do not have networking)

3 - Full multiuser mode

4 - unused

5 - X11

6 - reboot (Do NOT set initdefault to this)



If (as root) you do the command :



/sbin/chkconfig --list



You will see a long list of services and each one has either 'on' or 'off' flags for all of the above runlevels. If you want to turn a server off the you would do :



/sbin/chconfig --level 2345 httpd off



(example for httpd, i.e. apache)



The stuff an the bottom of the list is xinetd controlled services. You can also toggle these on or off via /sbin/chkconfig but there is no concept of runlevels for those services. They will be active when the parent sysv service 'xinetd' is active.



If you like gui tools instead you can use :



/usr/X11R6/bin/tksysv (X gui)

/usr/sbin/ntsysv (Console gui)



or new with redhat 7.2 :



/usr/bin/serviceconf (X gui)





Hope this helps















 
Well, to have a decent basic system running, you can definitely disable the following services:

- httpd
- sendmail
- named
- nis
- mysql (mysqld)
- postgres (or pgsql)
- xdm (I believe this will mean you don't boot into graphical mode, though, so you will have to start X windows with the "startx" command after logging in)

And for xinetd, you can probably remove everything except ftp and telnet (really, to be secure, you should remove those and install SSH or OpenSSH). If you never log into your machine from another machine, you can even disable those completely.

Xinetd doesn't really use a lot of resources, since it intelligently manages services in its control as they are requested, rather than having them all running all the time. The real issue with xinetd is security. You should disable anything in xinetd.conf that you aren't really using, and read up on the ones you are using to understand the security implications.

I'm sure I haven't given you a complete list of services or protocols to look for, since I am not so familiar with RedHat's default install. The only way to really understand what to enable or disable is to read up on each of the services running, to understand the implications of enabling or disabling each one. -------------------

Current reading --
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top