重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

nginx-1.16.1安装-创新互联

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

创新互联公司专注为客户提供全方位的互联网综合服务,包含不限于成都网站制作、做网站、方城网络推广、小程序开发、方城网络营销、方城企业策划、方城品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们大的嘉奖;创新互联公司为所有大学生创业者提供方城建站搭建服务,24小时服务热线:028-86922220,官方网址: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= 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= 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

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


本文标题:nginx-1.16.1安装-创新互联
文章出自:http://cqcxhl.cn/article/degccs.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP