网站首页 > 技术教程 正文
[root@server ~]# nginx -tV
nginx version: nginx/1.22.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:
--user=nginx 用户nginx来跑worker进程
--group=nginx 组nginx
--prefix=/usr/local/nginx 安装目录
--sbin-path=/usr/local/nginx/sbin/nginx 可执行命令目录
--conf-path=/usr/local/nginx/conf/nginx.conf 配置文件目录
--error-log-path=/usr/local/nginx/logs/error.log 错误日志目录
--http-log-path=/usr/local/nginx/logs/access.log 访问日志目录
--pid-path=/usr/local/nginx/logs/nginx.pid 进程pid文件目录
--lock-path=/var/lock/subsys/nginx 锁文件目录
--with-http_stub_status_module 状态模块
--with-http_ssl_module 加密模块
--with-http_gzip_static_module 压缩模块
--with-pcre 重定向模块
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
[root@server ~]# ps -ef |grep nginx
root 1135 1 0 14:03 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx
nginx 1136 1135 0 14:03 ? 00:00:00 nginx: worker process
nginx 1137 1135 0 14:03 ? 00:00:00 nginx: worker process
nginx 1138 1135 0 14:03 ? 00:00:00 nginx: worker process
nginx 1139 1135 0 14:03 ? 00:00:00 nginx: worker process
[root@server ~]#
在Linux系统的目录/var/run下面一般都会看到很多的*.pid文件。而且往往新安装的程序在运行后也会在/var/run目录下面产生自己的pid文件。那么这些pid文件有什么作用呢?它的内容又是什么呢?
(1) pid文件的内容:pid文件为文本文件,内容只有一行, 记录了该进程的ID。 用cat命令可以看到。
(2) pid文件的作用:防止进程启动多个副本。只有获得pid文件(固定路径固定文件名)写入权限(F_WRLCK)的进程才能正常启动并把自身的PID写入该文件中。其它同一个程序的多余进程则自动退出。
猜你喜欢
- 2024-10-09 nginx入门(三)——nginx基本指令和配置文件
- 2024-10-09 Nginx配置前后端服务(nginx前端服务器)
- 2024-10-09 Ngnix全局块的工作进程的两个指令
- 2024-10-09 Nginx常用命令(nginx常用命令有哪些)
- 2024-09-08 Ngnix服务的命令行控制(ngnix keepalive)
- 2024-09-08 Nginx入门的基本使用和配置详解(nginx使用教程)
- 2024-09-08 Nginx 面试通关秘籍-13.如何在 Nginx 中启用 gzip 压缩?配置参数?
- 2024-09-08 Nginx的rewrite之if指令(nginx index指令)
- 2024-09-08 2021年nginx最新系列之nginx配置文件详解
- 2024-09-08 Nginx——location常见配置指令,alias、root、proxy_pass
你 发表评论:
欢迎- 最近发表
-
- Win11学院:如何在Windows 11上使用WSL安装Ubuntu
- linux移植(Linux移植freemodbus)
- 独家解读:Win10预览版9879为何无法识别硬盘
- 基于Linux系统的本地Yum源搭建与配置(ISO方式、RPM方式)
- Docker镜像瘦身(docker 减小镜像大小)
- 在linux上安装ollama(linux安装locale)
- 渗透测试系统Kali推出Docker镜像(kali linux渗透测试技术详解pdf)
- Linux环境中部署Harbor私有镜像仓库
- linux之间传文件命令之Rsync傻瓜式教程
- 解决ollama在linux中安装或升级时,通过国内镜像缩短安装时长
- 标签列表
-
- 下划线是什么 (87)
- 精美网站 (58)
- qq登录界面 (90)
- nginx 命令 (82)
- nginx .http (73)
- nginx lua (70)
- nginx 重定向 (68)
- Nginx超时 (65)
- nginx 监控 (57)
- odbc (59)
- rar密码破解工具 (62)
- annotation (71)
- 红黑树 (57)
- 智力题 (62)
- php空间申请 (61)
- 按键精灵 注册码 (69)
- 软件测试报告 (59)
- ntcreatefile (64)
- 闪动文字 (56)
- guid (66)
- abap (63)
- mpeg 2 (65)
- column (63)
- dreamweaver教程 (57)
- excel行列转换 (56)
本文暂时没有评论,来添加一个吧(●'◡'●)