nginx啟動 停止重啟

2022-06-14 12:09:06 字數 823 閱讀 9248

例如:

[root@linuxserver sbin]#/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

nginx的停止有三種方式:

1、檢視程序號

ps -ef|grep nginx
2、殺死程序

kill -quit 2072

1、檢視程序號

ps -ef|grep nginx
2、殺死程序

kill -term 2132 或 kill -int 2132
pkill -9 nginx
看到如下顯示nginx.conf syntax is ok

nginx.conf test is successful

說明配置檔案正確!

lnmpp 預設安裝路徑:/usr/local/nginx/sbin

設定開機自啟:
sudo systemctl enable nginx

啟動:

sudo systemctl start nginx

停止服務:

sudo systemctl restart nginx
過載服務:
sudo systemctl reload nginx

Nginx 啟動 停止 重啟

例如 root linuxserver sbin usr local nginx sbin nginx c usr local nginx conf nginx.conf 停止nginx的停止有三種方式 從容停止 1 檢視程序號 root linuxserver ps ef grep nginx 2...

Nginx啟動停止重啟

你好!這是你第一次使用markdown編輯器所展示的歡迎頁。如果你想學習如何使用markdown編輯器,可以仔細閱讀這篇文章,了解一下markdown的基本語法知識。1.檢視linux核心版本 uname a 2.安裝gcc編譯器,用來編譯c語言 yum install y gcc 3.安裝c 編譯...

Nginx啟動 重啟 停止指令碼

bin sh 將指令碼儲存為 etc rc.d init.d nginxd,便可以使用service命令啟動 停止 重啟nginx服務。source function library etc rc.d init.d functions source networking configuration....