centos7 コマンド
操作 | SysV Init | Systemd |
---|---|---|
起動 | /etc/init.d/sshd start | systemctl start sshd |
終了 | /etc/init.d/sshd stop | systemctl stop sshd |
強制終了 | PID探してkill -9 | systemctl kill -s 9 sshd |
再起動 | /etc/init.d/sshd restart | systemctl restart sshd |
設定反映 | /etc/init.d/sshd reload | systemctl reload sshd |
状態取得 | /etc/init.d/sshd status | systemctl status sshd |
自動起動を有効 | chkconfig sshd on | systemctl enable sshd |
自動起動を無効 | chkconfig sshd off | systemctl disable sshd |
自動起動の状態確認 | chkconfig --list sshd | systemctl is-enabled sshd(status でも表示される) |
サービス一覧の表示 | ls /etc/init.d | systemctl --type service |
参考URL
http://blog.yuryu.jp/2014/07/systemd-quick-guide.html
- timezone設定
timezone一覧 # timedatectl list-timezones 設定 # timedatectl set-timezone Asia/Tokyo 確認 # timedatectl
- 時間同期
# yum install chrony # vim /etc/chrony.conf # systemctl start chronyd.service