CentOS7联网初始化步骤教程
程序员文章站
2022-05-21 08:13:27
1. 显示网络设备的运行状态
[root@ruijie ~]$ ip link
2. 显示网络接口的网络参数
[root@ruijie ~]$ ip addr
3. 修改网卡信...
1. 显示网络设备的运行状态
[root@ruijie ~]$ ip link
2. 显示网络接口的网络参数
[root@ruijie ~]$ ip addr
3. 修改网卡信息–ONBOOT
[root@ruijie ~]$ vi /etc/sysconfig/network-scripts/ifcfg-eth0 ONBOOT=yes
4. 重启网络服务
[root@ruijie ~]$ systemctl restart network
5. 检测网络连通性
[root@ruijie ~]$ ping 114.114.114.114 -c 3 PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data. 64 bytes from 114.114.114.114: icmp_seq=1 ttl=67 time=1.55 ms 64 bytes from 114.114.114.114: icmp_seq=2 ttl=70 time=1.47 ms 64 bytes from 114.114.114.114: icmp_seq=3 ttl=65 time=1.54 ms --- 114.114.114.114 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 1.472/1.522/1.554/0.057 ms
6. 显示网络接口的网络参数-查看当前IP
[root@ruijie ~]$ ip addr
7. 修改网卡信息–IP
[root@ruijie ~]$ vi /etc/sysconfig/network-scripts/ifcfg-eth0 IPADDR=XXX.XXX.XXX.XXX NETMASK=255.255.255.0 GATEWAY=XXX.XXX.XXX.1
8. 重启网络服务
[root@ruijie ~]$ systemctl restart network
9. 再次检测网络连通性
[root@ruijie ~]$ ping 114.114.114.114 -c 3 PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data. 64 bytes from 114.114.114.114: icmp_seq=1 ttl=67 time=1.55 ms 64 bytes from 114.114.114.114: icmp_seq=2 ttl=70 time=1.47 ms 64 bytes from 114.114.114.114: icmp_seq=3 ttl=65 time=1.54 ms --- 114.114.114.114 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 1.472/1.522/1.554/0.057 ms
10. 检测域名解析
[root@ruijie ~]$ ping baidu.com ping: unknown host baidu.com
11. 配置域名解析
[root@ruijie ~]$ vi /etc/resolv.conf nameserver 114.114.114.114 nameserver 8.8.8.8
12. 再次检测域名解析
[root@ruijie ~]$ ping baidu.com -c 3 PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data. 64 bytes from 114.114.114.114: icmp_seq=1 ttl=67 time=1.55 ms 64 bytes from 114.114.114.114: icmp_seq=2 ttl=70 time=1.47 ms 64 bytes from 114.114.114.114: icmp_seq=3 ttl=65 time=1.54 ms --- 114.114.114.114 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 1.472/1.522/1.554/0.057 ms
13. OK!!!
上一篇: 配置Web应用环境实现JSP留言簿
下一篇: 一个求最大值与最小值的函数
推荐阅读
-
Corel Painter 2019中文已激活破解版安装教程+防火墙阻止联网步骤(附下载)
-
Corel Painter 2019中文已激活破解版安装教程+防火墙阻止联网步骤(附下载)
-
centOS7安装mysql8.0完美教程!!只要按照步骤,无脑操作,一次成功!
-
Centos7安装MySQL5.7 的简单步骤教程
-
CentOS7联网初始化步骤教程
-
CentOS7 64位 环境使用rpm命令安装gcc(步骤教程)
-
CentOS7下安装配置Oracle的操作步骤教程
-
CentOS7系统安装Mysql5.7版本的步骤教程
-
Centos7安装MySQL5.7 的简单步骤教程
-
centOS7安装mysql8.0完美教程!!只要按照步骤,无脑操作,一次成功!