Open main menu

Autostart

Revision as of 15:16, 5 July 2016 by Freephile (talk | contribs) (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...")

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)

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 init and the rc.d run levels, you can use either chkconfig[1] (RedHat and derivatives) or sysv-rc-conf for Debian variants to make that permanent.

List services

So what are the services controlled by 'init' scripts?

# the easy way
ls -l /etc/rc.d/init.d/
# using chkconfig
chkconfig --list
# for newer systemd controlled systems
systemctl list-units

Here is an example list of the services you might find on your machine:

  1. NetworkManager
  2. acpid
  3. anacron
  4. atd
  5. auditd
  6. autofs
  7. avahi-daemon
  8. avahi-dnsconfd
  9. bluetooth
  10. capi
  11. clvmd
  12. cman
  13. cmirror
  14. conman
  15. cpuspeed
  16. crashplan
  17. crond
  18. cups
  19. dc_client
  20. dc_server
  21. dnsmasq
  22. dund
  23. ebtables
  24. firstboot
  25. gfs
  26. gfs2
  27. gpm
  28. haldaemon
  29. hidd
  30. hplip
  31. httpd
  32. ip6tables
  33. ipmi
  34. iptables
  35. irda
  36. irqbalance
  37. iscsi
  38. iscsid
  39. isdn
  40. kdump
  41. kudzu
  42. libvirt-guests
  43. libvirtd
  44. lm_sensors
  45. luci
  46. lvm2-monitor
  47. mcstrans
  48. mdmonitor
  49. mdmpd
  50. messagebus
  51. modclusterd
  52. multipathd
  53. mysql51-mysqld
  54. mysql55-mysqld
  55. mysqld
  56. nagios
  57. netconsole
  58. netfs
  59. netplugd
  60. network
  61. networker
  62. nfs
  63. nfslock
  64. nginx
  65. nrpe
  66. nscd
  67. ntop
  68. ntpd
  69. nxserver
  70. oddjobd
  71. openais
  72. openwsmand
  73. pand
  74. pcscd
  75. piranha-gui
  76. portmap
  77. postfix
  78. postgresql
  79. psacct
  80. pulse
  81. qdiskd
  82. rawdevices
  83. rdisc
  84. readahead_early
  85. readahead_later
  86. restorecond
  87. rgmanager
  88. rhnsd
  89. rhsmcertd
  90. ricci
  91. rpcgssd
  92. rpcidmapd
  93. rpcsvcgssd
  94. rsyslog
  95. saslauthd
  96. sblim-sfcb
  97. scsi_reserve
  98. setroubleshoot
  99. slinksc
  100. smartd
  101. snmpd
  102. snmptrapd
  103. squid
  104. sshd
  105. svnserve
  106. syslog
  107. tomcat5
  108. tux
  109. vncserver
  110. wdaemon
  111. winbind
  112. wpa_supplicant
  113. xfs
  114. xinetd
  115. ypbind
  116. yum-updatesd

Enable/Disable/Start/Stop/Status a service

# 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

More

References