nginx-1.16.1安裝

一、官網(wǎng)下載源碼
http://nginx.org/en/download.html

成都創(chuàng)新互聯(lián)專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務(wù),包含不限于成都網(wǎng)站建設(shè)、網(wǎng)站建設(shè)、通州網(wǎng)絡(luò)推廣、微信小程序開發(fā)、通州網(wǎng)絡(luò)營銷、通州企業(yè)策劃、通州品牌公關(guān)、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運(yùn)營等,從售前售中售后,我們都將竭誠為您服務(wù),您的肯定,是我們最大的嘉獎;成都創(chuàng)新互聯(lián)為所有大學(xué)生創(chuàng)業(yè)者提供通州建站搭建服務(wù),24小時服務(wù)熱線:13518219792,官方網(wǎng)址:www.muchs.cn

二、上傳到指定的安裝目錄

tar vxf nginx-1.16.1.tar.gz
cd cd nginx-1.16.1 && ./config --prefix=/etc/nginx

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.

安裝需要的插件

yum -y install openssl openssl-devel

checking for zlib library ... not found

./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=<path> option.

安裝需要的插件

yum install zlib-devel -y

./configure --prefix=/usr/local/nginx

make

三、啟動nginx
./sbin/nginx

四、查看nginx 啟動配置詳情
./sbin/nginx -t

五、隱藏nginx版本號
vim conf/nginx.conf
http server 路徑下添加 server_tokens off;

        vim conf/fastcgi.conf
        修改  fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;
        fastcgi_param  SERVER_SOFTWARE    nginx;

        重啟或者reload nginx
        pkill nginx && ./sbin/nginx

文章標(biāo)題:nginx-1.16.1安裝
URL分享:http://www.muchs.cn/article44/jdodhe.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供商城網(wǎng)站、手機(jī)網(wǎng)站建設(shè)虛擬主機(jī)、ChatGPT、服務(wù)器托管

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

綿陽服務(wù)器托管