系统运维
yum安装nginx-1.12.2 升级到nginx-1.16.1
一、查看现有的 nginx 编译参数
[root@vm-3 ~]# nginx -v
nginx version: nginx/1.12.2
built by gcc 4.8.5 20150623 (red hat 4.8.5-36) (gcc)
built with openssl 1.0.2k-fips 26 jan 2017
tls sni support enabled
configure arguments: –prefix=/usr/share/nginx –sbin-path=/usr/sbin/nginx –modules-path=/usr/lib64/nginx/modules –conf-path=/etc/nginx/nginx.conf –error-log-path=/var/log/nginx/error.log –http-log-path=/var/log/nginx/access.log –http-client-body-temp-path=/var/lib/nginx/tmp/clientbody –http-proxy-temp-path=/var/lib/nginx/tmp/proxy –http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi –http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi –http-scgi-temp-path=/var/lib/nginx/tmp/scgi –pid-path=/run/nginx.pid –lock-path=/run/lock/subsys/nginx –user=nginx –group=nginx –with-file-aio –with-ipv6 –with-httpauthrequestmodule –with-httpsslmodule –with-httpv2module –with-httprealipmodule –with-httpadditionmodule –with-httpxsltmodule=dynamic –with-httpimagefiltermodule=dynamic –with-httpgeoipmodule=dynamic –with-httpsubmodule –with-httpdavmodule –with-httpflvmodule –with-httpmp4module –with-httpgunzipmodule –with-httpgzipstaticmodule –with-httprandomindexmodule –with-httpsecurelinkmodule –with-httpdegradationmodule –with-httpslicemodule –with-httpstubstatusmodule –with-httpperlmodule=dynamic –with-mail=dynamic –with-mailsslmodule –with-pcre –with-pcre-jit –with-stream=dynamic –with-streamsslmodule –with-googleperftoolsmodule –with-debug –with-cc-opt=\\\’-o2 -g -pipe -wall -wp,-d_fortify_source=2 -fexceptions -fstack-protector-strong –param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic\\\’ –with-ld-opt=\\\’-wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -wl,-e\\\’
二、将上面加粗字体部分进行配置,加粗字体后面为系统的配置文件不需要配置,只需要到 make,千万不要 make install 。如果make install 会将原来的配置文件覆盖
事先可以先把这些依赖包下好,配置之后就不会出现下面这些错误了
yum -y install gcc make geoip geoip-devel geoip-data perl-devel perl-extutils-embed gd-devel libxml2 libxslt-devel gperftools pcre-devel openssl openssl-devel
准备新版本的nginx放在/usrr/local/ 下
[root@vm-3]# wget http://nginx.org/download/nginx-1.16.1.tar.gz
[root@vm-3]# tar -xf nginx-1.16.1.tar.gz
[root@vm-3]# cd nginx-1.16.1
[root@vm-3 nginx-1.16.1]# ./configure –prefix=/usr/share/nginx –sbin-path=/usr/sbin/nginx –modules-path=/usr/lib64/nginx/modules –conf-path=/etc/nginx/nginx.conf –error-log-path=/var/log/nginx/error.log –http-log-path=/var/log/nginx/access.log –http-client-body-temp-path=/var/lib/nginx/tmp/client_body –http-proxy-temp-path=/var/lib/nginx/tmp/proxy –http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi –http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi –http-scgi-temp-path=/var/lib/nginx/tmp/scgi –pid-path=/run/nginx.pid –lock-path=/run/lock/subsys/nginx –user=nginx –group=nginx –with-file-aio –with-ipv6 –with-http_auth_request_module –with-http_ssl_module –with-http_v2_module –with-http_realip_module –with-http_addition_module –with-http_xslt_module=dynamic –with-http_image_filter_module=dynamic –with-http_geoip_module=dynamic –with-http_sub_module –with-http_dav_module –with-http_flv_module –with-http_mp4_module –with-http_gunzip_module –with-http_gzip_static_module –with-http_random_index_module –with-http_secure_link_module –with-http_degradation_module –with-http_slice_module –with-http_stub_status_module –with-http_perl_module=dynamic –with-mail=dynamic –with-mail_ssl_module &
电脑使用浏览器时提示Flash因过期而遭到阻止的解决方法ecs云服务器打折是什么双十一怎么选合适的云服务器kdh文件用什么打开 kdh文件怎么打开ssl证书怎么设置SugarHosts美国云服务器丨年付348元?纯SSD,100%CN2线路!云服务器报价提供商排名好用的云主机