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]#

此至,完成目标。

原文地址:http://blog.51cto.com/hciewd/2132095

时间: 2024-08-17 05:00:15

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

centos5.8本地挂载yum源,安装软件包

首先 [[email protected] media]# cd /etc/yum.repos.d/ [[email protected] yum.repos.d]# ll total 16 -rw-r--r-- 1 root root 560 Dec 19 01:20 CentOS-Media.repo drwxr-xr-x 2 root root 4096 Dec 18 20:03 bak drwxr-xr-x 2 root root 4096 Jan 28 19:17 ncurses-de

挂载系统光盘作为本地的yum源

问题:不小心删除了lvm这个包,,郁闷,系统启动失败,怎么办? 思路:没有本地yum源服务器的话,通过挂载DVD作为本地的yum源来安装lvm,然后重启即可. 系统启动时,进入修复模式,重新挂载/分区: # mount -o remount,rw / 挂载dvd到/media目录下 # mount /dev/scd0 /media mount: block device /dev/sr0 is write-protected, mounting read-only 建立一个repo文件: # c

CentOS 6.* 配置本地网络 yum源

CentOS 6.* 配置本地网络yum源 一台服务时只需要配一个本地的yum源即可:当需要配置多台服务器时,只需要配置1到2台vsftpd的yum源,其它服务器通过ftp连接yum源: 1 基于本地文件的yum源 1.1 下载镜像源 wget -b https://mirrors.aliyun.com/centos/6.10/isos/x86_64/CentOS-6.10-x86_64-bin-DVD1.iso tail -100f wget-log 1.2 挂载iso镜像文件 ll /mnt

RHEL 7.0 本地配置yum源

RHEL 7.0 本地配置yum源  yum简介  yum = Yellow dog Updater, Modified 主要功能是更方便的添加/删除/更新RPM包. 它能自动解决包的倚赖性问题. 它能便于管理大量系统的更新问题 当前linux版本 rhel7.0 前提mount DVD光盘到/mnt   因为配置时候路径名里面不能有空格,否则不能识别 首先设置IP地址.网关DNS 说明:RHEL 7.0默认安装好之后是没有自动开启网络连接的! cd  /etc/sysconfig/networ

本地搭建yum源方法【二】

1. 搭建本地光盘YUM源 [[email protected] ~]# mkdir /mnt/cdrom/  ------>创建光盘挂载目录 [[email protected] ~]# mount /dev/cdrom /mnt/cdrom/  -------->挂在光盘 [[email protected] ~]# cd /etc/yum.repos.d/    -------->切换到YUM配置目录 [[email protected] yum.repos.d]# tar czf

linux:网络yum源和制作本地光盘yum源

linux:存放yum源的位置:/etc/yum.repos.d/,该目录下全是一些yum源 一.网络yum源: 如图:下面全部都是yum源,后缀是".repo"都是合法的yum源,默认的是启动的CentOS-Base.repo这个yum源(网络yum源) [[email protected] yum.repos.d]# ls -l total 28 -rw-r--r--. 1 root root 1664 Dec 9 2015 CentOS-Base.repo --- 网络yum源

centos6配置本地光盘yum源、rhel7修改网卡名称为eth0

VMware安装好centos/rhel后要配置的几点(配置本地光盘yum源.修改网卡名称为eth0等) [[email protected] ~]# setenforce 0 [[email protected] ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config [[email protected] ~]# tar zcvf /root/redhat.repo.tgz /etc/yum.repos.d/

Linux 加阿里yum源

阿里 yum 源设置 阿里云Linux安装镜像源地址:http://mirrors.aliyun.com/CentOS系统更换软件安装源 第一步:备份你的原镜像文件,以免出错后可以恢复.mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 第二步:下载新的CentOS-Base.repo 到/etc/yum.repos.d/ curl -O /etc/yum.repos.d/CentOS-Bas

centos6系列更换阿里yum源

1.首先备份原来的cent os官方yum源 cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak 2.获取阿里的yum源覆盖本地官方yum源 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo 3.清理yum缓存,并生成新的缓存 yum clean all yum makecac