-
如果之前使用的是源码编译安装的Nginx,则可以直接找到并进入到原来Nginx的源码目录进行操作;
-
而我当初安装Nginx时,不是用的源码安装。。那么需要先下载对应版本的Nginx,然后进行编译操作。
下载对应版本的Nginx:为避免出现问题,这里下载Nginx时,选择与现有Nginx同样的版本:Nginx官方下载地址:http://nginx.org/en/download.html
查看Nginx当前配置信息,记下结果,后续步骤需使用
[root@ecs-zfdevops-0001 ~]# nginx -V
nginx version: nginx/1.10.2
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
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/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=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --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 --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-debug --with-cc-opt=‘-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic’ --with-ld-opt=’ -Wl,-E’
切换至计划下载的目录
[root@ecs-zfdevops-0001 ~]$ cd /opt
下载对应版本的Nginx
[root@ecs-zfdevops-0001 opt]$ wget http://nginx.org/download/nginx-1.10.2.tar.gz
解压
[root@ecs-zfdevops-0001 opt]$ tar -xvf nginx-1.10.2.tar.gz
进入解压目录
[root@ecs-zfdevops-0001 opt]$ cd nginx-1.10.2
指定新版的的OpenSSL解压目录(这里是–with-openssl=/root/openssl-1.0.2r),配置Nginx,这时需要附带第一步(nginx -V)的结果信息
[root@ecs-zfdevops-0001 nginx-1.10.2]$ ./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=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --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 --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-debug --with-cc-opt=‘-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic’ --with-ld-opt=’ -Wl,-E’ --with-openssl=/root/openssl-1.0.2r
第一个报错:./configure: error: the HTTP rewrite module requires the PCRE library.
解决:
[root@ecs-zfdevops-0001 nginx-1.10.2]$ yum -y install pcre-devel
再次执行 ./configure --prefix=。。。那条指令
第二个报错:./configure: error: the HTTP gzip module requires the zlib library.
解决:
[root@ecs-zfdevops-0001 nginx-1.10.2]$ yum -y install zlib-devel
再次执行 ./configure --prefix=。。。那条指令
第三个报错:./configure: error: the HTTP XSLT module requires the libxml2/libxslt
解决:
[root@ecs-zfdevops-0001 nginx-1.10.2]$ yum -y install libxml2 libxml2-dev
[root@ecs-zfdevops-0001 nginx-1.10.2]$ yum -y install libxslt-devel
再次执行 ./configure --prefix=。。。那条指令
第四个报错:./configure: error: the HTTP image filter module requires the GD library.
解决:
[root@ecs-zfdevops-0001 nginx-1.10.2]$ yum -y install gd-devel
再次执行 ./configure --prefix=。。。那条指令
第五个报错:./configure: error: perl module ExtUtils::Embed is required
解决:
[root@ecs-zfdevops-0001 nginx-1.10.2]$ yum -y install perl-devel perl-ExtUtils-Embed
再次执行 ./configure --prefix=。。。那条指令
第六个报错:./configure: error: the GeoIP module requires the GeoIP library.
解决:
[root@ecs-zfdevops-0001 nginx-1.10.2]$ yum -y install GeoIP GeoIP-devel GeoIP-data
再次执行 ./configure --prefix=。。。那条指令,正常,无错误信息~
编译Nginx
[root@ecs-zfdevops-0001 nginx-1.10.2]$ make
找见之前Nginx的位置
[root@ecs-zfdevops-0001 nginx-1.10.2]$ which nginx
/usr/sbin/nginx
备份旧版的Nginx
[root@ecs-zfdevops-0001 nginx-1.10.2]$ cp /usr/sbin/nginx /usr/sbin/nginx.back
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。
深知大多数Java工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年Java开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Java开发知识点,真正体系化!
由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新
如果你觉得这些内容对你有帮助,可以添加V获取:vip1024b (备注Java)
最后
针对最近很多人都在面试,我这边也整理了相当多的面试专题资料,也有其他大厂的面经。希望可以帮助到大家。
最新整理面试题
上述的面试题答案都整理成文档笔记。也还整理了一些面试资料&最新2021收集的一些大厂的面试真题
最新整理电子书
最新整理大厂面试文档
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。
整理了一些面试资料&最新2021收集的一些大厂的面试真题
最新整理电子书
[外链图片转存中…(img-Tj7Rv7cT-1711950941082)]
最新整理大厂面试文档
[外链图片转存中…(img-8lVZje8C-1711950941083)]
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。