美文网首页
Docker 构建 CentOS 7.8.2003 安装ifco

Docker 构建 CentOS 7.8.2003 安装ifco

作者: 孙瑞锴 | 来源:发表于2020-06-12 15:01 被阅读0次

1. 借鉴

CentOS 7安装 ifconfig 管理命令

2. 开始

缘起

  • 直接运行ifconfig
ifconfig
  • 提示没有这个命令
bash: ifconfig: command not found
  • 没有那我们安装一下吧yum install ifconfig
yum install ifconfig
  • 又提示没有包-_-
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.bfsu.edu.cn
 * updates: mirror.bit.edu.cn
No package ifconfig available.
Error: Nothing to do
  • 好的吧,通过search命令来搜索一下
yum search ifconfig
  • 终于好像有一个匹配的了[net-tools.x86_64]
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.bfsu.edu.cn
 * updates: mirror.bit.edu.cn
================================================== Matched: ifconfig ============================================
net-tools.x86_64 : Basic networking tools

解决

  • 安装一下net-tools.x86_64
yum install net-tools.x86_64
  • 再次执行ifconfig
ifconfig
  • 发现可以了_
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.2  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:ac:11:00:02  txqueuelen 0  (Ethernet)
        RX packets 18553  bytes 26721726 (25.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8741  bytes 479526 (468.2 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
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

3. 大功告成

相关文章

网友评论

      本文标题:Docker 构建 CentOS 7.8.2003 安装ifco

      本文链接:https://www.haomeiwen.com/subject/pipgtktx.html