Linux Is Not Matrix——repo浅解
来源:互联网 发布:vb与vs的区别 编辑:程序博客网 时间:2024/05/21 12:42
在安装jenkins的时候曾经说过要研究一下yum的配置文件,说白了就是他的软件仓库。
CentOS下,yum的配置文件可以分为两部分,去哪个地址下载软件,还有yum本身的一些配置。
我们先看看yum本身的配置文件配置了什么。
[main]cachedir=/var/cache/yum/$basearch/$releasever//软件缓存目录,就是下载的rpm文件存储的路径keepcache=0//是否保存下载的软件包,0代表不保留,1为保留debuglevel=2//Debug信息输出等级,不太懂,略过- -logfile=/var/log/yum.log//日志存放位置exactarch=1//这个设置为1之后你的linux是多少位,yum就会安装多少位的软件,obsoletes=1//这个是允许更新旧的包gpgcheck=1//检查rpm包的来源是否有效且安全plugins=1//是否启用yum-fastestmirror这个插件,从名字上来看,是用来选择最快的下载源的installonly_limit=5//允许保留的内核包个数bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yumdistroverpkg=centos-release# This is the default, if you make this bigger yum won't see if the metadata# is newer on the remote and so you'll "gain" the bandwidth of not having to# download the new metadata and "pay" for it by yum not having correct# information.# It is esp. important, to have correct metadata, for distributions like# Fedora which don't keep old packages around. If you don't like this checking# interupting your command line usage, it's much better to have something# manually check the metadata once an hour (yum-updatesd will do this).# metadata_expire=90m# PUT YOUR REPOS HERE OR IN separate files named file.repo# in /etc/yum.repos.d
大概就是这些东西,配置的全是一些yum运行时需要的参数,再来看看配置了下载地址的repo源文件。
[base]name=CentOS-$releasever - Basemirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
$releasever:代表发行版的版本,从[main]部分的distroverpkg获取,如果没有,则根据centos-release包进行判断。
$arch:cpu体系,如i686,athlon等
$basearch:cpu的基本体系组,如i686和athlon同属i386,alpha和alphaev6同属alpha
这是一个基本软件的URL配置,其他的配置都是一样的,只是下载的东西不同,其实就是个URL,yum会检测安装的centos版本,系统处理器类型(32 ro64)然后去对应的地址下载对应的软件,就这么简单。
0 0
- Linux Is Not Matrix——repo浅解
- Linux Is Not Matrix——Nginx做成linux服务
- Linux Is Not Matrix——jenkins配置主从节点
- Linux Is Not Matrix——Nginx安装
- Linux Is Not Matrix——keepalived安装
- Linux Is Not Matrix——oracle创建数据库实例
- Linux Is Not Matrix——oracle监听设置
- Linux Is Not Matrix——扩容的时间
- Linux Is Not Matrix——扩容的时间2
- Linux Is Not Matrix——zabbix安装
- Linux Is Not Matrix——zabbix添加新主机
- Linux Is Not Matrix——zabbix监控mysql
- Linux Is Not Matrix——zabbix监控JBoss
- Linux is not Matrix——redis集群搭建
- Linux is not Matrix——saltstack批量管理服务器
- Linux is not Matrix——禅道的备份
- Linux is not Matrix——mysql优化脚本
- Linux is not Matrix——MyCat实现读写分离
- 黑马程序员——Foundation框架——NSMutableArray常用方法
- Java程序员的现代RPC指南
- 客户端界面信息的提供方法、系统和客户端界面生成装置
- scrollView 嵌套listView不破坏listView的view循环
- Unity3D研究院之Android NDK编译C/C++结合Unity实现本地数据共享(二十八)
- Linux Is Not Matrix——repo浅解
- Java匿名内部类
- 加载图片的三种方式使用
- 一次诡异的日志死锁
- 黑马程序员——数据类型、printf函数与scanf函数
- James邮箱服务器账户资料迁移问题
- Linux串口驱动(8250)的编写与调试
- ExcelToLua工具
- 12月风怒(2)