1. disabling predictable naming rules
# Vim/etc/default/grub
Add two sentences: net.ifnames=0 biosdevname=0
Grub_timeout=5
Grub_default=saved
Grub_disable_submenu=true
grub_terminal_output= "Console"
grub_cmdline_linux= "Rd.lvm.lv=centos/root rd.lvm.lv=centos/swap net.ifnames=0 biosdevname=0 rhgb quiet"
Grub_disable_recovery= "true"
# grub2-mkconfig-o/boot/grub2/grub.cfg
Generating GRUB configuration file ...
Found Linux Image:/boot/vmlinuz-3.10.0-229.el7.x86_64
Found initrd Image:/boot/initramfs-3.10.0-229.el7.x86_64.img
Found Linux Image:/boot/vmlinuz-0-rescue-a8ecfd39a4014521ae54ccef4ada1c67
Found initrd Image:/boot/initramfs-0-rescue-a8ecfd39a4014521ae54ccef4ada1c67.img
Done
2. Modify the NIC configuration file
# cd/etc/sysconfig/network-scripts/
# MV Ifcfg-enoxxxxxx Ifcfg-eth0
3. Modify the name of the device
# Vim/etc/udev/rules.d/70-persistent-ipoib.rules
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:e0:17:54", attr{type}== "1", kernel== "eth*", name= "eth0"
4, restart the system can
Mv/etc/yum.repos.d/centos-base.repo/etc/yum.repos.d/centos-base.repo.backup
Wget-o/etc/yum.repos.d/centos-base.repo Http://mirrors.aliyun.com/repo/Centos-7.repo
Yum Clean All
Yum Makecache
Systemctl Action Service name.
Yum-y Install Net-tools
CentOS 7.0 defaults to using firewall as the firewall, where the iptables firewall is changed.
Firewall
Systemctl Start firewalld.service# Startup firewall
Systemctl Stop firewalld.service# stops firewall
Systemctl Disable firewalld.service# disable firewall boot boot
Modify the NIC name in CENTOS7/RHEL7