CENTOS6 Configuring the local disc yum source, Rhel7 modify the NIC name to Eth0

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.