Changes

Jump to navigation Jump to search
2,478 bytes added ,  16:16, 5 July 2016
Created page with "When your machine turns on or reboots, you want certain things to happen automatically. If the 'machine' is a web server hosting websites defined by Apache and also a dat..."
When your machine turns on or reboots, you want certain things to happen automatically. If the 'machine' is a web server hosting websites defined by [[Apache]] and also a database server running [[MySQL]], then naturally you would want Apache and MySQL to start automatically. In SysV-style systems that still use <code>init</code> and the rc.d run levels, you can use either <code>chkconfig</code><ref>http://linuxcommand.org/man_pages/chkconfig8.html</ref> (RedHat and derivatives) or <code>sysv-rc-conf</code> for Debian variants to make that permanent.

=== List services ===
So what are the services controlled by 'init' scripts?
<source lang="bash">
# the easy way
ls -l /etc/rc.d/init.d/
# using chkconfig
chkconfig --list
# for newer systemd controlled systems
systemctl list-units
</source>
Here is an example list of the services you might find on your machine:
# NetworkManager
# acpid
# anacron
# atd
# auditd
# autofs
# avahi-daemon
# avahi-dnsconfd
# bluetooth
# capi
# clvmd
# cman
# cmirror
# conman
# cpuspeed
# crashplan
# crond
# cups
# dc_client
# dc_server
# dnsmasq
# dund
# ebtables
# firstboot
# gfs
# gfs2
# gpm
# haldaemon
# hidd
# hplip
# httpd
# ip6tables
# ipmi
# iptables
# irda
# irqbalance
# iscsi
# iscsid
# isdn
# kdump
# kudzu
# libvirt-guests
# libvirtd
# lm_sensors
# luci
# lvm2-monitor
# mcstrans
# mdmonitor
# mdmpd
# messagebus
# modclusterd
# multipathd
# mysql51-mysqld
# mysql55-mysqld
# mysqld
# nagios
# netconsole
# netfs
# netplugd
# network
# networker
# nfs
# nfslock
# nginx
# nrpe
# nscd
# ntop
# ntpd
# nxserver
# oddjobd
# openais
# openwsmand
# pand
# pcscd
# piranha-gui
# portmap
# postfix
# postgresql
# psacct
# pulse
# qdiskd
# rawdevices
# rdisc
# readahead_early
# readahead_later
# restorecond
# rgmanager
# rhnsd
# rhsmcertd
# ricci
# rpcgssd
# rpcidmapd
# rpcsvcgssd
# rsyslog
# saslauthd
# sblim-sfcb
# scsi_reserve
# setroubleshoot
# slinksc
# smartd
# snmpd
# snmptrapd
# squid
# sshd
# svnserve
# syslog
# tomcat5
# tux
# vncserver
# wdaemon
# winbind
# wpa_supplicant
# xfs
# xinetd
# ypbind
# yum-updatesd

=== Enable/Disable/Start/Stop/Status a service ===
<source lang="bash">
# for older systems using System V style init
chkconfig apache on|off|start|stop|status
# for newer systemd controlled systems
systemctl enable|disable|start|stop|status <servicename>.service
</source>

== More ==
* [https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet SysVinit to Systemd Cheatsheet]

{{References}}
4,558

edits

Navigation menu