Fedora 18
Sponsored Link

サービスの設定2013/01/16

[1] デフォルトで有効になっている不要サービスは停止しておきます。以下のコマンドで現在有効になっているサービスの一覧を出力できます。 (--all を付けると無効サービスも含めてリストされる)
[root@dlp ~]#
systemctl -t service

UNIT                       LOAD   ACTIVE SUB     JOB DESCRIPTION
auditd.service             loaded active running     Security Auditing Service
crond.service              loaded active running     Command Scheduler
dbus.service               loaded active running     D-Bus System Message Bus
fedora-readonly.service    loaded active exited      Configure read-only root su
fedora-s...it-late.service loaded active exited      Initialize storage subsyste
fedora-s...ge-init.service loaded active exited      Initialize storage subsyste
getty@tty1.service         loaded active running     Getty on tty1
lvm2-monitor.service       loaded active exited      Monitoring of LVM2 mirrors,
network.service            loaded active exited      LSB: Bring up/down networki
rsyslog.service            loaded active running     System Logging Service
sendmail.service           loaded active running     Sendmail Mail Transport Age
serial-getty@ttyS0.service loaded active running     Serial Getty on ttyS0
sm-client.service          loaded active running     Sendmail Mail Transport Cli
sshd.service               loaded active running     OpenSSH server daemon
systemd-journald.service   loaded active running     Journal Service
systemd-logind.service     loaded active running     Login Service
systemd-remount-fs.service loaded active exited      Remount Root and Kernel Fil
systemd-sysctl.service     loaded active exited      Apply Kernel Variables
systemd-...s-setup.service loaded active exited      Recreate Volatile Files and
systemd-...-settle.service loaded active exited      udev Wait for Complete Devi
systemd-...trigger.service loaded active exited      udev Coldplug all Devices
systemd-udevd.service      loaded active running     udev Kernel Device Manager
systemd-...essions.service loaded active exited      Permit User Sessions
systemd-...e-setup.service loaded active exited      Setup Virtual Console

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
JOB    = Pending job for the unit.

24 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
[2] 不要なサービスを止めるには以下のようにします。例として、sendmailを停止し、システムの起動時に自動的に立ち上がらないようにしています。
[root@dlp ~]#
systemctl stop sendmail.service

[root@dlp ~]#
systemctl disable sendmail.service

rm '/etc/systemd/system/multi-user.target.wants/sm-client.service'
rm '/etc/systemd/system/multi-user.target.wants/sendmail.service'
[3] 上記サービス(Systemdサービス)以外に旧式のSysVサービスが残っており、 こちらの自動起動設定は旧式の chkconfig で制御することになります。 最小構成でインストールした場合のSysVサービスは以下の3つのみです。
[root@dlp ~]#
chkconfig --list


Note: This output shows SysV services only and does not include native
      systemd services. SysV configuration data might be overridden by native
      systemd configuration.

ebtables        0:off   1:off   2:off   3:off   4:off   5:off   6:off
netconsole      0:off   1:off   2:off   3:off   4:off   5:off   6:off
network         0:off   1:off   2:on    3:on    4:on    5:on    6:off

# netconsoleの自動起動をオフにする

[root@dlp ~]#
chkconfig netconsole off

関連コンテンツ