起因: 搭建IMAX6环境遇到一个license错误问题 各种检查license都找不到问题,后来发现hostID为空 使用ifconfig确认网络情况
发现没有eth0,而是ens33,怀疑是因此导致license不能正确验证。 使用dmesg | grep -in eth检查开机信息中有没有eth0的消息
发现由interface eth0改为了ens33
* * *更改网卡的名字 – 由ens33改为eth0 方法一: sudo vi/etc/default/grub
修改grub中的GRUB_CMDLINE_LINUX,追加语句” net.ifnames=0 biosdevname=0 “。 然后 (Ubuntu执行)sudo grub-mkconfig -o /boot/grub/grub.cfg (CentOs执行)然后执行# grub2-mkconfig -o /boot/grub2/grub.cfg 最后重启reboot就可以了。
方法二: 网上最多的是修改/etc/udev/rules.d/70-persistent-net.rules文件的方式,我在16.04的Ubuntu版本下没有找到/etc/udev/rules.d/70-persistent-net.rules文件,所有没有用这个办法。但是可以贴出来,如果你电脑里有该文件,遇到同样问题可以试试。> (这个方法的参考链接http://www.linuxidc.com/Linux/2013-01/78427.htm) 找到70-persistent-net.rules文件,删除重启。 sudo rm /etc/udev/rules.d/70-persistent-net.rules
Hello, of cokurse this post is actually good and I have learned lot of things from it on the topic of blogging.
thanks.
Having read this I thought it was extremely enlightening.
I appreciate you spending some time and energy to put this informative article together.
I once again find myself personally spending a lot of time both reading and commenting.
But so what, it was still worth it!
帮助非常大,感谢!!!!