centos 遇到Name or service not known
1.配置nameserver
vi /etc/resolv.conf
nameserver 192.168.10.10
2.查看网卡:
nmcli d
3.修改dns
cd /etc/sysconfig/network-scripts/
vi ifcfg-ens160
DNS1= 192.168.10.10
其他配置参考网上
4. 重新启动网络服务
systemctl restart network
vi /etc/resolv.conf
nameserver 192.168.10.10
nmcli d
cd /etc/sysconfig/network-scripts/
vi ifcfg-ens160
DNS1= 192.168.10.10
其他配置参考网上
systemctl restart network