|
|
◆.查看当前所有网络接口
[iyunv@localhost ~]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu65536 qdisc noqueue state UNKNOWN mode DEFAULT
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens33:<BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP modeDEFAULT qlen 1000
link/ether 00:0c:29:af:7f:07 brd ff:ff:ff:ff:ff:ff
◆更改默认名ens33为eth0
[iyunv@localhost ~]# vi /etc/default/grub
[iyunv@localhost ~]# cat /etc/default/grub
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="rd.lvm.lv=rhel/rootcrashkernel=auto rd.lvm.lv=rhel/swapvconsole.font=latarcyrheb-sun16 vconsole.keymap=us rhgb quiet net.ifnames=0 biosdevname=0"
GRUB_DISABLE_RECOVERY="true"
[iyunv@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
[iyunv@localhost ~]# cd /etc/sysconfig/network-scripts/
[iyunv@localhost network-scripts]# mv ifcfg-ens33 ifcfg-eth0
[iyunv@localhost network-scripts]# cat ifcfg-eth0
HWADDR=00:0C:29:AF:7F:07
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eth0 //更改为eth0
UUID=57a3cab0-1ba8-426a-8f3d-3a1b5c8d34fd
ONBOOT=yes
[iyunv@localhost ~]# reboot
◆关闭防火墙
[iyunv@localhost ~]# systemctl stop firewalld
[iyunv@localhost ~]# systemctl disable firewalld
◆关闭selinux
[iyunv@localhost ~]# vi /etc/sysconfig/selinux
把SELINUX=enforcing改为SELINUX=disabled
[iyunv@localhost ~]# reboot
◆配置本地yum源
[iyunv@localhost ~]# cd /etc/yum.repos.d/
[iyunv@localhost yum.repos.d]# touch local.repo
[iyunv@localhost yum.repos.d]# cat local.repo
[base]
name=Red Hat Enterprise Linux Server 7.0
baseurl=file:///media
enabled=1
gpgcheck=0
[HighAvailability]
name=Red Hat Enterprise Linux Server 7.0
baseurl=file:///media/addons/HighAvailability
enabled=1
gpgcheck=0
[ResilientStorage]
name=Red Hat Enterprise Linux Server 7.0
baseurl=file:///media/addons/ResilientStorage
enabled=1
gpgcheck=0
[iyunv@localhost ~]# mount /dev/cdrom /media/
◆安装完毕后,默认没有netstat命令,所以需要安装net-tools软件包
[iyunv@localhost ~]# yum -y install net-tools
|
|
|