当前位置: 首页 > news >正文

用html制作网站代码申请域名邮箱

用html制作网站代码,申请域名邮箱,wordpress文章排列,石油化工建设网站文章目录 1、nginx平滑升级1.1 平滑升级的应用场景和意义 2、平滑升级的操作2.1 安装 nginx1.20.22.2 平滑升级操作2.3 平滑回滚 3、总结 1、nginx平滑升级 1.1 平滑升级的应用场景和意义 Nginx平滑升级具有重要意义与广泛的应用场景。在意义层面,它可在不中断服务…

文章目录

  • 1、nginx平滑升级
    • 1.1 平滑升级的应用场景和意义
  • 2、平滑升级的操作
    • 2.1 安装 nginx1.20.2
    • 2.2 平滑升级操作
    • 2.3 平滑回滚
  • 3、总结


1、nginx平滑升级

1.1 平滑升级的应用场景和意义

Nginx平滑升级具有重要意义与广泛的应用场景。在意义层面,它可在不中断服务的前提下完成版本更新,避免因服务暂停导致的用户访问中断、业务损失及影响用户体验,同时能让新版本的功能、性能优化和安全补丁及时生效,增强服务器稳定性与安全性,还可减少运维操作复杂度和对业务的干扰,提升系统可用性。在应用场景方面,当Nginx新版本引入关键功能(如更高效的负载均衡算法、新协议支持)时,平滑升级能让业务快速受益;面对已知安全漏洞,可通过平滑升级及时修复,降低被攻击风险;当业务流量增长,需利用新版本性能优化(如连接处理优化、内存管理改进)提升服务器处理能力时,平滑升级可在不中断服务的情况下实现;此外,在需要对Nginx配置进行重大调整或模块升级时,平滑升级能确保调整过程中服务持续可用,避免因配置变更导致的服务中断问题。

2、平滑升级的操作

2.1 安装 nginx1.20.2

   #拖入相关的安装包24  yum -y install gcc pcre-devel openssl-devel zlib-devel openssl openssl-devel#安装依赖环境25  useradd -M -s /sbin/nologin nginx#创建nginx用户便于管理26  ls27  tar -xf nginx-1.20.2.tar.gz 28  ls29  cd nginx-1.20.2/30  l31  ls32  ./configure --prefix=/apps/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --with-stream --with-stream_ssl_module --with-stream_realip_module#指定编译路径,以及可能用得到的模块33  vim /etc/profile34  source /etc/profile#声明nginx的环境变量35  nginx -v36  vim /etc/profile37  ls38  make -j2 && make install#编译安装39  nginx -v
[root@localhost nginx-1.20.2]# 

查看安装的版本为1.20.2

[root@localhost nginx-1.20.2]# nginx -v
nginx version: nginx/1.20.2
[root@localhost nginx-1.20.2]# nginx -V
nginx version: nginx/1.20.2
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) 
built with OpenSSL 1.0.2k-fips  26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/apps/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --with-stream --with-stream_ssl_module --with-stream_realip_module
[root@localhost nginx-1.20.2]# 

2.2 平滑升级操作

[root@localhost ~]# cd /opt/
[root@localhost opt]# ls
rh
[root@localhost opt]# rz -E
rz waiting to receive.
[root@localhost opt]# ls
nginx-1.28.0.tar.gz  rh
#拖入安装包
[root@localhost opt]# tar -xf nginx-1.28.0.tar.gz 
[root@localhost opt]# ls
nginx-1.28.0  nginx-1.28.0.tar.gz  rh
[root@localhost opt]# cd nginx-1.28.0/
[root@localhost nginx-1.28.0]# ls
auto        CODE_OF_CONDUCT.md  contrib          LICENSE    SECURITY.md
CHANGES     conf                CONTRIBUTING.md  man        src
CHANGES.ru  configure           html             README.md
[root@localhost nginx-1.28.0]# ./configure --prefix=/apps/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --with-stream --with-stream_ssl_module --with-stream_realip_module
#需要和上面低版本的模块一样

编译(注意只能编译)make -j2

[root@localhost nginx-1.28.0]# ls
auto        CODE_OF_CONDUCT.md  contrib          LICENSE   objs         src
CHANGES     conf                CONTRIBUTING.md  Makefile  README.md
CHANGES.ru  configure           html             man       SECURITY.md
[root@localhost nginx-1.28.0]# make -j2

复制nginx的执行文件到相应的位置

[root@localhost nginx-1.28.0]# ls
auto        CODE_OF_CONDUCT.md  contrib          LICENSE   objs         src
CHANGES     conf                CONTRIBUTING.md  Makefile  README.md
CHANGES.ru  configure           html             man       SECURITY.md[root@localhost nginx-1.28.0]# cd objs/
#进入obj目录
[root@localhost objs]# ls
autoconf.err  nginx    ngx_auto_config.h   ngx_modules.c  src
Makefile      nginx.8  ngx_auto_headers.h  ngx_modules.o
#找到nginx的执行文件
[root@localhost objs]# cd /apps/nginx/sbin/
[root@localhost sbin]# ls
nginx
[root@localhost sbin]# mv nginx nginx.old
#备份原来的执行文件为nginx.old
[root@localhost sbin]# cd -
/opt/nginx-1.28.0/objs
[root@localhost objs]# ls
autoconf.err  nginx    ngx_auto_config.h   ngx_modules.c  src
Makefile      nginx.8  ngx_auto_headers.h  ngx_modules.o
[root@localhost objs]# mv nginx /apps/nginx/sbin/
#把高版本的nginx可执行文件移动到低版本的工作目录
[root@localhost objs]# ls /apps/nginx/sbin/
nginx  nginx.old
[root@localhost objs]# 

