常用命令

  1. 查看应用是否在运行:

ps -ef | grep -i redis

  1. 查看端口是否被占用

netstat -anp | grep 3306

  1. 虚拟ip
启动:  systemctl start firewalld
查状态:systemctl status firewalld 
停止:  systemctl disable firewalld
禁用:  systemctl stop firewalld

网卡上增加一个IP:
ifconfig eth0:1 192.168.0.1 netmask 255.255.255.0

cd /etc/sysconfig/network-scripts/ 新建eth0:x文件
ifup eth0:1

删除网卡的第二个IP地址:
ip addr del 192.168.0.1 dev eth0

  1. 查看内存使用
free -h
  1. 查看硬盘容量
df -h
posted @ 2020-10-12 09:29  fight139  阅读(81)  评论(0编辑  收藏  举报