Centos7_mini初体验

2018-10-26  本文已影响13人  我的袜子都是洞

方法一

1、打开 vi /etc/sysconfig/network-scripts/ifcfg-eth0(每个机子都可能不一样,但格式会是“ifcfg-eth数字”),把ONBOOT=no,改为ONBOOT=yes

2、重启网络:service network restart

方法二

1、打开 vi /etc/resolv.conf,增加nameserver 8.8.8.8

2、重启网络: service network restart

注意:

若提示
you need to be root to perform this command
表示没有root权限,需要在命令前加sudo即可。

步骤二、

输入ifconfig,提示命令不存在,
yum -y install net-tools
安装即可。

上一篇 下一篇

猜你喜欢

热点阅读