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

网站改版后的推广办法企业邮箱登录入口手机网页版

网站改版后的推广办法,企业邮箱登录入口手机网页版,软件开发专业学校,erp系统自学详细教程目录 一、Nginx相关介绍 1. 概述 2. 优缺点 3. 零拷贝技术 4. I/O模型相关概念 5. 网络I/O模型 5.1 阻塞型I/O模型 5.2 非阻塞型I/O模型 5.3 多路复用I/O型 5.4 信号驱动式I/O模型 5.5 异步I/O模型 6. 事件驱动模型 7. Nginx与Apache区别 二、Nginx部署和使用 1…目录 一、Nginx相关介绍 1. 概述 2. 优缺点 3. 零拷贝技术 4. I/O模型相关概念 5. 网络I/O模型  5.1 阻塞型I/O模型 5.2 非阻塞型I/O模型 5.3 多路复用I/O型 5.4 信号驱动式I/O模型 5.5 异步I/O模型 6. 事件驱动模型 7. Nginx与Apache区别 二、Nginx部署和使用 1. yum安装 2. 编译安装 3. 创建Nginx 自启动文件 4. 信号使用命令及平滑升级 4.1 信号 5. 热升级nginx1.18至nginx1.20 6. 回滚  一、Nginx相关介绍 1. 概述 Nginx发音为engine-x是一个高性能的开源Web服务器反向代理服务器以及电子邮件IMAP/POP3代理服务器。Nginx专为性能优化而设计可以处理高并发连接并且占用系统资源较少。它也被广泛用作负载均衡器和HTTP缓存。Nginx的设计目标之一是解决C10k问题即同时连接数超过1万的情况下仍能保持高性能。 2. 优缺点 优点 ① 高并发能力: 能够处理大量并发连接适合高流量的网站和应用程序 ② 低系统资源消耗: 相比其他Web服务器Nginx占用更少的系统资源表现出更好的性能 ③ 灵活的配置选项: 允许管理员根据需要进行高度定制满足各种复杂的部署需求 ④ 可扩展性: 支持动态模块加载可以根据需要添加额外的功能和扩展 缺点 ① 不适合处理动态内容: 相比Apache等服务器Nginx在处理动态内容时效率稍低。 ② 学习曲线: 对于初学者来说可能需要一些时间来熟悉Nginx的配置和工作原理。 ③ 缺少内置的支持: 相比一些其他服务器Nginx在某些方面可能需要依赖第三方模块来实现特定功能。 3. 零拷贝技术 在传统的数据传输过程中数据通常需要经过多次复制。比如当数据从磁盘读取到内存时首先将数据读入内核缓冲区然后再从内核缓冲区复制到用户空间的应用程序缓冲区。零拷贝技术通过避免或减少数据在内存和设备之间的多次复制来提高效率。具体做法包括直接内存访问DMA、文件映射mmap和发送文件sendfile等。 4. I/O模型相关概念 同步/异步消息反馈机制关注的是消息通信机制即调用者在等待一件事情的处理结果时被调用者是否提供完成状态的通知 同步被调用者不提供事件的处理结果需要调用者主动询问事情是否处理完成异步被调用者通过状态、通知或回调机制主动通知调用者被调用者的运行状态 阻塞/非阻塞关注调用者在等待结果返回之前所处的状态 阻塞指IO操作需要彻底完成后才返回到用户空间调用结果返回之前调用者被挂起干不了别的事情非阻塞指IO操作被调用后立即返回给用户一个状态值而无需等到IO操作彻底完成在最终的调用结果返回之前调用者不会被挂起可以去做别的事情 5. 网络I/O模型  5.1 阻塞型I/O模型 Linux操作系统默认是阻塞型I/O模型。阻塞IO模型是最简单的I/O模型用户线程在内核进行IO操作时被阻塞用户线程通过系统调用read发起I/O读操作由用户空间转到内核空间。内核等到数据包到达后然后将接收的数据拷贝到用户空间完成read操作用户需要等待read将数据读取到buffer缓存区后才继续处理接收的数据。整个I/O请求的过程中用户线程是被阻塞的这导致用户在发起IO请求时不能做任何事情对CPU的资源利用率不够。 优点程序简单在阻塞等待数据期间进程/线程挂起基本不会占用 CPU 资源缺点每个连接需要独立的进程/线程单独处理当并发请求量大时为了维护程序内存、线程切换开销较大apache 的preforck使用的是这种模式。 5.2 非阻塞型I/O模型 用户线程发起IO请求时立即返回。但并未读取到任何数据用户线程需要不断地发起IO请求直到数据到达后才真正读取到数据继续执行。即 “轮询”机制存在两个问题如果有大量文件描述符都要等那么就得一个一个的read。这会带来大量的Context Switchread是系统调用每调用一次就得在用户态和核心态切换一次。轮询的时间不好把握。这里是要猜多久之后数据才能到。等待时间设的太长程序响应延迟就过大;设的太短就会造成过于频繁的重试干耗CPU而已是比较浪费CPU的方式一般很少直接使用这种模型而是在其他IO模型中使用非阻塞IO这一特性。 5.3 多路复用I/O型 I/O multiplexing 主要包括:selectpollepoll三种系统调用select/poll/epoll的好处就在于单个process就可以同时处理多个网络连接的IO。它的基本原理就是select/poll/epoll这个function会不断的轮询所负责的所有socket当某个socket有数据到达了就通知用户进程。当用户进程调用了select那么整个进程会被block而同时kernel会“监视”所有select负责的socket当任何一个socket中的数据准备好了select就会返回。这个时候用户进程再调用read操作将数据从kernel拷贝到用户进程。Apache prefork是此模式的selectwork是poll模式。 5.4 信号驱动式I/O模型 通过系统调用 sigaction 并注册一个信号处理的回调函数该调用会立即返回然后主程序可以继续向下执行当有I/O操作准备就绪,即内核数据就绪时内核会为该进程产生一个SIGIO 信号并回调注册的信号回调函数这样就可以在信号回调函数中系统调用 recvfrom 获取数据,将用户进程所需要的数据从内核空间拷贝到用户空间。 此模型的优势在于等待数据报到达期间进程不被阻塞。用户主程序可以继续执行只要等待来自信号处理函数的通知。在信号驱动式 I/O 模型中应用程序使用套接口进行信号驱动 I/O并安装一个信号处理函数进程继续运行并不阻塞当数据准备好时进程会收到一个 SIGIO 信号可以在信号处理函数中调用 I/O 操作函数处理数据。 优点线程并没有在等待数据时被阻塞内核直接返回调用接收信号不影响进程继续处理其他请求因此可以提高资源的利用率缺点信号I/O在大量IO操作时可能会因为信号队列溢出导致没法通知 5.5 异步I/O模型 异步I/O 与 信号驱动I/O最大区别在于信号驱动是内核通知我们何时开始一个I/O操作而异步I/O是由内核通知我们I/O操作何时完成两者有本质区别,相当于不用去饭店场吃饭直接点个外卖把等待上菜的时间也给省了。所有事情都交给内核处理。 6. 事件驱动模型 Nginx支持在多种不同的操作系统实现不同的事件驱动模型但是其在不同的操作系统甚至是不同的系统版本上面的实现方式不同。 ① selectselect库是在linux和windows平台都基本支持的 事件驱动模型库并且在接口的定义也基本相同只是部 分参数的含义略有差异最大并发限制1024是最早期的事件驱动模型。 ② poll在Linux 的基本驱动模型windows不支持此驱动模型是select的升级版取消了最大的并发限制在编 译nginx的时候可以使用--with-poll_module和--without-poll_module这两个指定是否编译select 库。 ③ epollepoll是库是Nginx服务器支持的最高性能的事件驱动库之一是公认的非常优秀的事件驱动模型它和select和poll有很大的区别epoll是poll的升级版但是与poll有很大的区别. epoll的处理方式是创建一个待处理的事件列表然后把这个列表发给内核返回的时候在去轮训检查这个表以判断事件是否发生epoll支持一个进程打开的最大事件描述符的上限是系统可以打开的文件的最大数同时epoll库的I/O效率不随描述符数目增加而线性下降因为它只会对内核上报的“活跃”的描述符进行操作。 7. Nginx与Apache区别 ① 性能和并发处理 Nginx采用事件驱动的架构能够高效地处理大量并发连接在高并发情况下表现出色占用较少的系统资源 Apache传统多进程模型在高并发情况下性能可能受限消耗较多的系统资源 ② 静态内容处理 Nginx擅长处理静态文件能够快速、高效地提供静态内容 Apache在处理静态文件时效率稍低尤其在高并发环境下表现不如Nginx ③ 动态内容处理 Nginx对于动态内容的处理相对有限通常需要结合后端应用服务器如uWSGI、FastCGI等来处理动态请求 Apache擅长处理动态内容支持多种编程语言和模块如mod_php、mod_perl等  ④  配置语法和灵活性 Nginx配置文件语法简洁清晰支持动态模块加载允许管理员根据需要进行高度定制 Apache配置文件相对复杂但更加灵活允许管理员通过.htaccess文件进行目录级别的配置 ⑤ 虚拟主机支持 Nginx能够支持虚拟主机配置但相对Apache的虚拟主机配置更为简洁 Apache以在同一台服务器上托管多台域名的网站 ⑥ 模块和扩展性 Nginx支持丰富的第三方模块但相比Apache模块生态系统规模较小 Apache拥有庞大的模块生态系统支持广泛的功能和扩展 ⑦ 适用场景 Nginx更适合作为反向代理、负载均衡器以及高性能Web服务器使用 Apache适合处理动态内容、具有灵活的配置需求并且需要强大的模块支持的场景 综合来看Nginx擅长处理高并发、静态内容以及作为反向代理和负载均衡器而Apache则更适合处理动态内容、拥有复杂配置需求和强大的模块支持的场景。 二、Nginx部署和使用 1. yum安装 ① 使用yum部署Nginx需要先安装epel-release扩展包 [rootlocalhost ~]# yum install epel-release -y #安装epel额外源 [rootlocalhost ~]# yum install nginx -y #安装nginx ② 使用yum安装的nginx配置文件位置在/etc/nginx/nginx.conf默认根目录在/usr/share/nginx/html默认日志文件在/var/log/nginx/路径下 2. 编译安装 ① 访问官网下载安装包优先选择偶数版本下载较为稳定。下载到本地可以使用xshell工具传输到Linux系统中或者使用wget工具复制链接下载。 [rootlocalhost ~]# useradd -M -s /sbin/nologin nginx #新建nginx用户便于管理 [rootlocalhost opt]# wget https://nginx.org/download/nginx-1.24.0.tar.gz ② 安装编译需要的依赖环境和工具进入对应的目录进行解压编译 [rootlocalhost opt]# tar xf nginx-1.24.0.tar.gz #解压 [rootlocalhost opt]# cd nginx-1.24.0/ [rootlocalhost nginx-1.24.0]# ls auto CHANGES CHANGES.ru conf configure contrib html LICENSE man README src [rootlocalhost nginx-1.24.0]# yum install gcc pcre-devel openssl-devel zlib-devel openssl openssl-devel -y #安装依赖包 [rootlocalhost nginx-1.24.0]# ./configure --prefix/apps/nginx \--usernginx \--groupnginx \--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 [rootlocalhost nginx-1.24.0]# make -j 2 make install #2u编译执行文件安装[rootlocalhost nginx-1.24.0]# chown -R nginx.nginx /apps/nginx #修改权限 ③ 创建软链接并关闭防火墙 [rootlocalhost nginx-1.24.0]# ln -s /apps/nginx/sbin/nginx /usr/sbin/ [rootlocalhost nginx-1.24.0]# systemctl stop firewalld [rootlocalhost nginx-1.24.0]# setenforce 0 ④ 启动关闭nginx查看进程 [rootlocalhost nginx-1.24.0]# nginx [rootlocalhost nginx-1.24.0]# ps aux | grep nginx root 4664 0.0 0.0 20580 616 ? Ss 15:52 0:00 nginx: master process nginx nobody 4665 0.0 0.0 23108 1372 ? S 15:52 0:00 nginx: worker process root 4675 0.0 0.0 112824 984 pts/0 S 15:53 0:00 grep --colorauto nginx #nginx: master主进程 #nginx: worker子进程[rootlocalhost nginx-1.24.0]# killall nginx #停止nginx⑤ 文件夹功能介绍 [rootlocalhost nginx-1.24.0]# ll /apps/nginx/ 总用量 4 drwxr-xr-x. 2 nginx nginx 4096 2月 20 16:36 conf drwxr-xr-x. 2 nginx nginx 40 2月 20 16:36 html drwxr-xr-x. 2 nginx nginx 58 2月 20 16:43 logs drwxr-xr-x. 2 nginx nginx 19 2月 20 16:36 sbin conf保存nginx所有的配置文件其中nginx.conf是nginx服务器的最核心最主要的配置文件其他的.conf则是用来配置nginx相关的功能的例如fastcgi功能使用的是fastcgi.conf和fastcgi_params两个文件配置文件一般都有个样板配置文件是文件名.default结尾使用的使用将其复制为并将default去掉即可。html目录中保存了nginx服务器的web文件但是可以更改为其他目录保存web文件,另外还有一个50x的web文件是默认的错误页面提示页面。logs用来保存nginx服务器的访问日志错误日志等日志logs目录可以放在其他路径比如/var/logs/nginx里面。sbin保存nginx二进制启动脚本可以接受不同的参数以实现不同的功能。 3. 创建Nginx 自启动文件 [rootlocalhost ~]# vim /usr/lib/systemd/system/nginx.service [Unit] Descriptionnginx - high performance web server Documentationhttp://nginx.org/en/docs/ Afternetwork-online.target remote-fs.target nss-lookup.target Wantsnetwork-online.target [Service] Typeforking PIDFile/apps/nginx/logs/nginx.pid #注意文件位置如果不对 启动不了 ExecStart/apps/nginx/sbin/nginx -c /apps/nginx/conf/nginx.conf #注意启动文件位置 ExecReload/bin/kill -s HUP $MAINPID ExecStop/bin/kill -s TERM $MAINPID LimitNOFILE100000[Install] WantedBymulti-user.target[rootlocalhost ~]# systemctl daemon-reload #重新加载配置 [rootlocalhost ~]# systemctl start nginx [rootlocalhost ~]# systemctl status nginx [rootlocalhost ~]# systemctl stop nginx [rootlocalhost ~]# systemctl enable --now nginx #开机自启并立即启动4. 信号使用命令及平滑升级 4.1 信号 nginx 命令支持向其发送信号实现不同功能nginx 当做单独命令使用有以下选项 选项说明nginx -?,-h帮助nginx -v显示版本号nginx -V查看安装了哪些模块nginx -t测试配置文件是否有语法错误nginx -s发送信号 后面可以跟stop、reload、quit、reopennginx -p指定运行目录nginx -c使用指定的配置文件nginx -g指定配置指令 ① 显示版本号 [rootlocalhost ~]# nginx -v nginx version: nginx/1.24.0 ② 显示编译详细情况 模块等信息 [rootlocalhost ~]# nginx -V nginx version: nginx/1.24.0 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 --usernginx --groupnginx --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 ③ 发送信号 [rootlocalhost ~]# pstree -p | grep nginx |-nginx(5367)---nginx(5368) [rootlocalhost ~]# nginx -s stop #立即关闭nginx [rootlocalhost ~]# pstree -p | grep nginx [rootlocalhost ~]# nginx -s quit #优雅退出不影响业务的状态下退出 nginx -s reload #重新加载 USR1分割日志 192.168.190.100 [rootlocalhost ~]# systemctl start nginx [rootlocalhost ~]# cd /apps/nginx/logs/ [rootlocalhost logs]# ls access.log error.log nginx.pid [rootlocalhost logs]# ll | grep access.log -rw-r--r--. 1 root root 0 2月 20 16:41 access.log19.168.190.101 [rootlocalhost ~]# systemctl restart httpd [rootlocalhost ~]# curl 192.168.190.100192.168.190.100 [rootlocalhost logs]# ll | grep access.log -rw-r--r--. 1 root root 92 2月 20 18:04 access.log #产生日志192.168.190.100 [rootlocalhost logs]# mv access.log access.log.bak [rootlocalhost logs]# touch access.log [rootlocalhost logs]# ls access.log access.log.bak error.log nginx.pid [rootlocalhost logs]# ll | grep access.log -rw-r--r--. 1 root root 0 2月 20 18:07 access.log -rw-r--r--. 1 root root 92 2月 20 18:04 access.log.bak [rootlocalhost logs]# nginx -s reopen #重新打开日志文件否则依然写入.bak或者kill -s USR1 主进程号192.168.190.101 [rootlocalhost ~]# curl 192.168.190.100192.168.1901.100 [rootlocalhost logs]# ll | grep access.log -rw-r--r--. 1 nginx root 92 2月 20 18:11 access.log #此时日志已写入新文件 -rw-r--r--. 1 root root 92 2月 20 18:04 access.log.bak ④ 指定配置不以配置文件中的为准 [rootlocalhost ~]# vim /apps/nginx/conf/nginx.conf 3 #worker_processes 1; #避免冲突注释此行[rootlocalhost ~]# nginx -g worker_processes 2; [rootlocalhost ~]# pstree -p | grep nginx|-nginx(6068)--nginx(6069)| -nginx(6070)⑤ 检查语法格式 nginx -t 5. 热升级nginx1.18至nginx1.20 ① 修改配置文件nginx.conf [rootlocalhost sbin]# ps aux | grep nginx #先查看是否开启nginx [rootlocalhost ~]#vim /apps/nginx/conf/nginx.conf worker_processes 2; #开启双核最大性能为8核 [rootlocalhost ~]#nginx -s reload #重新加载配置文件 [rootlocalhost ~]#ps aux | grep nginx #查看多了一个worker进程 ② 下载新版本安装包重新编译安装 [rootlocalhost ~]#wget https://nginx.org/download/nginx-1.20.2.tar.gz -P /usr/local/src/ #下载安装包到/usr/local/src/目录 [rootlocalhost ~]#cd /usr/local/src/ [rootlocalhost src]#ls nginx-1.20.2.tar.gz [rootlocalhost src]#tar xf nginx-1.20.2.tar.gz [rootlocalhost src]#cd nginx-1.20.2/ [rootlocalhost nginx-1.20.2]#ls auto CHANGES CHANGES.ru conf configure contrib html LICENSE man README src [rootlocalhost nginx-1.20.2]# nginx -V nginx version: nginx/1.18.0 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 --usernginx --groupnginx --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 [rootlocalhost nginx-1.20.2]# ./configure --prefix/apps/nginx --usernginx --groupnginx --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 #重新编译 [rootlocalhost nginx-1.20.2]# ls auto CHANGES CHANGES.ru conf configure contrib html LICENSE Makefile man objs README src [rootlocalhost nginx-1.20.2]# make [rootlocalhost nginx-1.20.2]# cd objs/ #此文件夹中有新版本的nginx运行程序 [rootlocalhost objs]# ls autoconf.err Makefile nginx nginx.8 ngx_auto_config.h ngx_auto_headers.h ngx_modules.c ngx_modules.o src [rootlocalhost objs]# ./nginx -v nginx version: nginx/1.20.2 #查看版本 ③ 拷贝新版本至原安装路径 [rootlocalhost objs]# mv /apps/nginx/sbin/nginx /apps/nginx/sbin/nginx.bak #将低版本的nginx主程序改名 [rootlocalhost objs]# cp nginx /apps/nginx/sbin/ #将新版本拷入原安装路径 [rootlocalhost objs]# cd /apps/nginx/sbin/ [rootlocalhost sbin]# ls nginx nginx.bak [rootlocalhost nginx-1.20.2]# ll /apps/nginx/sbin/ 总用量 15308 -rwxr-xr-x. 1 root root 7896080 2月 20 21:15 nginx -rwxr-xr-x. 1 nginx nginx 7774624 2月 20 20:52 nginx.bak [rootlocalhost nginx-1.20.2]# nginx -v nginx version: nginx/1.20.2 #nginx文件为新版本 [rootlocalhost sbin]# /apps/nginx/sbin/nginx -t #检查下语法问题 ④ 生成新进程 [rootlocalhost nginx-1.20.2]# kill -USR2 cat /apps/nginx/logs/nginx.pid #发送 2 信号[rootlocalhost sbin]# pstree -p | grep nginx|-nginx(5073)--nginx(8717)--nginx(8718)| | -nginx(8719)| |-nginx(5623)| -nginx(5624) [rootlocalhost sbin]# ps aux | grep -v grep | grep nginx root 5073 0.0 0.1 46344 2020 ? Ss 22:33 0:00 nginx: master process /apps/nginx/sbin/nginx -c /apps/nginx/conf/nginx.conf nginx 5623 0.0 0.1 48856 2092 ? S 22:37 0:00 nginx: worker process nginx 5624 0.0 0.1 48856 2084 ? S 22:37 0:00 nginx: worker process root 8717 0.0 0.1 46220 3368 ? S 22:43 0:00 nginx: master process /apps/nginx/sbin/nginx -c /apps/nginx/conf/nginx.conf nginx 8718 0.0 0.1 48756 1992 ? S 22:43 0:00 nginx: worker process nginx 8719 0.0 0.1 48756 1992 ? S 22:43 0:00 nginx: worker process #生成新的master8717 [rootlocalhost ~]# cd /apps/nginx/logs [rootlocalhost logs]# ls access.log error.log nginx.pid nginx.pid.oldbin [rootlocalhost logs]# cat nginx.pid 8717 #新的master进程 [rootlocalhost logs]# cat nginx.pid.oldbin 5073 #旧的master进程 ⑤ 优雅的退出旧进程不影响真正使用的用户 192.168.190.102 [rootlocalhost ~]# cd /apps/nginx/html [rootlocalhost html]# ls 50x.html index.html #会有新老两个进程 [rootlocalhost html]# dd if/dev/zero of/apps/nginx/html/m.img bs1G count10 #生成大文件 [rootlocalhost html]# ll -h 总用量 1.1G -rw-r--r--. 1 nginx nginx 494 2月 20 20:52 50x.html -rw-r--r--. 1 nginx nginx 612 2月 20 20:52 index.html -rw-r--r--. 1 root root 1.0G 2月 20 22:06 m.img192.168.190.101 [rootlocalhost data]# wget --limit-rate1M http://192.168.190.102/m.img #下载文件192.168.190.102 [rootlocalhost html]# kill -WINCH cat /apps/nginx/logs/nginx.pid.oldbin #优雅关闭旧进程的worker进程此时旧进程不会再接收新的任务后期可以直接退出192.168.190.101 [rootlocalhost ~]# curl 192.168.190.102 -I HTTP/1.1 200 OK Server: nginx/1.20.2 #新版本接替接收任务即升级成功优雅关闭旧进程的worker进程查看是否影响当前任务 注意当旧进程任务结束后可以优雅的退出 kill -quit 旧master pid或者直接关闭kill 旧master pid或者此时将无法回滚。 6. 回滚  当发现新版本有异常可以通过回滚解决。 ① 查看当前worker进程 [rootlocalhost ~]# pstree -p | grep nginx|-nginx(5073)---nginx(8717)--nginx(8718)| -nginx(8719) [rootlocalhost ~]# ps aux | grep -v grep | grep nginx root 5073 0.0 0.1 46344 2020 ? Ss 22:33 0:00 nginx: master process /apps/nginx/sbin/nginx -c /apps/nginx/conf/nginx.conf root 8717 0.0 0.1 46220 3368 ? S 22:43 0:00 nginx: master process /apps/nginx/sbin/nginx -c /apps/nginx/conf/nginx.conf nginx 8718 0.0 0.1 48756 1992 ? S 22:43 0:00 nginx: worker process nginx 8719 0.0 0.1 48756 1992 ? S 22:43 0:00 nginx: worker process #旧的两个worker进程已关闭② 唤醒旧进程 [rootlocalhost ~]# pstree -p | grep nginx|-nginx(5073)--nginx(8717)--nginx(8718)| | -nginx(8719)| |-nginx(8786)| -nginx(8787) [rootlocalhost ~]# ps aux | grep -v grep | grep nginx root 5073 0.0 0.1 46344 2052 ? Ss 22:33 0:00 nginx: master process /apps/nginx/sbin/nginx -c /apps/nginx/conf/nginx.conf root 8717 0.0 0.1 46220 3368 ? S 22:43 0:00 nginx: master process /apps/nginx/sbin/nginx -c /apps/nginx/conf/nginx.conf nginx 8718 0.0 0.1 48756 1992 ? S 22:43 0:00 nginx: worker process nginx 8719 0.0 0.1 48756 1992 ? S 22:43 0:00 nginx: worker process nginx 8786 0.0 0.1 48856 2120 ? S 22:49 0:00 nginx: worker process nginx 8787 0.0 0.1 48856 2120 ? S 22:49 0:00 nginx: worker process #此时查旧的两个worker进程恢复 ③ 修改nginx.bak文件名回滚版本 192.168.190.102 [rootlocalhost ~]# cd /apps/nginx/sbin/ [rootlocalhost sbin]# ls nginx nginx.bak #这里的nginx版本为1.20.2nginx.bak版本为1.18.0 [rootlocalhost sbin]# mv nginx nginx.1.20.2 [rootlocalhost sbin]# mv nginx.bak nginx [rootlocalhost sbin]# systemctl start nginx192.168.190.100 [rootlocalhost ~]# curl 192.168.190.102 -I HTTP/1.1 200 OK Server: nginx/1.18.0 #已回滚至1.18.0
http://www.pierceye.com/news/575828/

