相关文章: 3. Hadoop集群搭建-NAT/桥接网络配置-基于CentOS7-【连载中】
前言
解决方法1:
说明
之前在其他笔者博客中找到过其中的问题,有说明是profile
配置文件问题,但经测试无用。
正文
- 命令的路径没有在PATH环境变量中。
解决方法:
手动的去添加环境变量。
[推荐] 解决方法2:
说明:
没有安装ifconfig
等命令,运行ifconfig
命令就会出错。
解决方法
- 输入:
[root@localhost ~]# yum search ifconfig
- 出现如下信息:
[root@localhost ~]# yum search ifconfig
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
======================================================= 匹配:ifconfig ========================================================
net-tools.x86_64 : Basic networking tools
说明已经查找到ifconfig
此应用在networking tools
包中,我们只需要安装此包即可使用。
安装:
[root@localhost ~]# yum install net-tools.x86_64
等待下载并安装完成即可。
再次输入ifconfig
查看:
[root@localhost ~]# ifconfig
eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.38.141 netmask 255.255.255.0 broadcast 192.168.38.255
inet6 fe80::20c:29ff:feba:fafc prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:ba:fa:fc txqueuelen 1000 (Ethernet)
RX packets 44511 bytes 13328312 (12.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4099 bytes 292774 (285.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 4 bytes 348 (348.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4 bytes 348 (348.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0