Martin DiViaio on Tue, 11 Mar 2003 10:38:05 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] "services" under Linux


The "Services" list is a list of scripts in the /etc/rc.d/init.d 
directory. These scripts can be started at boot time to perform various 
boot operations. For instance: iptables is not really a service but a 
script to load your firewall rules at boot time.

Redhat has two CLI programs that help with maintaining these scripts.

/sbin/service is a shell script that will run scripts in the 
/etc/rc.d/init.d directory. The options you give to the service script 
will be handed to the init script. Like:

/sbin/service at start

is the same as

/etc/rc.d/init.d/at start

/sbin/chkconfig is the script that can turn on or off a service script by
run level. chkconfig has a fairly complete man page so I would suggest
reading it. chkconfig can turn on/off xinetd services as well. If you use
chkconfig to handle a xinetd service it will automatically HUP xinetd for
you.

By the way, most of the scripts in the /etc/rc.d/init.d directory take 
other options besides start and stop. Almost all have a status option. 
Some have more options than that.

--
GPG Fingerprint: C900 18EF 0C36 4EAF A93C  F073 85D4 8B3C F3D8 077B

On the 11th day of March in the year 2003 you wrote:

> Date: Tue, 11 Mar 2003 10:02:40 -0800
> From: Wayne Dawson <jongalt@pinn.net>
> To: plug@lists.phillylinux.org
> X-Spam-Status: No, hits=-1.3 required=5.0
> 	tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01
> 	version=2.44
> Subject: Re: [PLUG] "services" under Linux
> 
> At 07:27 AM 3/11/03 -0500, you wrote:
> >On Tue, Mar 11, 2003 at 06:57:44AM -0800, Wayne Dawson wrote:
> > > What exactly is a service?
> >
> >A service is also refered to as a daemon under unix. Daemons typically
> >run in user-land memory space, but can run as part of the kernel (system
> >core) if necessary. They are usually triggered at startup from scripts
> >running in /etc/init.d/.
> >
> > > I thought perhaps services are always processes that run whenever the
> > > system is running, but that doesn't appear to be the case.
> >
> >If setup correctly that is the case.
> 
> I get the following list of "services" in the gui "Services" 
> tool:  anacron, atd, autofs, crond, cyrus-imapd, gpm, ip6tables, ipchains, 
> iptables, keytable, kudzu, mdmonitor, microcode_ctl, netfs, network, 
> nfslock, protmap, privoxy, random, syslog, wine, xinetd>
> 
> At the command prompt, I typed "ps -ef | less".  Some "services" are 
> listed, and some are not.
> Those in the list that are listed (or have very similar names):  atd, 
> crond, imapd, gpm, portmap, privoxy, syslogd, xinetd
> Those that are *not* listed:  anacron, autofs, ip6tables, ipchains, 
> iptables, keytable, kudzu, mdmonitor, microcode_ctl, netfs, network, 
> nfslock, random, wine
> 
> Apparently a "service" is not precisely defined in terms of the software 
> architecture, but simply means some software that in one way or another 
> resides on the system for the purpose of providing a service (or services) 
> to other software that may need it (or them).
> 
> >  Running `setup` as root in RH
> >simply gives you the option to enable/disable the script to be run from
> >init.d.
> 
> Ok, that appears to be the same list as in the gui "Services".
> 
> I'm familiar with the /etc/rc.d/init.d directory, and somewhat familiar 
> with how those scripts work (running "/etc/rc.d/init.d/httpd restart", for 
> example).  Are "services" defined in terms of /etc/rc.d?
> 
> >  However, the script will not run until you initialize it
> >yourself by giving a command like:
> >
> >/etc/init.d/foo start
> >
> > > ...where to look to find out for sure what these various services do?
> >
> >The man pages are a good place to start. Type `man daemonname` or
> >similar.
> 
> Many of them don't seem to have man pages.  For example when I type "man 
> keytable", there's "No manual entry for keytable".  I get similar results 
> for mdmonitor, netfs, network, nfslock.  However, I've found something on 
> them from Google.
> 
> > > And which ones I can turn off?
> >
> >Well, that's entirely up to you. :-D
> 
> What I mean by this is which ones I can turn off and still retain the 
> functionality that I need.  For example, when I start running apache, I 
> will clearly need httpd running.  I want to turn things off that I'm not 
> using, for security purposes.  But most of these services are things that I 
> have found running even though I don't know exactly what they do.
> 
> Thanks,
> Wayne 
> 
> _________________________________________________________________________
> Philadelphia Linux Users Group        --       http://www.phillylinux.org
> Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
> General Discussion  --   http://lists.netisland.net/mailman/listinfo/plug
> 


_________________________________________________________________________
Philadelphia Linux Users Group        --       http://www.phillylinux.org
Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
General Discussion  --   http://lists.netisland.net/mailman/listinfo/plug