centos7 - centOS 更新 nginx 版本
大家讲道理
大家讲道理 2017-05-16 17:14:36
[Linux讨论组]

前几天准备升级一下HTTP协议, 把 nginx update ,然后, 实际查看版本使用:

nginx -V
// 返回的是 1.10

然后, 使用 nginx -s reload 之后. 重启正常, 但是, 在浏览器端, 通过插件显示 Nginx 版本还是 1.6的版本. 并且, 协议并没有升级, 依旧是 HTTP1.1
有遇到这样问题的大神吗? 求解答.
实际网页是: https://www.villainhr.com/

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

全部回复(2)
大家讲道理

最好还是手动编译安装nginx吧!

  • 手动编译安装openssl版本是OpenSSL 1.0.2h

  • 手动编译安装nginx,增加编译参数

     --with-http_ssl_module \
     --with-http_v2_module \
     --with-openssl=/usr/local/src/openssl-1.0.2h
    
我想大声告诉你

Nginx官方为RHEL/CentOS/Debian/Ubuntu/SLES提供了yum和apt源.

Pre-Built Packages for Stable version

To set up the yum repository for RHEL/CentOS, create the file named /etc/yum.repos.d/nginx.repo with the following contents:

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/
gpgcheck=0
enabled=1

Replace “OS” with “rhel” or “centos”, depending on the distribution used, and “OSRELEASE” with “5”, “6”, or “7”, for 5.x, 6.x, or 7.x versions, respectively.

For Debian/Ubuntu, in order to authenticate the nginx repository signature and to eliminate warnings about missing PGP key during installation of the nginx package, it is necessary to add the key used to sign the nginx packages and repository to the apt program keyring. Please download this key from our web site, and add it to the apt program keyring with the following command:

sudo apt-key add nginx_signing.key

For Debian replace codename with Debian distribution codename, and append the following to the end of the /etc/apt/sources.list file:

deb http://nginx.org/packages/debian/ codename nginx
deb-src http://nginx.org/packages/debian/ codename nginx

For Ubuntu replace codename with Ubuntu distribution codename, and append the following to the end of the /etc/apt/sources.list file:

deb http://nginx.org/packages/ubuntu/ codename nginx
deb-src http://nginx.org/packages/ubuntu/ codename nginx

For Debian/Ubuntu then run the following commands:

apt-get update
apt-get install nginx

For SLES run the following command:

zypper addrepo -G -t yum -c 'http://nginx.org/packages/sles/12' nginx
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号