Clone centos and change Nic

Source: Internet
Author: User
1. Backup etc/udev/rules. d/70-persistent-net.rules [root @ SRD999/] # cdetc/udev/rules. d/[root@SRD999rules.d] # ls60-fprint-autosuspend.rules70-persistent-net.rules & nbsp

1. back up 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-rjth-serial.rules

[Root @ SRD999 rules. d] # cp 70-persistent-net.rules 70-persistent-net.rules.bak

2. modify the configuration file

[Root @ SRD999 rules. d] # vi 70-persistent-net.rules

Delete eth0

Change eth1 to eth0

Before modification

After modification

Delete eth0

Change eth1 to eth0

 

Modify etc/sysconfig/network-scripts/ifcfg-eth0 to change HWADDR to the above information, that is, the MAC address, and configure the IP address and other information

[Root @ SRD999/] # vi etc/sysconfig/network-scripts/ifcfg-eth0

Before change

After modification

Restart Nic

[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/] #

 

Install 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. bak backup

[Root @ SRD999 xinetd. d] # vi telnet

[Root @ SRD999 xinetd. d] #

Change disable to no

Before modification

After modification

Restart service

[Root @ SRD999/] # service xinetd restart

Stopping xinetd: [FAILED]

Starting xinetd: [OK]

[Root @ SRD999/] # service xinetd restart

Stopping xinetd: [OK]

Starting xinetd: [OK]

[Root @ SRD999/] #

After the firewall is enabled, you can log on to the system via telnet.

Related Article

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.