ifconfig
#重启网卡ifdown eth0;ifup eth0
cd /etc/sysconfig/network-scripts/
vi ifcfg-eth0
=====================
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp
=====================
挂载
mkdir -p /media/cdrom
mount /dev/sr0 /media/cdrom
cd /etc/yum.repos.d/
mkdir bak
mv *C* bak/
mv bak/*M* .
vi CentOS-Media.repo
================
改enabled=1
================
yum -y clean all
yum makecache
yum -y install gcc* make vim* autoconf readline openssh - clients rsync nmap strace ltrace sysstat
chkconfig | egrep -v "sshd|network|crond|sysstat"|awk ‘{print "chkconfig",$1 "off"}‘|bash
chkconfig --list |grep "3:on"
> /etc/udev/rules.d/70-persistent-net.rules
init 0
原文:https://www.cnblogs.com/su12/p/12392458.html