CentOS7如何建立本地阿裏yum源,並安裝htop文件?
1、[root@localhost yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak 將原文件備案
2、建立本地源
[root@localhost yum.repos.d]# cat CentOS-Local.repo
[Fedora-EPEL]
name=Fedora EPEL for EL7
baseurl=https://mirrors.aliyun.com/epel/7/x86_64/ //說明,在此之前我去阿裏雲上已經找到了htop所在的目錄。
gpgcheck=0
[root@localhost yum.repos.d]#
3、查找源中是否有htop
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Available Packages
htop.x86_64 2.2.0-1.el7 Fedora-EPEL
4、安裝
[root@localhost yum.repos.d]# yum install htop.x86_64 安裝
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package htop.x86_64 0:2.2.0-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================================================
Package Arch Version Repository Size
Installing:
htop x86_64 2.2.0-1.el7 Fedora-EPEL 103 k
Transaction Summary
Install 1 Package
Total download size: 103 k
Installed size: 218 k
Is this ok [y/d/N]: y
Downloading packages:
htop-2.2.0-1.el7.x86_64.rpm | 103 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : htop-2.2.0-1.el7.x86_64 1/1
Verifying : htop-2.2.0-1.el7.x86_64 1/1
Installed:
htop.x86_64 0:2.2.0-1.el7
Complete!
[root@localhost yum.repos.d]#
此至,完成目標。
CentOS7如何建立本地阿裏yum源,並安裝htop文件?