CentOS7如何建立本地阿里yum源,并安装htop文件?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS7如何建立本地阿里yum源,并安装htop文件?相关的知识,希望对你有一定的参考价值。

版本centos 7.0
1、[[email protected] yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak 将原文件备案
2、建立本地源
[[email protected] 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
[[email protected] yum.repos.d]#
3、查找源中是否有htop
[[email protected] yum.repos.d]# yum list all htop
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Available Packages
htop.x86_64 2.2.0-1.el7 Fedora-EPEL
4、安装
[[email protected] yum.repos.d]# yum install htop.x86_64 安装
Loaded plugins: fastestmirror, langpacks
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!
[[email protected] yum.repos.d]#

此至,完成目标。

以上是关于CentOS7如何建立本地阿里yum源,并安装htop文件?的主要内容,如果未能解决你的问题,请参考以下文章

centos7yum安装的yum源怎么配置

centos7 怎么配置yum 163的源

centos7 怎么配置yum 163的源

centos7yum安装的yum源怎么配置

CentOS7搭建本地YUM仓库,并定期同步阿里云源

centos 7 常用yum源配置