配置主机名:
# echo"vmserver" > /etc/hostname
********************************************************
静态IP配置:
# vi /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.10.202
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255
gateway 192.168.10.254
重启网络:
# /etc/init.d/networking restart
*********************************************************
DNS配置:
# echo "nameserver 202.106.0.20" > /etc/resolvconf/resolv.conf.d/base
# echo "nameserver 202.96.69.38" >> /etc/resolvconf/resolv.conf.d/base
重启resolvconf服务:
# /etc/init.d/resolvconf restart
*********************************************************
配置网桥:
# vi /etc/network/interfaces
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet static
address 192.168.10.20
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 0
重启网络:
# /etc/init.d/networking restart
*********************************************************