本文将详细的为大家具体的介绍关于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登录系统了
新闻热点
疑难解答
图片精选