永发信息网

nginx 开启 uptream 需要补丁吗

答案:1  悬赏:40  手机版
解决时间 2021-03-05 11:34
nginx 开启 uptream 需要补丁吗
最佳答案
何升级Nginx新稳定版
我环境:
Ubuntu 12.04 LTS
Nginx 1.1.9
Nginx通apt-get式安装所我路径与载代码再编译、安装些我升级程
1.进入Downloads文件夹
cd /Downloads

2.载nginx-1.2.5.tar.gz文件Downloads文件夹
wget

3.解压nginx-1.2.5.tar.gz文件
tar zxvf nginx-1.2.5.tar.gz

4.进入ngixn-1.2.5文件夹
cd nginx-1.2.5

5.查看nginx原配置
nginx -V

面命令输:

--prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module

6.执行configure命令,面跟原nginx配置

./configure --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module

执行configure几错误:
a.配置 --with-http_xslt_module 提示 the HTTP XSLT module requires the libxml2/libxslt libraries
sudo apt-get install libxml2 libxml2-dev libxslt-dev

b.配置 --with-http_image_filter_module 提示 the HTTP image filter module requires the GD library.
sudo apt-get install libgd2-xpm libgd2-xpm-dev

c.配置 --with-http_geoip_module 提示 the GeoIP module requires the GeoIP library.
sudo apt-get install geoip-database libgeoip-dev

d.rewrite需要pcre支持, 错误提示:./configure: error: the HTTP rewrite module requires the PCRE library.
apt-get install libpcre3 libpcre3-dev

7.再执行第6步configure命令
8.没提示缺少library, 执行make令命编译nginx, 编译objs目录nginx文件已编辑nginx程序
make

9.更改旧nginx程序名,并复制新程序,我旧nginx程序放/usr/sbin/目录
mv /usr/sbin/nginx /usr/sbin/nginx-20121122
cp objs/nginx /usr/sbin/nginx
/usr/sbin/nginx -t

执行/usr/sbin/nginx -t 命令检查配置文件并返面信息:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

10.nginx-1.2.5目录执行面命令升级nginx
make upgrade

11.执行make upgrade错误:
make: /etc/nginx/sbin/nginx: Command not found
make: *** [upgrade] Error 127

12.用文本编辑器打修改nginx-1.2.5目录名Makefile文件upgrade节点/etc/nginx/sbin/nginx改/usr/sbin/nginx -t,保存关闭并重新执行make upgrade命令
13.执行nginx -v命令程序版本号已经1.2.5升级完毕.
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
加快产业结构的调整是治理通货紧缩的政策措施
中国联通东风路营业厅我想知道这个在什么地方
高中数学、、、在等比数列{an}中,已知a1=-2,S
蒙古族古代文学里三大之最著作
被一家公司录用了,但是公司隔壁是一家我面试
第一次约会 他就想亲我 不过我不让 只是他也
东风日产启辰龙岩汇京闽龙店地址在什么地方,
【contact是什么意思】contact是什么意思呢?
白色车跟香槟金色那个好
我在商水县的一个乡镇开了一家中国电信合作营
椰泰和椰树这两个牌子有什么关系,哪个好一点
金卤灯镇流器,如何用万用表测量好坏
聚贤牛肉粉丝汤兰陵总店在什么地方啊,我要过
郑州西一小学部一年多少钱
---Hey, dear! Guess what? I’ve got a pay
推荐资讯
春天去海边穿什么衣服和鞋子
胡园子村在什么地方啊,我要过去处理事情
为什么我的电脑下载不了QQ飞车 电脑显示硬盘
小米4手机电筒打开后相机就无法连接了
奉化市岳林街道后方村卫生室(二)我想知道这个
腾达数码手机是真的还是假的
北京在什么地方考电工本
不去派出所的情况怎么知道自己记录在案
吉林敦化雁鸣湖温泉是室外的吗
我要买一个无位QQ要多少钱
邱士鉴的老婆是谁?
乐满居我想知道这个在什么地方
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?