Ensurepass

6. Service Management
6.1 Types of services
1. System V services
o Managed by System V init scripts
o Scripts are stored in /etc/init.d
2. xinetd services
o Services started by the xinetd daemon.
o xinetd service control files located in /etc/xinetd.d
o Defaults for xinetd set in /etc/xinetd.conf
o xinetd itself is a System V service.
3. init services
o Configured in /etc/inittab.
o Provides respawn capability if service dies.
6.2 Management tools
1. System V services
o service – Start/Stop services (CLI).
Example: To restart Apache:
service httpd stop
service httpd start

or
service httpd restart

o chkconfig – Configure services by runlevel (CLI). Doesn’t affect currently running services. Defaults to runlevels 3,4, and 5 if none specified.
To enable Apache on runlevels 3, 4, and 5:
chkconfig httpd on # If runlevels aren’t specified, default is 345

To enable Apache only on runleves 3 & 5:
chkconfig –level 35 httpd on

o ntsysv – Configure services by runlevel (TUI).
Default is to configure current run level. Use “–level” option to specify a different runlevel.
o tksysv – Configure services by runlevel (GUI) (Deprecated).
2. xinetd services
o chkconfig – Configures running services. Takes effect immediately on xinetd services.
To start vsftp:
chkconfig vsftp on

o Edit service configuration file in /etc/xinetd.d/ directly. To enable, specify “disable = no”. To disable, specify “disable = yes”. After changing file, xinetd must either be given a USR2 signal so it re-reads it’s configuration file or be restarted.
o killall -USR2 xinetd
o
3. init services
The only way to modify init based services is to edit /etc/inittab. After modifying the file, activate the changes by executing “init q”.

Download the Ensurepass Latest 2013 RHCE EX300 Practise Test PDF to pass RHCE EX300 exam.

Comments are closed.