{"id":6329,"date":"2016-10-12T13:17:29","date_gmt":"2016-10-12T05:17:29","guid":{"rendered":"http:\/\/rmohan.com\/?p=6329"},"modified":"2016-10-12T13:17:29","modified_gmt":"2016-10-12T05:17:29","slug":"centos-7-0-configure-services","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6329","title":{"rendered":"[CentOS 7.0] Configure Services"},"content":{"rendered":"<h3 class=\"post-title entry-title\">[CentOS 7.0] Configure Services<\/h3>\n<div class=\"post-header\"><\/div>\n<div id=\"post-body-8219578311601499685\" class=\"post-body entry-content\">[1] Configure Services of the System.<\/p>\n<p># list services which are booted (list all includes inactive one with &#8220;&#8211;all&#8221; option)<\/p>\n<p>[root@dlp ~]#systemctl -t service<\/p>\n<p>UNIT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LOAD\u00a0\u00a0 ACTIVE SUB\u00a0\u00a0\u00a0\u00a0 DESCRIPTION<br \/>\nauditd.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded active running Security Auditing Service<br \/>\navahi-daemon.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded active running Avahi mDNS\/DNS-SD Stack<br \/>\ncrond.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded active running Command Scheduler<br \/>\ndbus.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded active running D-Bus System Message Bus<br \/>\ngetty@tty1.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded active running Getty on tty1<br \/>\n&#8230;<br \/>\n&#8230;<br \/>\n&#8230;<br \/>\nsystemd-udevd.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded active running udev Kernel Device Manager<br \/>\nsystemd-update-utmp.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded active exited\u00a0 Update UTMP about System Reboot\/Shutdown<br \/>\nsystemd-user-sessions.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded active exited\u00a0 Permit User Sessions<br \/>\nsystemd-vconsole-setup.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded active exited\u00a0 Setup Virtual Console<br \/>\ntuned.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded active running Dynamic System Tuning Daemon<\/p>\n<p>LOAD\u00a0\u00a0 = Reflects whether the unit definition was properly loaded.<br \/>\nACTIVE = The high-level unit activation state, i.e. generalization of SUB.<br \/>\nSUB\u00a0\u00a0\u00a0 = The low-level unit activation state, values depend on unit type.<\/p>\n<p>37 loaded units listed. Pass &#8211;all to see loaded but inactive units, too.<br \/>\nTo show all installed unit files use &#8216;systemctl list-unit-files&#8217;.<\/p>\n<p># list boot config of services<br \/>\n[root@dlp ~]#systemctl list-unit-files -t service<\/p>\n<p>UNIT FILE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 STATE<br \/>\narp-ethers.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 disabled<br \/>\nauditd.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 enabled<br \/>\nautovt@.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 disabled<br \/>\navahi-daemon.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 enabled<br \/>\nblk-availability.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 disabled<br \/>\n&#8230;<br \/>\n&#8230;<br \/>\n&#8230;<br \/>\nsystemd-user-sessions.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 static<br \/>\nsystemd-vconsole-setup.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 static<br \/>\nteamd@.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 static<br \/>\ntuned.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 enabled<br \/>\nwpa_supplicant.service\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 disabled<\/p>\n<p>124 unit files listed.<\/p>\n<p>[2] Stop and turn OFF auto-start setting for a service if you don&#8217;d need it. (it&#8217;s postfix as an example below)<\/p>\n<p>[root@dlp ~]#systemctl stop postfix<\/p>\n<p>[root@dlp ~]#systemctl disable postfix<br \/>\nrm &#8216;\/etc\/systemd\/system\/multi-user.target.wants\/postfix.service&#8217;<\/p>\n<p>[3] There are some SysV services yet. Those are controled by chkconfig like below.<\/p>\n<p>[root@dlp ~]#chkconfig &#8211;list<\/p>\n<p>Note: This output shows SysV services only and does not include native<br \/>\nsystemd services. SysV configuration data might be overridden by native<br \/>\nsystemd configuration.<\/p>\n<p>If you want to list systemd services use &#8216;systemctl list-unit-files&#8217;.<br \/>\nTo see services enabled on particular target use<br \/>\n&#8216;systemctl list-dependencies [target]&#8217;.<\/p>\n<p>iprdump\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0:off\u00a0\u00a0 1:off\u00a0\u00a0 2:on\u00a0\u00a0\u00a0 3:on\u00a0\u00a0\u00a0 4:on\u00a0\u00a0\u00a0 5:on\u00a0\u00a0\u00a0 6:off<br \/>\niprinit\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0:off\u00a0\u00a0 1:off\u00a0\u00a0 2:on\u00a0\u00a0\u00a0 3:on\u00a0\u00a0\u00a0 4:on\u00a0\u00a0\u00a0 5:on\u00a0\u00a0\u00a0 6:off<br \/>\niprupdate\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0:off\u00a0\u00a0 1:off\u00a0\u00a0 2:on\u00a0\u00a0\u00a0 3:on\u00a0\u00a0\u00a0 4:on\u00a0\u00a0\u00a0 5:on\u00a0\u00a0\u00a0 6:off<br \/>\nnetconsole\u00a0\u00a0\u00a0\u00a0\u00a0 0:off\u00a0\u00a0 1:off\u00a0\u00a0 2:off\u00a0\u00a0 3:off\u00a0\u00a0 4:off\u00a0\u00a0 5:off\u00a0\u00a0 6:off<br \/>\nnetwork\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0:off\u00a0\u00a0 1:off\u00a0\u00a0 2:on\u00a0\u00a0\u00a0 3:on\u00a0\u00a0\u00a0 4:on\u00a0\u00a0\u00a0 5:on\u00a0\u00a0\u00a0 6:off<\/p>\n<p># for exmaple, turn OFF auto-start for netconsole<\/p>\n<p>[root@dlp ~]#chkconfig netconsole off<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>[CentOS 7.0] Configure Services [1] Configure Services of the System.<\/p>\n<p># list services which are booted (list all includes inactive one with &#8220;&#8211;all&#8221; option)<\/p>\n<p>[root@dlp ~]#systemctl -t service<\/p>\n<p>UNIT LOAD ACTIVE SUB DESCRIPTION auditd.service loaded active running Security Auditing Service avahi-daemon.service loaded active running Avahi mDNS\/DNS-SD Stack crond.service loaded active running Command Scheduler dbus.service loaded [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6329"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6329"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6329\/revisions"}],"predecessor-version":[{"id":6330,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6329\/revisions\/6330"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}