make upgrade操作

[root@localhost objs]# cd /opt/nginx-1.28.0/
[root@localhost nginx-1.28.0]# ls
auto        CODE_OF_CONDUCT.md  contrib          LICENSE   objs         src
CHANGES     conf                CONTRIBUTING.md  Makefile  README.md
CHANGES.ru  configure           html             man       SECURITY.md
[root@localhost nginx-1.28.0]# 
#需要切换到nginx的文件夹目录[root@localhost nginx-1.28.0]# make upgrade
/apps/nginx/sbin/nginx -t
nginx: the configuration file /apps/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /apps/nginx/conf/nginx.conf test is successful
kill -USR2 `cat /apps/nginx/logs/nginx.pid`
sleep 1
test -f /apps/nginx/logs/nginx.pid.oldbin
kill -QUIT `cat /apps/nginx/logs/nginx.pid.oldbin`
[root@localhost nginx-1.28.0]# nginx -v
nginx version: nginx/1.28.0
[root@localhost nginx-1.28.0]# 
#此时我们就完成了升级

2.3 平滑回滚

在上面的基础上,回滚操作就显得很容易了

[root@localhost nginx-1.28.0]# cd /apps/nginx/sbin/
[root@localhost sbin]# ls
nginx  nginx.old
#进入目录
[root@localhost sbin]# mv nginx nginx.1.28
[root@localhost sbin]# ls
nginx.1.28  nginx.old
[root@localhost sbin]# mv nginx.old nginx.
[root@localhost sbin]# mv nginx. nginx
[root@localhost sbin]# ls
nginx  nginx.1.28
#更改nginx可执行文件的名称
[root@localhost sbin]# ls
nginx  nginx.1.28
[root@localhost sbin]# cd /opt/nginx-1.28.0/
#进入nginx文件目录
[root@localhost nginx-1.28.0]# make upgrade
/apps/nginx/sbin/nginx -t
nginx: the configuration file /apps/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /apps/nginx/conf/nginx.conf test is successful
kill -USR2 `cat /apps/nginx/logs/nginx.pid`
sleep 1
test -f /apps/nginx/logs/nginx.pid.oldbin
kill -QUIT `cat /apps/nginx/logs/nginx.pid.oldbin`
#make upgrade成功
[root@localhost nginx-1.28.0]# nginx -v
nginx version: nginx/1.20.2
#查看版本是否回滚成功
[root@localhost nginx-1.28.0]# 

3、总结

通过nginx的执行文件可以决定nginx运行的版本,更换nginx的执行文件可以实现nginx版本的升级和回滚。

http://www.dtcms.com/a/438909.html

相关文章:

  • 调和函数在球上的平均值性质与Poisson公式估计
  • Spring——声明式事务
  • 【Go 语言】揭秘 Go 语言的并发魔法:Goroutine 入门指南
  • 工商企业信息查询网站深圳宝安龙岗紧急寻人
  • 怎么上传视频到公司网站西安seo排名扣费
  • cms(网站内容管理系统)有哪些商业信息网站大全
  • Redis面试题及详细答案100道(86-100) --- 综合篇
  • 贪心算法:原理与实战全解析
  • python评估算法性能
  • 408之cpp(二叉树的广度优先遍历)
  • 保定市网站销售和设计中国各大网站开发语言
  • 本地常州微信网站建设做网站税率
  • 网页设计 做网站的代码公司网站开发项目管理制度
  • EFlat-LoRA 的严格数学推导
  • 【面板数据】全国分省教育支出水平数据集(2007-2023年)
  • 做网站工商局要不要备案呢wordpress主题多页面
  • 济南网站建设服务公司wordpress 远程插件安装 ftp
  • 济南网站建设公司按需定制保险网站建设的目标
  • 深入剖析:boost::intrusive_ptr 与 std::shared_ptr 的性能边界和实现哲学
  • 聊城制作手机网站公司网站建设需要的条件
  • SQL 子查询与多表 JOIN 用法大全(速查版)
  • Leetcode 239. 滑动窗口最大值 优先队列 / 双向单调队列
  • Nacos 工作原理及流量走向
  • 夏津网站建设茂名企业建站程序
  • OSPF 单区域实验 概念及题目
  • 建立一个门户网站WordPress域名后问号英文
  • 自上而下VS自下而上:设计哲学全解
  • 【开题答辩全过程】以 SpringCloud家乡美旅行交流博客平台为例,包含答辩的问题和答案
  • 2015优先中文公司官网wordpress模板
  • 国外优秀企业网站网络空间的竞争归根结底是