|
|
|
◆ |
CentOS7 からの変更点 |
|
|
|
CentOS7
からいくつかの変更が実施されていますので簡単にまとめてみました |
|
|
|
|
◆ |
サービスの起動・停止 |
|
|
|
各種サービス(アプリケーション等)の管理が systemd
サービスに変更になりました |
|
従来の SysV
サービスで管理されているサービスを調べます |
|
|
|
[root@centos]#
chkconfig --list
注記: この出力は SysV サービスのみであり、ネイティブな systemd のサービスは含まれていません。
systemd services. SysV 設定のデータはネイティブな systemd の設定によって上書きされます。
systemd サービスを一覧表示するには 'systemctl list-unit-files' を使用してください。
特定のターゲットにおいて有効化されているサービスを確認するには、
'systemctl list-dependencies [target]' 。
iprdump 0:off
1:off 2:on 3:on 4:on
5:on 6:off
iprinit 0:off
1:off 2:on 3:on 4:on
5:on 6:off
iprupdate 0:off
1:off 2:on 3:on 4:on
5:on 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
|
|
|
|
上記で設定したネットワークサービスは従来の SysV
サービスで管理されている |
|
一般的なインストール直後では5項目(サービス)しか SysV
サービスで管理されていない |
|
|
|
続いて systemd
サービスで管理されているサービスを調べます |
|
|
|
[root@centos]#
systemctl list-unit-files
abrt-ccpp.service enabled
abrt-oops.service enabled
途中略
blk-availability.service disabled
bluetooth.service enabled
途中略
canberra-system-bootup.service disabled
canberra-system-shutdown-reboot.service disabled
途中略
dbus-org.bluez.service enabled
dbus-org.freedesktop.Avahi.service enabled
途中略
ebtables.service disabled
emergency.service static
途中略
fcoe.service disabled
firewalld.service disabled
途中略
gdm.service enabled
getty@.service enabled
途中略
halt-local.service static
hypervkvpd.service enabled
途中略
initial-setup-graphical.service disabled
initial-setup-text.service disabled
以下略
|
|
|
|
ほとんどのサービスが systemd
サービスで管理されています |
|
|
|
今後、新たにインストールするサービスについてはその都度確認する必要があります |
|
|
|
<各種サービスの起動> |
|
|
|
・SysV サービスの起動(従来型) |
|
|
|
[root@centos]#
/etc/rc.d/init.d/******
start
(******はサービス名)
|
|
|
|
・systemd サービスの起動 |
|
|
|
[root@centos]#
systemctl start ******
(******はサービス名)
|
|
|
|
<各種サービスの停止> |
|
|
|
・SysV サービスの停止(従来型) |
|
|
|
[root@centos]#
/etc/rc.d/init.d/****** stop
(******はサービス名)
|
|
|
|
・systemd サービスの停止 |
|
|
|
[root@centos]#
systemctl stop ******
(******はサービス名)
|
|
|
|
<各種サービスの再起動> |
|
|
|
・SysV サービスの再起動(従来型) |
|
|
|
[root@centos]#
/etc/rc.d/init.d/****** restart
(******はサービス名)
|
|
|
|
・systemd サービスの再起動 |
|
|
|
[root@centos]#
systemctl restart ******
(******はサービス名)
|
|
|
|
<各種サービスの自動起動> |
|
|
|
・SysV サービスの自動起動(従来型) |
|
|
|
[root@centos]#
chkconfig ****** on
(******はサービス名)
|
|
|
|
・systemd サービスの自動起動 |
|
|
|
[root@centos]#
systemctl enable ******
(******はサービス名)
|
|
|
|
<各種サービスの自動起動解除> |
|
|
|
・SysV サービスの自動起動解除(従来型) |
|
|
|
[root@centos]#
chkconfig ****** off
(******はサービス名)
|
|
|
|
・systemd
サービスの自動起動解除 |
|
|
|
[root@centos]#
systemctl disable ******
(******はサービス名)
|
|
|
|
<各種サービスの自動起動(解除)の確認> |
|
|
|
・SysV サービスの自動起動(解除)の確認(従来型) |
|
|
|
[root@centos]#
chkconfig --list ******
(******はサービス名)
****** 0:off 1:off
2:on 3:on 4:on 5:on 6:off
<--- 2・3・4・5
が on になっていればOK
|
|
|
|
・systemd サービスの自動起動(解除)の確認 |
|
|
|
[root@centos]#
systemctl list-unit-files |
grep ******
(******はサービス名)
******.service
enabled
<--- enabled(自動起動) disabled(自動起動解除)
|
|
|
|
|
◆ |
サービス(アプリケーション等) |
|
|
|
サービス名 |
CentOS 6.5 まで |
|
CentOS 7 より |
|
・時刻サーバー |
NTP |
⇒ |
Chrony |
|
・データベースサーバー |
MySQL |
⇒ |
MariaDB |
|
|
|
|
|
|
|
|
|
|