Ubuntu 更改 Nginx 版本

1.25 降为 1.18

  1. 先卸载干净
shell 复制代码
# 1. 完全卸载当前Nginx
sudo apt purge nginx nginx-common nginx-core

# 2. 清理残留配置
sudo apt autoremove
sudo rm -rf /etc/apt/sources.list.d/nginx*.list
  1. 修改仓库地址
shell 复制代码
# 添加仓库(通用稳定版仓库)
codename=$(lsb_release -cs)
echo "deb http://nginx.org/packages/ubuntu ${codename} nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
echo "deb-src http://nginx.org/packages/ubuntu ${codename} nginx" | sudo tee -a /etc/apt/sources.list.d/nginx.list
  1. 更新仓库并安装1.18
shell 复制代码
sudo apt update
sudo apt install nginx=1.18.0-1~${codename}
shell 复制代码
nginx -v
# nginx version: nginx/1.18.0
相关推荐
眠修7 分钟前
Nginx + Tomcat负载均衡群集
nginx·tomcat·负载均衡
瘦皮猴5 小时前
golang context canceled异常排查
后端·nginx
hunter1279 小时前
Nginx 事件驱动理解
nginx
fydw_7151 天前
生产环境中安装和配置 Nginx 以部署 Flask 应用的详细指南
运维·nginx·flask
xzh1 天前
问题:Nginx client_body_temp_path 文件会删除吗,删除时机?
nginx·架构
dessler1 天前
代理服务器-LVS的3种模式与调度算法
运维·服务器·网络·算法·nginx·tomcat·lvs
2501_911121231 天前
Nginx+Tomcat 负载均衡群集
nginx·tomcat·负载均衡
小鱼小鱼.oO2 天前
阿里云服务器安装nginx并配置前端资源路径(前后端部署到一台服务器并成功访问)
服务器·nginx·阿里云
广东数字化转型2 天前
nginx怎么使用nginx-rtmp-module模块实现直播间功能
linux·运维·nginx
�FENG2 天前
LVS、NGINX、HAPROXY的调度算法
nginx·lvs·haproxy·调度算法