ITPub博客

首页 > Linux操作系统 > Linux操作系统 > yum配置

yum配置

原创 Linux操作系统 作者:longer3281 时间:2013-12-31 13:34:06 0 删除 编辑
1 安装 createrepo-0.4.11-3.el5.noarch.rpm
#rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm

2 创建yum数据库
#createrepo /yum/server

3 修改 /etc/yum.conf 
gpgcheck=0 //本地一般不需要设置该选项
installonly_limit = 5

4 编辑 CentOS-Base.repo,设置rpm安装包 源库位置
[base]
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=file:///yum/server
enabled=1 --其他没用选项应设置为0

5 启动验证
#yum clean all

6 检查yum组件配置
#yum repolist all
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
repo id                                                                                       repo name                                                                                                status
addons                                                                                       CentOS-5 - Addons                                                                                    disabled
base                                                                                          CentOS-5 - Base                                                                                         enabled: 3,392
c5-media                                                                                    CentOS-5 - Media                                                                                       disabled
centosplus                                                                                  CentOS-5 - Plus                                                                                          disabled
contrib                                                                                       CentOS-5 - Contrib                                                                                      disabled
extras                                                                                        CentOS-5 - Extras                                                                                        disabled
updates                                                                                     CentOS-5 - Updates                                                                                       enabled: 3,392
repolist: 6,784









来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9606353/viewspace-1065968/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: Linux 加载
下一篇: MySQL触发器
请登录后发表评论 登录
全部评论
数据库架构师,DB从业经历 DB2,Oracle,MySQL,PGSQL,MonogDB 等数据库,hadoop,hive,spark,flink,doris等大数据技术。

注册时间:2009-05-22

  • 博文量
    69
  • 访问量
    185393