zoukankan      html  css  js  c++  java
  • Centos6 克隆后简单的网络配置

    第一步:修改主机名
    $ vi /etc/sysconfig/network
     
     
    第二步:
    $ vi  /etc/udev/rules.d/70-persistent-net.rules
     
    注:
    ①注释掉第一网卡驱动红色标注地方
    ②修改第二个网卡驱动name=“eth0”
     
    # PCI device 0x1022:0x2000 (pcnet32)
    #SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:ac:0c:#39", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
    # PCI device 0x1022:0x2000 (pcnet32)
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:95:4a:d3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
     
     
    第三步:
    $ vi /etc/sysconfig/network-scripts/ifcfg-eth0
    删除UUID,HWADRR
    修改 

    DEVICE=eth0
    TYPE=Ethernet
    ONBOOT=yes
    NM_CONTROLLED=yes
    BOOTPROTO=static
    DEFROUTE=yes
    PEERDNS=yes
    PEERROUTES=yes
    IPV4_FAILURE_FATAL=yes
    IPV6INIT=no
    NAME="System eth0"
    IPADDR=192.168.8.109
    GATEWAY=192.168.8.2

     
    第四步:
    $ reboot
    重启机器
     
    第五步:
    修改 /etc/hosts
     
    第六步:
    关闭防火墙,SELINUX
     

    service iptables stop
    service ip6tables stop
    chkconfig iptables off
    chkconfig ip6tables off

    vi /etc/selinux/config
    SELINUX=disabled

     
     
     
  • 相关阅读:
    C语言I博客作业07
    C语言I博客作业06
    C语言I博客作业05
    C语言I博客作业04
    C语言II博客作业04
    C语言II博客作业03
    C语言II博客作业01
    学期总结
    C语言I博客作业08
    C语言I博客作业07
  • 原文地址:https://www.cnblogs.com/mataszhang/p/6995389.html
Copyright © 2011-2022 走看看