Linux学习笔记-yum源安装

来源:互联网 发布:mac xcode 玩游戏 编辑:程序博客网 时间:2024/06/06 18:04

Linux学习笔记-yum源安装

关于yum源安装的过程解析

1.yum源:

Linux系统里用来安装软件。

2.安装过程

(1)进入超级用户

//切换用户

su

(2)进入安装yum源的文件目录下

[root@server1 ~]# cd /etc/yum.repos.d/

(3)创建yum源配置文件,注意问文件的后缀,".repo"

[root@server1 yum.repos.d]# vim a.repo //编辑器 

(4)往配置文件里面写配置内容,路径要写镜像的路径

[test]

name=test

baseurl=file:///var/www/html/rhel7.0

gpgcheck=0

(5)写完配置文件,保存退出,进行检查是否安装好

[root@server1 yum.repos.d]# yum repolist//检查是否配置好yum源

出现如下:

Loaded plugins: product-id, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

repo id                   repo name                                       status

HighAvailability          Instructor HighAvailability Repository             56

LoadBalancer              Instructor LoadBalancer Repository                  4

ResilientStorage          Instructor ResilientStorage Repository             62

ScalableFileSystem        Instructor ScalableFileSystem Repository            7

base                      Instructor Server Repository                    3,690

repolist: 3,819

(6)此列出现数字大约几千:epolist: 3,819,就是yum源已经安装好了,如果为0,则没安装好,检查配置文件,再更改和检查