linux nginx命令 查找目录和重启
#查看nginx进程
[root@LinuxServer]$ps -aux | grep nginx
root 3229 0.0 0.0 112812 972 pts/0 S+ 16:50 0:00 grep --color=auto nginx
root 15919 1.5 0.4 122856 68888 ? S Mar07 290:44 nginx: worker process
root 15920 0.7 0.4 123320 68932 ? S Mar07 134:04 nginx: worker process
root 15921 0.9 0.4 123320 68840 ? S Mar07 176:46 nginx: worker process
root 15922 2.9 0.4 125924 71920 ? S Mar07 548:55 nginx: worker process
root 20544 0.0 0.2 96184 37844 ? Ss 2021 0:01 nginx: master process nginx
#测试Nginx配置文件,可以看到nginx配置文件位置
[root@LinuxServer /]$nginx -t
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@LinuxServer sbin]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
[root@LinuxServer sbin]# /usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf
#停止
从容停止
[root@LinuxServer ~]# kill -QUIT 2072
#快速停止
[root@LinuxServer ~]# kill -TERM 2132
或 [root@LinuxServer ~]# kill -INT 2132
#强制停止
[root@LinuxServer ~]# pkill -9 nginx
#重启
#进入nginx可执行目录sbin下,输入命令./nginx -s reload
[root@LinuxServer sbin]$pwd
/usr/local/nginx/sbin
[root@LinuxServer sbin]$ll
total 9232
-rwxr-xr-x 1 root root 9451008 Dec 3 2018 nginx
nginx -s reload
#方法2 查找当前nginx进程号,然后输入命令:kill -HUP 进程号 实现重启nginx服务
linux nginx命令 查找目录和重启的更多相关文章
- [转帖]linux tree命令--显示目录的树形结构
linux tree命令--显示目录的树形结构 版权声明:iamqilei@qq.com https://blog.csdn.net/u011729865/article/details/533 ...
- Linux find命令忽略目录的查找方法
在Linux操作系统中,find命令非常强大,在文件与目录的查找方面可谓无所不至其极,如果能结合xargs命令使得,更是强大无比. 以下来看看find命令忽略目录查找的用法吧. 例1,根据文件属性查找 ...
- linux find 命令查找文件和文件夹
查找目录:find /(查找范围) -name '查找关键字' -type d查找文件:find /(查找范围) -name 查找关键字 -print 详解: find命令用来在指定目录下查找文件.任 ...
- Linux系统下/tmp目录文件重启后自动删除,不重启自动删除10天前的/TMP的文件(转)
/tmp目录文件重启后自动删除现在知道有ubuntu和solaris系统source:http://blog.chinaunix.net/uid-26212859-id-3567875.html经常会 ...
- Linux常用命令 查找文件
Linux搜索命令:find / -name 'nginx' 搜索根目录下文件名为‘nginx’的文件夹 .find / -name 'nginx.conf' 搜索根目录下文件名为‘nginx.co ...
- linux通过命令查找大文件
一:如果linux根分区使用量达到100%,会造成如下现象: root不能登录 系统不能正常启动 二:通过命令查找根分区内的大文件 1.du -sh /* 2>/dev/null | sort ...
- Linux常用命令,目录解析,思维导图
文章目录 下载地址 Linux常用命令 linux系统常用快捷键及符号命令 Linux常用Shell命令 Linux系统目录解析 Shell Vi全文本编辑器 Linux安装软件 Linux脚本编制编 ...
- find命令查找目录
find <path> -type d -name "dir_name" -type d是查找目录的参数,如果是查找其他的: -type b: Block specia ...
- linux下命令运行目录上程序前面要加./
linux命令行上默认运行path系统变量的路径的程序,所以我们在运行时命令时会在系统变量中查找,而发现查找完系统变量之后是不会再查找当前目录的. 有以下方式解决: 1.在运行当前目录的程序时,前面加 ...
- linux常用命令之--目录与文件的操作命令
1.linux的目录与文件的增.删.改.复制 pwd:用于显示当前所在的目录 ls:用于显示指定目录下的内容 其命令格式如下: ls [-option] [file] 常用参数: -l:显示文件和目录 ...
随机推荐
- 重温设计模式之 Factory
简介: 创建型模式的核心干将,工厂.简单工厂.抽象工厂,还记得清么,一文回顾和对比下. 作者 | 弥高来源 | 阿里技术公众号 前言 创建型模式的核心干将,工厂.简单工厂.抽象工厂,还记得清么,一文回 ...
- HarmonyOS 实战开发-Worker子线程中解压文件
介绍 本示例介绍在Worker子线程使用@ohos.zlib提供的zlib.decompressfile接口对沙箱目录中的压缩文件进行解压操作,解压成功后将解压路径返回主线程,获取解压文件列表. 效果 ...
- WPF 已知问题 资源字典树引用与资源寻找的坑
大家都知道,在 WPF 里面,可以让资源字典合并其他资源字典,从而定义出资源字典引用树.然而在资源字典引用树里面,如果没有理清关系,将可以作出一个超级复杂的引用关系网.如果在性能优化中,将网断开部分, ...
- Django之ORM操作Mysql
一.单表操作 # 单表查询操作基本方法 class BookList(models.Model): title = models.CharField(max_length=32) price = mo ...
- vue应用el-tabel封装
<template> <div class="table"> <el-table :data="tableList" style= ...
- FFmpeg开发笔记(二十)Linux环境给FFmpeg集成AVS3解码器
AVS3是中国AVS工作组制定的第三代音视频编解码技术标准,也是全球首个已推出的面向8K及5G产业应用的视频编码标准.AVS工作组于2019年3月9日完成第三代AVS视频标准(AVS3)基准档次的制 ...
- UnityShader数学基础篇
Mathf Mathf和Math 1.Math是C#中封装好的用于数学计算的工具类,位于System命名空间中. 2.Mathf是Unity中封装好的用于数学计算的工具结构体,位于UnityEngin ...
- selenium 滚动截图参考
Selenium本身并不直接支持滚动截图,但是你可以通过编程方式实现滚动截图.下面是一个Python的例子,使用Selenium和PIL库实现滚动截图: from selenium import we ...
- StackExchange.Redis跑起来,为什么这么溜?
StackExchange.Redis 是一个高性能的 Redis 客户端库,主要用于 .NET 环境下与 Redis 服务器进行通信,大名鼎鼎的stackoverflow 网站就使用它.它使用异步编 ...
- Django——前后端分离出现同源策略的解决方式
浏览器控制台报错:"Access-Control-Allow-Origin" 解决方式:在Django服务端解决 1.安装django-cors-headers(可能需要先更新pi ...