首頁論壇分類作業系統LinuxCentOS 7.x 編譯安裝 nginx
CentOS 7.x 編譯安裝 nginx
   編 輯        刪 除      # 5c8224a78d5e7 發表: Odyssey     新增:2018-09-19 11:35:56     更新:2020-01-20 11:41:26

nginx news

https://nginx.org/


nginx: download

https://nginx.org/en/download.html


下載 nginx

cd /usr/local/src
lynx http://nginx.org/download/nginx-1.14.2.tar.gz

安裝 nginx

tar zxf nginx-1.14.2.tar.gz
cd nginx-1.14.2
./configure --prefix=/usr/local/nginx --with-threads --with-pcre --with-http_ssl_module --with-http_v2_module
make
make install
make clean

設定 nginx

vi /usr/local/nginx/conf/nginx.conf
vi /usr/local/nginx/conf/fastcgi.conf
vi /usr/local/nginx/conf/fastcgi_params
vi /usr/local/nginx/conf/uwsgi_params

測試 nginx

/usr/local/nginx/sbin/nginx -t

啟動 nginx

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

停止 nginx

/usr/local/nginx/sbin/nginx -s stop
/usr/local/nginx/sbin/nginx -s quit

重啟 nginx

/usr/local/nginx/sbin/nginx -s reload

預設目錄

/usr/local/nginx/html


夢幻奧德修斯 - OdysseusDream

Website:https://www.odysseusdream.com/

Discord:https://discord.gg/ht4mwMG

FB社團:https://www.facebook.com/groups/OdysseusDream/

FB粉專:https://www.facebook.com/OdysseusDream/

我要回覆
CentOS 7.x 編譯安裝 nginx
首頁論壇分類作業系統LinuxCentOS 7.x 編譯安裝 nginx