Redhat 7/CentOS 7 (皆測試過)
ROOT only
為求設定不受NetworkManager干擾,故將其服務停止
=CentOS 6=
service NetworkManager stop
chkconfig NetworkManager off
=CentOS 7=
systemctl stop NetworkManager
systemctl disable NetworkManager
啟動network
=CentOS 6=
chkconfig network on
service network restart
=CentOS 7=
chkconfig network on
systemctl start network
1.開啟grub 設定檔
vi /etc/sysconfig/grub
2.添加指令於GRUB_CMDLINE_LINUX 裡
從
GRUB_CMDLINE_LINUX="rd.lvm.lv=rhel/swap crashkernel=auto rd.lvm.lv=rhel/root rhgb quiet "
GRUB_CMDLINE_LINUX="rd.lvm.lv=rhel/swap crashkernel=auto rd.lvm.lv=rhel/root rhgb quiet net.ifnames=0 biosdevname=0"
3.修改ens*的檔名為eth0
cd /etc/sysconfig/network-scripts/ #網路卡設定檔位置
mv ifcfg-ens192 ifcfg-eth0
4.修改eth0裡的name值為eth0
NAME=eth0
DEVICE=eth0
grub2-mkconfig -o /boot/grub2/grub.cfg
6.重啟
reboot
沒有留言:
張貼留言