このブログを検索

2018年3月20日火曜日

サービス自動起動設定確認、サービス自動起動停止→開始

OS:CentOS7

[root@cent02 ~]# systemctl is-enabled crond.service  ←サービス自動起動設定確認
enabled
[root@cent02 ~]#
[root@cent02 ~]#
[root@cent02 ~]#
systemctl disable crond.service  ←サービス自動起動停止
Removed symlink /etc/systemd/system/multi-user.target.wants/crond.service.
[root@cent02 ~]#
[root@cent02 ~]#
[root@cent02 ~]#
systemctl is-enabled crond.service  ←サービス自動起動設定確認
disabled
[root@cent02 ~]#
[root@cent02 ~]#
[root@cent02 ~]#
systemctl enable crond.service  ←サービス自動起動開始
Created symlink from /etc/systemd/system/multi-user.target.wants/crond.service to /usr/lib/systemd/system/crond.service.
[root@cent02 ~]#
[root@cent02 ~]#
[root@cent02 ~]#
systemctl is-enabled crond.service  ←サービス自動起動設定確認
enabled
[root@cent02 ~]#