Centos7 minimal安装后的一些配置(解决ifconfig、vim等not found问题)

虚拟机环境:VitualBox + centos7minimal版

网络配置

配置上网网卡enp0s3

  • ip addr:查看网卡地址会发现虚拟网卡没有inet属性(ip)
  • nmcli d:网络管理命令行工具查看网卡设备状态,发现网卡未连接
  • nmtui:进入网络管理界面,编辑网卡操作如下,进行开机自动连接
Edit a connection
edit
IPv4 CONFIGURATIOPN <Automatic>
[x]Automatically connect
  • systemctl restart network.service:重启网络即可

配置和主机通信网卡enp0s8

关闭模拟器后在network settins选项中的network下,点击第二个Adapter 2后Enable Network Adapter,并且将Attached to:选择为Host-only Adapter即可

开机重启网络服务即可systemctl restart network.service

常用工具安装

  • yum -y install net-tools
  • yum -y install vim

DNS配置

  • vim /etc/resolv.con
DomainName	ip地址

参考

[1] CentOS 7 minimal 版本安装后网络配置 https://my.oschina.net/ihanfeng/blog/601853
[2] centos 7 Minimal设置网络及配置ssh https://zhuanlan.zhihu.com/p/22438350

发布了118 篇原创文章 · 获赞 14 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/github_38641765/article/details/89492624