是这样的,我小白一个,翻了好多教程折腾把 www.uptownboy.cn 弄好了。
觉得还可以继续折腾,又试着想用 Let's Encrypt 给加上 HTTPS , VPS 上 Debian 8 装的是 1.6.2 ,发现原来 Nginx 从 1.9.2 才开始支持 HTTP 2.0 ,开始查直接 apt-get update 的方法,结果报错:
The following packages will be upgraded:
nginx
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/711 kB of archives.
After this operation, 2,396 kB of additional disk space will be used.
Reading changelogs... Done
(Reading database ... 46836 files and directories currently installed.)
Preparing to unpack .../nginx_1.10.2-1~jessie_amd64.deb ...
Unpacking nginx (1.10.2-1~jessie) over (1.6.2-5+deb8u2) ...
dpkg: error processing archive /var/cache/apt/archives/nginx_1.10.2-1~jessie_amd64.deb (--unpack):
trying to overwrite '/etc/default/nginx', which is also in package nginx-common 1.6.2-5+deb8u2
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
E: Sub-process /usr/bin/dpkg returned an error code (1)
还有另外一种方法但是不敢往下编译, wget http://nginx.org/download/nginx-1.11.5.tar.gz 把最新版本拉下来了, Nginx -V 查看原来 1.6.2 的参数如下:
--with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt=-Wl,-z,relro --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_spdy_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module --add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/modules/nginx-auth-pam --add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/modules/nginx-dav-ext-module --add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/modules/nginx-echo --add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/modules/nginx-upstream-fair --add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/modules/ngx_http_substitutions_filter_module
最后几行都有--add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/,我担心这个路径我直接在 1.11.5 里面./configure 会编译出错。
想请教一下大神们, Nginx 正确升级的姿势应该是如何?谢谢
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.