CentOS6 から 7 になって、サービス管理用のコマンドが変わっていたり、デフォルトで動いているサービスにも変化があるようだ。
なので、改めて調査し、不要なものを切り分けていく。
サービスの確認
有効になっているサービスの一覧は以下のコマンドで確認できる。
$ systemctl list-units --type=service
で出力結果は以下のとおり。
UNIT LOAD ACTIVE SUB DESCRIPTION
abrt-ccpp.service loaded active exited Install ABRT coredump hook
abrt-oops.service loaded active running ABRT kernel log watcher
abrtd.service loaded active running ABRT Automated Bug Reporting Tool
atd.service loaded active running Job spooling tools
auditd.service loaded active running Security Auditing Service
chronyd.service loaded active running NTP client/server
crond.service loaded active running Command Scheduler
dbus.service loaded active running D-Bus System Message Bus
firewalld.service loaded active running firewalld - dynamic firewall daemon
getty@tty1.service loaded active running Getty on tty1
irqbalance.service loaded active running irqbalance daemon
kmod-static-nodes.service loaded active exited Create list of required static device nodes for the current kernel
ldconfig.service loaded active exited Rebuild Dynamic Linker Cache
libstoragemgmt.service loaded active running libstoragemgmt plug-in server daemon
lvm2-lvmetad.service loaded active running LVM2 metadata daemon
lvm2-monitor.service loaded active exited Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling
lvm2-pvscan@8:18.service loaded active exited LVM2 PV scan on device 8:18
lvm2-pvscan@9:127.service loaded active exited LVM2 PV scan on device 9:127
mdmonitor.service loaded active running Software RAID monitoring and management
network.service loaded active exited LSB: Bring up/down networking
NetworkManager.service loaded active running Network Manager
polkit.service loaded active running Authorization Manager
postfix.service loaded active running Postfix Mail Transport Agent
rhel-dmesg.service loaded active exited Dump dmesg to /var/log/dmesg
rhel-import-state.service loaded active exited Import network configuration from initramfs
rhel-readonly.service loaded active exited Configure read-only root support
● rngd.service loaded failed failed Hardware RNG Entropy Gatherer Daemon
rsyslog.service loaded active running System Logging Service
smartd.service loaded active running Self Monitoring and Reporting Technology (SMART) Daemon
sshd.service loaded active running OpenSSH server daemon
sysstat.service loaded active exited Resets System Activity Logs
systemd-hwdb-update.service loaded active exited Rebuild Hardware Database
systemd-journal-catalog-update.service loaded active exited Rebuild Journal Catalog
systemd-journal-flush.service loaded active exited Flush Journal to Persistent Storage
systemd-journald.service loaded active running Journal Service
systemd-logind.service loaded active running Login Service
systemd-random-seed.service loaded active exited Load/Save Random Seed
systemd-readahead-collect.service loaded active exited Collect Read-Ahead Data
systemd-remount-fs.service loaded active exited Remount Root and Kernel File Systems
systemd-sysctl.service loaded active exited Apply Kernel Variables
systemd-tmpfiles-setup-dev.service loaded active exited Create Static Device Nodes in /dev
systemd-tmpfiles-setup.service loaded active exited Create Volatile Files and Directories
systemd-udev-settle.service loaded active exited udev Wait for Complete Device Initialization
systemd-udev-trigger.service loaded active exited udev Coldplug all Devices
systemd-udevd.service loaded active running udev Kernel Device Manager
systemd-update-done.service loaded active exited Update is Completed
systemd-update-utmp.service loaded active exited Update UTMP about System Boot/Shutdown
systemd-user-sessions.service loaded active exited Permit User Sessions
systemd-vconsole-setup.service loaded active exited Setup Virtual Console
tuned.service loaded active running Dynamic System Tuning Daemon
wpa_supplicant.service loaded active running WPA Supplicant daemon
yum-cron.service loaded active exited Run automatic yum updates as a cron job
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.
52 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
なんか、1つコケてるのあるし・・・
各サービスの要否判断
| サービス名 | 概要 | 要否 |
|---|---|---|
|
abrt-ccpp.service
abrt-oops.service
abrtd.service
|
自動バグ報告ツール (Automatic Bug Reporting Tool) は通常 ABRT と呼ばれるツールセットで、ユーザーがアプリケーションクラッシュを検出し報告する手助けとなるように設計されています。 (RHEL 7 システムの管理者ガイド より) |
開発用・実験用サーバーとして使うので、有効にしておく。 |
| atd.service | AT & BATCH の両コマンドを使用するために必要なサービス。 cronと違い、1回限りのタスクのスケジューリング用。 |
cronがあれば不要か。 必要になりそうであれば、その時起動すれば良さげ。 |
| auditd.service | いわゆる、システム監査用の『監査証跡』を残すためのサービス。 | 個人的に使うサーバーに監査証跡が必要かと言われると疑問。 ひとまず、不要としておく。 |
| chronyd.service | NTPクライアント/サーバーで、時刻同期のための機能。 | 必要としておく。 |
| crond.service | 定期的に実行するタスクのスケジューリングサービス。 | 必要。 |
| dbus.service | アプリケーション間で通信を行う「プロセス間通信」のためのサービス。 | 必要。 |
| firewalld.service | CentOS6までの「iptables」に替わる、ファイアーウォールサービス。 | 検証・実験目的のサーバーなので、ひとまず不要としておき、必要があれば有効にする。 |
| getty@tty1.service | ターミナル制御のためのサービス。 | 必要。 |
| irqbalance.service | 『割り込み制御』のためのサービス。 | マルチCPU環境や、マルチコアCPUの場合は必要らしい。 |
| kmod-static-nodes.service | 現在のカーネルに必要な静的デバイスノードのリストを作成します。(DESCRIPTIONの内容を直訳) | 必要。 |
| ldconfig.service | 共有ライブラリの『キャッシュ』を管理するサービス。 | 必要。 |
| libstoragemgmt.service | 「外部アレイ管理パッケージ」とのこと。 | 現時点では判断つかず。 |
|
lvm2-lvmetad.service
lvm2-monitor.service or progress polling
lvm2-pvscan@8:18.service
lvm2-pvscan@9:127.service
|
LVN関連の各種サービス | LVMを使っているなら必要。 |
| mdmonitor.service | ソフトウェアRAIDの管理・モニタリングサービス | RAIDを使っているので必要。 |
| network.service NetworkManager.service |
ネットワーク関連の基本的なサービス | 完全スタンドアロンでもない限り必要。 |
| polkit.service | 認証サービス | 必要。 |
| postfix.service | いわゆるメールサーバーPostfixのサービス。 | 当面は不要。 |
| rhel-dmesg.service | ダンプファイルをログ(/var/log/dmesg)に残すためのサービス。 | おそらく必要。 |
| rhel-import-state.service | 『ミニルート』とも呼ばれる『initramfs』というファイルシステムからネットワーク設定をインポートする。。。らしい。 | おそらく必要。 |
| rhel-readonly.service | ルート直下を読み込み専用にするためのサービス。 | おそらく必要。 |
| rngd.service | ハードウェア側の機能で乱数を発生させて、認証などに使うためのサービス。(いわゆるワンタイムパスワードの類か) | おそらく不要。 |
| rsyslog.service | システムログを記録するサービス。 | 必要。 |
| smartd.service | HDDの自己診断機能を利用するためのサービス。 | 必要。 |
| sshd.service | SSHでリモート操作するために必要なサービス。 | 必要。 |
| sysstat.service | システムの様々な情報を取得するためのサービス | 必要。 |
| systemd-**.service | systemd自体はCentOS7のシステムサービスマネージャー。 “systemd-“で始まる名称のサービスが多数起動している。 |
個別に見ていけば、不要なものもあるかもしれないが、そのままにしておく。 |
| tuned.service | Tuned は、udev を使用して接続されたデバイスを監視し、選択されたプロファイルに従ってシステム設定を動的にチューニングするデーモンです。 (RHEL 7 電力管理ガイド より) |
必要。 |
| wpa_supplicant.service | WPE、WPA、WPA2のワイヤレス通信暗号化のための機能。 | 据え置き型サーバーで無線LANを使っていないので不要。 |
結果、以下の6つのサービスを止めて、再起動。
sudo systemctl disable atd.service
sudo systemctl disable auditd.service
sudo systemctl disable firewalld.service
sudo systemctl disable postfix.service
sudo systemctl disable rngd.service
sudo systemctl disable wpa_supplicant.service

コメント