nginx-1.16.1安装

一、官网下载源码
http://nginx.org/en/download.html

成都创新互联专注为客户提供全方位的互联网综合服务,包含不限于成都网站建设、网站建设、通州网络推广、微信小程序开发、通州网络营销、通州企业策划、通州品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们最大的嘉奖;成都创新互联为所有大学生创业者提供通州建站搭建服务,24小时服务热线:13518219792,官方网址:www.cdcxhl.com

二、上传到指定的安装目录

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

文章标题:nginx-1.16.1安装
URL分享:https://www.cdcxhl.com/article44/jdodhe.html

成都网站建设公司_创新互联,为您提供商城网站手机网站建设虚拟主机ChatGPT服务器托管

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

绵阳服务器托管