1、修改网卡


删除eth0的那两行,然后将eth1修改为eth0
vi /etc/udev/rules.d/70-persistent-net.rules

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:94:5b:b9", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

修改对应的HWADDR和IP
vi /etc/sysconfig/network-scripts/ifcfg-eth0
<code>
DEVICE=eth0
HWADDR=00:0c:29:94:5b:b9
TYPE=Ethernet
UUID=6c3cc0ae-100f-45b7-8a9b-ea6d267d95f7
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.1.196
GATEWAY=192.168.1.1
NETMASK=255.255.255.0
</code>

reboot

2、修改主机名
vi /etc/sysconfig/network
 
sysctl kernel.hostname=ndb-sql2

芒果牛奶
1 声望0 粉丝

运维背锅之路


下一篇 »
CORS