目录
【Linux基础入门】
创建虚拟机,centos6.8和centos7.6各两台,并且配置好 yum仓库,可以安装tree命令
centos6.8
[root@localhost tmp]# cd /etc/yum.repos.d [root@localhost yum.repos.d]# mkdir bak [root@localhost yum.repos.d]# mv C* bak [root@localhost yum.repos.d]# vi yum.repo [root@localhost yum.repos.d]# mount /dev/sr0 /media/ mount: block device /dev/sr0 is write-protected, mounting read-only [root@localhost yum.repos.d]# yum clean all Loaded plugins: fastestmirror Cleaning repos: base Cleaning up Everything [root@localhost yum.repos.d]# yum makecache Loaded plugins: fastestmirror Determining fastest mirrors base | 4.0 kB 00:00 ... base/group_gz | 226 kB 00:00 ... base/filelists_db | 6.3 MB 00:00 ... base/primary_db | 4.7 MB 00:00 ... base/other_db | 2.8 MB 00:00 ... yumMetadata Cache Created [root@localhost yum.repos.d]# yum install mlocate -y Loaded plugins: fastestmirror Setting up Install Process Loading mirror speeds from cached hostfile Resolving Dependencies --> Running transaction check ---> Package mlocate.x86_64 0:0.22.2-6.el6 will be installed --> Finished Dependency Resolution
Dependencies Resolved
=================================================================================
Package Arch Version Repository Size
Installing: mlocate x86_64 0.22.2-6.el6 base 86 k
Transaction Summary
Install 1 Package(s)