centOS7常用命令

纵饮孤独 提交于 2019-12-05 10:58:00

转载: https://www.cnblogs.com/yjd_hycf_space/p/7730690.html

https://blog.csdn.net/weixin_43758377/article/details/100695566

查看端口占用情况:

netstat -ant

验证某个端口号(8080)是否被占用

netstat -tunlp|grep 8080

查看所有监听端口号

netstat -lntp

删除所有包含gitlab的文件及目录

find / -name gitlab | xargs rm -rf

find / -name *gitlab* | xargs rm -rf

springboot程序后台启动: 

nohup java -jar xx.jar &

查看日志文件:

#查看最后600行日志:

tail -n 600 nohup.out

#查看实时日志

tail -f nohup.out

给xxx.sh 文件开放所有权限(可读可写可执行)转载: https://www.cnblogs.com/Caiyundo/p/10413449.html [sh某文件出现错误Permission denied]

chmod 777 xxx.sh

防火墙相关: 转载: https://www.cnblogs.com/huiandong/p/9973786.html

1、firewalld的基本使用
启动: systemctl start firewalld
关闭: systemctl stop firewalld
查看状态: systemctl status firewalld 
开机禁用  : systemctl disable firewalld
开机启用  : systemctl enable firewalld
systemctl start redis.service #启动redis服务
systemctl enable redis.service #设置开机自启动
systemctl disable redis.service #停止开机自启动
systemctl status redis.service #查看服务当前状态
systemctl restart redis.service  #重新启动服务
systemctl list-units --type=service #查看所有已启动的服务
 

还有很多忘记了,以后补充...

好记性,不如烂笔头

每一个不曾起舞的日子,都是对自己的辜负!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!