## 查看防火墙是否开启
systemctl status firewalld
## 若没有开启则是开启状态
systemctl start firewalld ## 关闭则start改为stop
## 查看已开放的端口
firewall-cmd --zone=public --list-ports
## 开放端口
firewall-cmd --zone=public --add-port=5672/tcp --permanent # 开放5672端口
firewall-cmd --reload # 配置立即生效
## 查看监听的端口
netstat -lnpt // tcp
netstat -nupl // udp
## 查看UDP端口是否开启
nc -vuz 0.0.0.0 8899
## 杀掉端口进城
lsof -i :8080
kill -9 68932
## 检查端口被哪个进程占用
netstat -lnpt |grep 5672
## 查看进程的详细信息
ps 6832
## nginx开机启动
sudo chkconfig nginx on
## nginx检查配置文件
nignx -t
## nginx进程
ps -ef | grep nginx
## 访问localhsot
curl localhost
## nginx操作
systemctl stop nginx
systemctl start nginx
systemctl reload nginx
## 查找
find / -name mysql.sock
## 解压到指定目录
-z giz
-c 压缩
-x 解压
-u 更新压缩包中的文件
-r 向压缩包中添加文件
-v 显示过程
-f 使用档案名称
tar -zxvf /source/kernel.tgz -C /source/ linux-2.6.29
## 安装RPM
rpm -ivh mysql-community-server-8.0.15-1.el7.x86_64.rpm
面试-linux基本命令
最新推荐文章于 2024-06-09 18:09:24 发布