![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Linux
Drunkenman_
这个作者很懒,什么都没留下…
展开
-
从源码分析Nginx服务器进程模型原理
首先我们来看看nginx服务器的进程模型是怎样的执行以下命令:ps -eo pid,ppid,sid,tty,pgrp,comm,cmd | grep -E 'PID|nginx'结果如图: 可以看出nginx服务器由一个master process进程与四个worker process进程组成(需要声明的是,Nginx默认情况下只会产生一个worker process进程,可以通过...原创 2019-02-22 12:56:41 · 299 阅读 · 0 评论 -
服务器框架
some原创 2019-02-20 14:38:00 · 254 阅读 · 0 评论 -
4_1_2 固定ip、dns、linux编程工具书
1_2_固定ip_dns.cppint main_4_1_1(){ /* // 修改为固定ip地址(ubuntu18之前时) ,需要时,参看 https://blog.csdn.net/qq_36937342/article/details/80876385 vim /etc/network/interfaces 原内容为: auto lo iface lo inet lo...原创 2020-05-17 23:11:40 · 84 阅读 · 0 评论 -
4_2_1 nginx编译、目录结构、搭建web服务器、nginx命令、nginx进程模型
2_1_nginx_搭建Web服务器.cppint main_4_2_1(){ /* nginx(2004年) 就是一个web服务器,还有其他功能:反向代理,负载均衡,邮件代理。 运行时需要的资源较少,所以经常被称为轻量级服务器 俄罗斯人(Igor Sysoev),纯c开发,并开源了,号称并发处理百万级别的TCP连接,非常稳定,热部署(运行时可升级),高度模块化设计,自由许可证 单机支...原创 2020-05-17 23:11:54 · 88 阅读 · 0 评论 -
4_3 nginx源码导入、session、进程组、可重入函数、信号集、守护进程
3_1_nginx源码导入.cppint main_4_3_1(){ // visual studio code 编辑器 https://code.visualstudio.com 查看nginx源码,语法高亮 // sudo dpkg -i code_1.31.1-1549938243_amd64.deb // 安装后将启动文件 /usr/share/applications...原创 2020-05-17 23:12:12 · 165 阅读 · 0 评论 -
4_5 网络通讯
5_1_tcpip.cpp#include "hjcommon.hpp"#include <stdio.h>#include <ctype.h>#include <unistd.h>#include <sys/types.h>#include <arpa/inet.h>#include <sys/socket.h&原创 2020-05-17 23:12:56 · 170 阅读 · 0 评论