■ CentOS6以前
[1] サービス起動
[1-1] サービスの起動service サービス名 start[1-2] サービスの停止
service サービス名 stop[1-3] サービスの再起動
service サービス名 restart
[2] サービス自動起動
[2-1] サービスの自動起動設定chkconfig サービス名 on[2-2] サービスの自動起動解除
chkconfig サービス名 off* chkconfig コマンドを実際に使用している関連記事は、以下
http://blogs.yahoo.co.jp/dk521123/33751398.html
■ CentOS7以降
[1] サービス起動
[1-1] サービスの起動systemctl start サービス名.service[1-2] サービスの停止
systemctl stop サービス名.service[1-3] サービスの再起動
systemctl restart サービス名.service
[2] サービス自動起動
[2-1] サービスの自動起動設定systemctl enable サービス名.service[2-2] サービスの自動起動解除
systemctl disable サービス名.service
[3] その他
[3-1] サービスの確認systemctl list-units --type=service[3-2] 設定ファイル変更をsystemdに反映させる
systemctl daemon-reload
参考文献
http://www.server-memo.net/centos-settings/centos7/service-start.htmlhttp://www.server-memo.net/centos-settings/centos7/systemctl-enable.html
構文などが分かる
https://wiki.archlinuxjp.org/index.php/Systemd
関連記事
Linuxの起動について ~ プロセス / デーモン ~
https://blogs.yahoo.co.jp/dk521123/34564457.htmlLinux(仮想環境) を構築する ~CentOS編~
http://blogs.yahoo.co.jp/dk521123/36252928.htmlTomcatをデーモンとして起動するには ~ /etc/init.d / Debian編~
https://blogs.yahoo.co.jp/dk521123/34754575.htmlTomcatをデーモンとして起動するには ~ /etc/init.d / openSUSE編~
http://blogs.yahoo.co.jp/dk521123/33751398.htmlLinuxでの開発用SMTPサーバー [2] ~ MailCatcher編 ~
* 「Mailcatcherの自動起動」で、サービスの自動起動を設定しているhttps://blogs.yahoo.co.jp/dk521123/37440819.html