相关文章:

  • 怎么做网站的优化排名wordpress的目录结构(一)
  • 个人可以做公益网站吗美食杰网站的建设目的
  • 宿迁公司企业网站建设《网站基础建设-首保》
  • 做全屏式网站尺寸是多大国外虚拟主机 两个网站
  • 黑龙江建设网站招聘广西住房和城乡建设厅培训中心官方网站
  • 做网站客户最关心的是什么制作网页原型的目的
  • 电子商务网站建设工具河南安阳吧
  • 南通网站建设公司哪个好肯德基的网站建设
  • 高端大气网站源码wordpress做双语网站
  • 360网站推广东莞凤岗
  • 公司网站高端网站建设赣州做网站多少钱
  • dw做网站怎么发布建设银行官方网站登录入口
  • 怎样查看网站建设时间免费外贸自建网站
  • 网站备案注销原因网站建设入账
  • 番禺做网站哪家好wordpress 样式引用
  • 网站研发进度表下载网站建设亿码酷适合5
  • 对网站域名销户怎么做舆情监控都有哪些内容
  • 南宁做网站优化企业网站开发合同
  • 网站做京东联盟公司注册网上核名入口
  • jsp做的零食网站下载一分钟做网站
  • 营销网站竞品分析报告上海平面网站
  • 网站建设 邦机票网站制作
  • 网站开发从整体上用vps刷网站流量要怎么做
  • 搭建一个网站 优帮云网站无法访问的原因
  • 卖印花图案设计网站北京管庄网站建设公司
  • 北京石景山网站建设外贸网络推广经验
  • 好看的网站源码手机网站在线生成
  • 响应式网站设计的主页网站定制合同
  • 做查询网站有哪些杭州市建设部门网站
  • 免费做外贸的网站制作logo网站