惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
S
SegmentFault 最新的问题
MyScale Blog
MyScale Blog
有赞技术团队
有赞技术团队
V
Visual Studio Blog
T
The Blog of Author Tim Ferriss
爱范儿
爱范儿
Vercel News
Vercel News
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Y
Y Combinator Blog
Blog — PlanetScale
Blog — PlanetScale
D
DataBreaches.Net
美团技术团队
Microsoft Security Blog
Microsoft Security Blog
大猫的无限游戏
大猫的无限游戏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
酷 壳 – CoolShell
酷 壳 – CoolShell
GbyAI
GbyAI
A
About on SuperTechFans
云风的 BLOG
云风的 BLOG
The Cloudflare Blog
宝玉的分享
宝玉的分享
V
V2EX
Microsoft Azure Blog
Microsoft Azure Blog

博客园 - MvloveYouForever

添加gitignore mac安装小龙虾 flutter重新学习 uniapp简单移动端H5电脑端适配方案 添加ssh后,ssh-rsa fatal: Could not read git合并提交 cordova打印插件备注 H5开发类似rpx实现方法 maven仓库地址 idea与其他软件激活办法 Command line is too long mysql安装教程备份 mybatis-plus 条件参数说明 关于打包electron应用 关于spring unicloud短信不能用 关于mybatis 关于maven vue2 和 vue3的区别 父子组件v-modle,vue2和vue3的区别 Vue3知识点
linux常用命令总结
MvloveYouForever · 2024-09-30 · via 博客园 - MvloveYouForever

1、查看端口占用情况

lsof -i:8019
netstat -tunlp|grep 8019

2、查看nginx进程,及配置文件位置

ps -ef | grep nginx

# 根据查到的nginx位置 查询配置文件位置

/usr/sbin/nginx -t

3、利用配置文件启动nginx

nginx -c /usr/local/nginx/conf/nginx.conf

4、重启nginx

# 重启服务:
service nginx restart

# 快速停止或关闭nginx
nginx -s stop

# 正常停止nginx
nginx -s quit


#配置文件修改重装载命令:
nginx -s reload



# 查看进程号
ps -ef|grep nginx
# 杀死进程
kill -QUIT 2072

# 强制停止
pkill -9 nginx
1、验证nginx配置文件是否正确
方法一:进入nginx安装目录sbin下,输入命令./nginx -t
看到如下显示nginx.conf syntax is ok
nginx.conf test is successful
说明配置文件正确!

2、重启Nginx服务
方法一:进入nginx可执行目录sbin下,输入命令
./nginx -s reload 即可
方法二:查找当前nginx进程号,然后输入命令:
kill -HUP
进程号 实现重启nginx服务