Centos无法上网

首先安装Centos7在VMware中,安装完成后发现不能上网;

第一:必须在VMware配置网络是NAT转换,然后将笔记本网络网卡共享到VMware的网卡上

第二:在windows服务中开启这两个服务程序VMware DHCP Service 启动,还有VMware NAT service 等其他服务都打开!

第三:然后再去配置Centos中的网络,Centos中的网络大概找的位置是这样:

CD /etc/sysconfig/network-scripts/

然后在用VI vim 等编辑软件将你的网络配置文件打开!然后一般正常的配置如下:

HWADDR=00:0C:29:E1:23:C6
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=ens33
UUID=0caef81c-b16d-4571-9a05-ee8700f266e3
ONBOOT=yes

然后你对应的将网络服务重新启动

server network restart

如果还是不行,那就是linux内部服务有问题,依次输入下面的代码

systemctl start NetworkManager.service
systemctl enable NetworkManager.service
systemctl enable network.service
systemctl start network.service
yum install iptables-services
systemctl mask firewalld.service
systemctl enable iptables.service
systemctl enable ip6tables.service
systemctl start firewalld.service
systemctl start iptables.service
systemctl start ip6tables.service

然后再重新启动网络设置,这样Centos就可以上网了

相关文章

Centos下搭建性能监控Spotlight
CentOS 6.3下Strongswan搭建IPSec VPN
在CentOS6.5上安装Skype与QQ
阿里云基于centos6.5主机VPN配置
CentOS 6.3下配置multipah
CentOS安装、配置APR和tomcat-native