系统相关
首页 > 系统相关> > 虚拟机安装centos

虚拟机安装centos

作者:互联网

1.修改网卡
ONBOOT=yes
BOOTPROTO=none(static)
IPADDR=192.168.119.131
NETMASK=255.255.255.0
GATEWAY=192.168.119.2
DNS1=8.8.8.8

2.添加dns
vi /etc/resolv.conf
nameserver 8.8.8.8

3.添加临时网关
netstat -rn
route add default gw 192.168.119.2

设置永久网关
cd /etc/sysconfig
touch static-routes
vi static-routes

any net default gw 192.168.119.2

重启网络服务
service network restart

标签:gw,centos,8.8,虚拟机,192.168,static,119.2,vi,安装
来源: https://blog.csdn.net/laogao2018/article/details/120429623