[Linux技巧]固定Vmware下CentOS的IP
1. 首先取消使用Vmware动态主机设置服务
[root@localhost ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=localhost.localdomain
GATEWAY=192.168.78.2
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
# BOOTPROTO="dhcp"
BOOTPROTO="static"
IPADDR=192.168.78.145
NETMASK=255.255.255.0
HWADDR="00:0C:29:DE:93:80"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="ba62d2e6-d078-4bb7-b8c4-d571a63ae836"
DNS1=192.168.78.2
[root@localhost ~]# cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.78.2
[root@localhost ~]#
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。