本文將詳細的為大家具體的介紹關于centos復制克隆改網卡,希望可以幫助到大家,一起來看看吧。
1.備份etc/udev/rules.d/70-persistent-net.rules
[root@SRD999 /]#cd etc/udev/rules.d/
[root@SRD999 rules.d]# ls
60-fprint-autosuspend.rules 70-persistent-net.rules 98-kexec.rules
60-pcmcia.rules 90-alsa.rules 99-fuse.rules
60-raw.rules 90-hal.rules
70-persistent-cd.rules 97-bluetooth-serial.rules
[root@SRD999 rules.d]# cp 70-persistent-net.rules 70-persistent-net.rules.bak
2.修改配置文件
[root@SRD999 rules.d]# vi 70-persistent-net.rules
刪掉eth0那行
將eth1改成eth0
修改前
修改后
刪掉eth0那行
將eth1改成eth0
修改etc/sysconfig/network-scripts/ifcfg-eth0 將HWADDR改成上面那個信息,就是MAC地址,并配置IP地址等信息
[root@SRD999 /]#vi etc/sysconfig/network-scripts/ifcfg-eth0
更改前
更改后
重啟網卡
[root@SRD999 /]#service network restart
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/1
[ OK ]
[root@SRD999 /]#
安裝telnet
[root@SRD999 /]#yum -y install telnet*
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.opencas.cn
* extras: mirrors.zju.edu.cn
* updates: mirrors.zju.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package telnet.x86_64 1:0.17-48.el6 will be installed
---> Package telnet-server.x86_64 1:0.17-48.el6 will be installed
--> Processing Dependency: xinetd for package: 1:telnet-server-0.17-48.el6.x86_64
--> Running transaction check
...............................................................
[root@SRD999 /]#cd etc/xinetd.d
[root@SRD999 xinetd.d]# ls
chargen-dgram daytime-stream echo-dgram tcpmux-server time-stream
chargen-stream discard-dgram echo-stream telnet
daytime-dgram discard-stream rsync time-dgram
[root@SRD999 xinetd.d]#cp telnet telnet.bak 備份
[root@SRD999 xinetd.d]# vi telnet
[root@SRD999 xinetd.d]#
將disable改成no
修改前
修改后
重啟服務
[root@SRD999 /]#service xinetd restart
Stopping xinetd: [FAILED]
Starting xinetd: [ OK ]
[root@SRD999 /]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@SRD999 /]#
開放防火墻后就可以通過telnet登錄系統(tǒng)了