配置信息
- 虚拟机 : VirtualBox
- 终端 : FinalShell
- 镜像 : Centos7-x86_64-Minimal
- 内存 : 2GB
- 存储 : 30GB
显示IP信息
ifconfig
command not found
ip addr
enp0s3
但是此时并没有显示IP信息
vi /etc/sysconfig/network-scripts/ifcfg-xx
ONBOOT=yes
service network restart
再查看 ip addr
安装net-tools
yum install net-tools
现在 ifconfig
替换默认源
修改网络设置
- 关闭虚拟机
- 打开设置
- 选择网络
- 由NAT改为桥接
- 重启虚拟机
此时可以看到IP信息改变了,用终端工具进行连接
替换源
网易源地址及安装教程
具体步骤
yum install wget
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
yum clean all
yum makecache
安装vim
yum install vim