What to configure when VMware installs the Centos/rhel (configure the local disc yum source, modify the NIC name to Eth0, etc.)
[Email protected] ~]# Setenforce 0
[Email protected] ~]# sed-i ' s/selinux=enforcing/selinux=disabled/'/etc/selinux/config
[Email protected] ~]# tar zcvf/root/redhat.repo.tgz/etc/yum.repos.d/*
[Email protected] ~]# rm-rf/etc/yum.repos.d/*
Below is the RHEL7 disc yum source configuration
[email protected] ~]# cat >/etc/yum.repos.d/rhel7.repo <<eof
> [Rhel7-source]
> Name=rhel-source
> baseurl=file:///mnt
> enabled=1
> gpgcheck=0
> EOF
Below is the CENTOS6 disc yum source configuration
[email protected] ~]# cat >/etc/yum.repos.d/centos6.repo <<eof
> [C6-media]
> name=centos-$releasever-media
> baseurl=file:///mnt
> gpgcheck=0
> enabled=1
> EOF
[[email protected] ~]# echo "/dev/sr0/mnt iso9660 defaults 0 0" >>/etc/fstab
[Email protected] ~]# mount-a
[email protected] ~]# Yum install net-tools-y
Ifconfig See if the network card name is eth0, if not, modify the NIC name to Eth0
① editing the network card configuration file
vi/etc/sysconfig/network-scripts/ifcfg-eno16777736
Modify the name and device as Eth0
Name= "Eth0"
Device= "Eth0"
② renaming the NIC configuration file
Mv/etc/sysconfig/network-scripts/ifcfg-eno16777736/etc/sysconfig/network-scripts/ifcfg-eth0
③ Editing Grub Files
Vi/etc/default/grub
Add net.ifnames=0 after RHGB quiet at the end of line 6th Biosdevname=0
Grub_timeout=5
Grub_distributor= "$ (SED ' s, release. *$,,g '/etc/system-release)"
Grub_default=saved
Grub_disable_submenu=true
grub_terminal_output= "Console"
grub_cmdline_linux= "Crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet net.ifnames=0 biosdevname=0"
Grub_disable_recovery= "true"
④ re-establishing the grub file
Grub2-mkconfig-o/boot/grub2/grub.cfg
⑤ do snapshots, shut down, clone.
CENTOS6 Configuring the local disc yum source, Rhel7 modify the NIC name to Eth0