Welcome 微信登录

首页 / 操作系统 / Linux / Oracle Enterprise Linux 6.0配置本地yum

我安装的linux系统是Oracle Linux,其全称为Oracle Enterprise Linux。电驴下载:ed2k://|file|%5BOracle%E5%8F%91%E5%B8%83%E7%9A%84Linux%E7%B3%BB%E7%BB%9F6.0%EF%BC%88%E5%9F%BA%E4%BA%8ERedHat.Enterprise.Linux.6.0%EF%BC%89%5D.OracleLinux-R6-U0-Server-i386-dvd.iso|2829869056|5045d12786a016cd9225038d787f9b44|h=h2ikrphsn6q7ggoeuifoac7pzu3movkq|/
下面的方法是我自己实验成功了的。1.创建一个存放iso镜像或光盘内容的目录[root@hanxi-workstation hanxi]# mkdir /home/hanxi/yum并从光盘介质或iso镜像文件中的所有文件拷贝到刚创建的目录里(/home/hanxi/yum)。如果是光盘可以使用命令:[root@hanxi-workstation hanxi]# cp -r  /media/cdrom  /home/hanxi/yumps:/media/cdrom是mount光驱的目录。我用的是iso镜像文件,我就直接使用鼠标把文件复制到 /home/hanxi/yumps:注意是iso文件里的所有文件,不是iso文件。复制完成后是这个样的,如下图2.安装createrepocreaterepo是配置YUM源的配置工具,检查当前是否已经安装createrepo包的安装情况:[root@hanxi-workstation hanxi]# rpm  -qa |grep  createrepo  如果显示为尚未安装,则需要执行如下的命令完成安装:[root@hanxi-workstation hanxi]# rpm  -ivh  /home/hanxi/yum/Packages/createrepo-0.9.8-4.el6.noarch.rpmps:版本因操作系统的版本有所区别,请查找当前系统的createrepo版本rpm包进行安装,可以到/home/hanxi/yum/Packages/文件夹下查找,如下图:3.创建yum repository的xml-rpm-metadata执行如下命令:[root@hanxi-workstation hanxi]# createrepo  -g  /home/hanxi/yum/Server/repodata/repomd.xml  /home/hanxi/yum/Server/[root@hanxi-workstation hanxi]# createrepo  -g  /home/hanxi/yum/HighAvailability/repodata/repomd.xml  /home/hanxi/yum/HighAvailability/[root@hanxi-workstation hanxi]# createrepo  -g  /home/hanxi/yum/LoadBalancer/repodata/repomd.xml  /home/hanxi/yum/LoadBalancer/[root@hanxi-workstation hanxi]# createrepo  -g  /home/hanxi/yum/ResilientStorage/repodata/repomd.xml  /home/hanxi/yum/ResilientStorage/ps:上面每条命令可能都有段处理时间,注意要等待,如下图:执行createrepo命令后系统会自动扫描相关目录,将rpm包加入到YUM源的数据库中。
  • 1
  • 2
  • 下一页
Valgrind--Linux下的内存调试和代码解剖工具openSUSE安装8192无线网卡驱动相关资讯      Linux教程  Oracle Enterprise Linux 
  • Linux教程:如何在命令行中查看目  (07/28/2014 12:22:23)
  • Linux 修改root密码  (11/03/2012 07:53:38)
  • su - root 与su root的区别  (06/06/2012 00:39:40)
  • Linux进程间通信:消息队列  (01/28/2013 09:43:00)
  • U盘安装Linux开机无法启动解决方法  (10/07/2012 08:55:52)
  • Windows 7/Linux 同步时间  (05/15/2012 06:17:55)
本文评论 查看全部评论 (0)
表情: 姓名: 字数