问题:ifconfig命令无效命令
解决方法:
需要安装net-tools
使用命令yum -y install net-tools安装,net-tools工具里带有ifconfig命令。
在安装net-tools时有可能会报错:can not find a valid baseurl for repo: base/7/x86-64
需要使用命令修改vi /etc/sysconfig/network-scripts/ifcfg-eth0文件 。备注,有的系统ifcfg-eth0 可能叫做其他名字,看具体情况定
systemctl restart network
再次执行yum -y install net-tools就可以成功了