Vagrant – Apache再起動コマンド

Vagrantで、CentOSをよく使っているんですが、色々と入れたり抜いたりしていると、
Apacheの再起動ってよくやるんですが、OSバージョンの違いで微妙に違うんですよね。

あれ、このバージョンってどうだっけ?ってことがよくある。

なので、まとめときます。たぶん、自分がよく見るんだろーなー。。。

☆reloadコマンドでApacheの設定を再読み込み

[CentOS7] systemctl reload httpd
[CentOS6] service httpd reload
[CentOS6] /etc/init.d/httpd reload

☆gracefulコマンドでApacheの設定を再読み込み

[CentOS6] service httpd graceful
[CentOS6] /etc/init.d/httpd graceful
※CentOS7では、gracefulを使えないので、reloadを使う。

☆restartコマンドでApacheの再起動

[CentOS7] systemctl restart httpd
[CentOS6] service httpd restart
[CentOS6] /etc/init.d/httpd restart

コメントを残す