背景
公司在用crawlab来进行爬虫的管理,但crawlab自带的nginx因为被绿盟扫出漏洞,所以需要升级到最新版本
步骤
由于需要使用nginx官方指定的deb源下载最新稳定版本的nginx,所以需要先添加一个信任公钥(PGP)。可以将下列公钥复制保存为一个名为nginx_signing.key的文件(也可到官网去下载):
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30# 下载公钥 wget http://nginx.org/keys/nginx_signing.key -O /home/nginx/nginx_signing.key # 进入下载目录,添加公钥到apt apt-key add nginx_signing.key # 查看Ubuntu版本 Ubuntu 20.04.1 LTS n l cat /etc/issue # Ubuntu 每一个版本都对应一个codename # 20.04.1 的codename 是 focal # 向apt的源列表中添加nginx echo "deb http://nginx.org/packages/ubuntu/ focal nginx" >> /etc/apt/sources.list # 更新apt apt update # 查看可安装的nginx版本,我这最新版本是1.20.1 apt-cache madison nginx # 我这是更新nginx版本,不会直接更新,所以先卸载,再安装 apt remove nginx apt remove nginx-full apt autoremove apt install nginx # nginx version: nginx/1.20.1 nginx -v
转载自:
https://blog.csdn.net/weixin_33708432/article/details/91858648
https://blog.csdn.net/m0_38138879/article/details/117093055
https://my.oschina.net/chkui/blog/1791879
最后
以上就是无私香氛最近收集整理的关于docker容器内 Ubuntu 通过apt的方式安装 最新版本Nginx背景步骤的全部内容,更多相关docker容器内内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复