■CentOS 7にて
コマンド | 内容 |
systemctl enable nginx | nginxの自動起動 |
systemctl start nginx | nginxの起動 |
systemctl stop nginx | nginxの停止 |
systemctl restart nginx | nginxの再起動 |
systemctl reload nginx | 設定ファイルの再読み込み。 新たなworkerプロセスを起動し、古い設定のworkerプロセスを順次終了させる。 |
/sbin/service nginx upgrade | バイナリを入れ替える。新たなmaster/workerプロセスを新バイナリで起動し、古いmaster/workerプロセスを順次終了させる。 |
ファイルの確認
■バージョンの確認
$ rpm -qi nginx ※膨大な情報 $ rpm -qa nginx ※パッケージ名のみ
■設定ファイルリスト
$ rpm -ql nginx