當然就僅僅是介紹一條命令了,就這麼簡單。
nginx預設建立乙個工作程序
改動worker_processes=10。來建立多個程序root 2713 1 0 07:56 ? 00:00:00 nginx: master process ../sbin/nginx
nobody 2714 2713 0 07:56 ? 00:00:00 nginx: worker process
#user nobody;
worker_processes 10;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
pid logs/nginx.pid;
events
fuhui@ubuntu:/usr/local/nginx$ ps -ef | grep 'nginx'
root 271310
07:56 ? 00:00:00 nginx: master process ../sbin/nginx
nobody 2747
2713
008:00 ?
00:00:00 nginx: worker process nobody 2748
2713
008:00 ? 00:00:00 nginx: worker process nobody 2749
2713
008:00 ? 00:00:00 nginx: worker process nobody 2750
2713
008:00 ? 00:00:00 nginx: worker process nobody 2751
2713
008:00 ?
00:00:00 nginx: worker process nobody 2752
2713
008:00 ? 00:00:00 nginx: worker process nobody 2753
2713
008:00 ?
00:00:00 nginx: worker process nobody 2754
2713
008:00 ?
00:00:00 nginx: worker process nobody 2755
2713
008:00 ?
00:00:00 nginx: worker process nobody 2756
2713
008:00 ? 00:00:00 nginx: worker process fuhui 2852
2332
008:29 pts/6
00:00:00 grep --color=auto nginx
錯誤的執行方式
fuhui@ubuntu
:/usr/local/nginx
$ sudo ps -ef | grep 'nginx' | awk ''
to kill all nginx processes正確的執行方式
fuhui@ubuntu
:/usr/local/nginx
$ sudo kill ` ps -ef | grep 'nginx' | awk '' `
kill $(ps aux | grep '[n]ginx' | awk '')
使用「跟$()效果是一樣的 linux nginx 重啟 關閉 啟動
啟動操作 nginx c usr local nginx conf nginx.conf c引數指定了要載入的nginx配置檔案路徑 停止操作 停止操作是通過向nginx程序傳送訊號來進行的 步驟1 查詢nginx主程序號 ps ef grep nginx在程序列表裡 面找master程序,它的編號...
linux nginx啟動 重啟 關閉命令
啟動操作 nginx c usr local nginx conf nginx.conf c引數指定了要載入的nginx配置檔案路徑 停止操作 停止操作是通過向nginx程序傳送訊號來進行的 步驟1 查詢nginx主程序號 ps ef grep nginx 在程序列表裡 面找master程序,它的編...
linux nginx啟動 重啟 關閉命令
linux nginx啟動 重啟 關閉命令 啟動操作 c引數指定了要載入的nginx配置檔案路徑 nginx c usr local nginx conf nginx.conf 停止操作nginx s stop 快速停止nginx quit 完整有序的停止nginx 其他的停止nginx 方式 停止...