直接控制台输入下面的命令,等待安装完毕即可!
yum -y install tree
示例:
[root@localhost ~]# yum -y install tree
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
mysql-connectors-community | 2.6 kB 00:00:00
mysql-tools-community | 2.6 kB 00:00:00
mysql57-community | 2.6 kB 00:00:00
updates | 2.9 kB 00:00:00
updates/7/x86_64/primary_db | 11 MB 00:00:03
正在解决依赖关系
--> 正在检查事务
---> 软件包 tree.x86_64.0.1.6.0-10.el7 将被 安装
--> 解决依赖关系完成
依赖关系解决
======================================================================================
Package 架构 版本 源 大小
======================================================================================
正在安装:
tree x86_64 1.6.0-10.el7 base 46 k
事务概要
======================================================================================
安装 1 软件包
总下载量:46 k
安装大小:87 k
Downloading packages:
警告:/var/cache/yum/x86_64/7/base/packages/tree-1.6.0-10.el7.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY
tree-1.6.0-10.el7.x86_64.rpm 的公钥尚未安装
tree-1.6.0-10.el7.x86_64.rpm | 46 kB 00:00:14
从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 检索密钥
导入 GPG key 0xF4A80EB5:
用户ID : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
指纹 : 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
软件包 : centos-release-7-9.2009.0.el7.centos.x86_64 (@anaconda)
来自 : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : tree-1.6.0-10.el7.x86_64 1/1
验证中 : tree-1.6.0-10.el7.x86_64 1/1
已安装:
tree.x86_64 0:1.6.0-10.el7
完毕!
[root@localhost ~]# cd /opt
[root@localhost opt]# tree
.
├── a.txt
├── rh
└── text
├── a.txt
├── b.txt
└── c.txt
2 directories, 4 files
[root@localhost opt]#