1.移除yum
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2.重新安装yum
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3.安装tree
yum install tree
4.输入两次y之后,安装成功
5.检验安装是否成功
tree /home/