当前位置:   article > 正文

CentOS 7 配置静态IP_centos7中localhost.localdomain

centos7中localhost.localdomain

安装net-tool插件

输入ifconfig:

-bash:ifconfig :command not found
  • 1

原因:现在安装的linux版本里没有这家伙,装一个就是了。

解决方式:yum -y install net-tools

安装文本编辑工具

yum -y install vim*

设置静态ip

先查看虚拟机分配的动态ip("192.168.2.112"就是动态IP)

[root@localhost ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.112  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::2ed1:83ff:5cd7:7937  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:ba:d1:73  txqueuelen 1000  (Ethernet)
        RX packets 33790  bytes 48349632 (46.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 15169  bytes 1356861 (1.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/867322
推荐阅读
相关标签
  

闽ICP备14008679号