rhel 4/oracle linux 4/centos linux 4 配置本地yum资源库 推荐
2012-12-22 13:32
369 查看
最近在rhel4上面安装oracle 9i的时候,发现gcc没有安装,于是手动rpm去安装,报多个包的依赖,无赖啊。安装rhel5的方式,配置了yum资源库,不能使用,才发现rhel4下面没有repodata相关的文件,在rhel5后面,光盘中自带有这些目录与文件,所以我们需要手动去创建相关的文件。
repodate目录下面有以下文件:
手动创建repodate目录,需要用到createrepo这个命令,在rhel4光盘中默认是没有这个包,我们需要手动去下载,这个包我随后会上传上来。
下面是创建的过程。
1,安装createrepo包
2,手动mount光盘到目录
3,创建repodate
4,配置本地repo文件
5,yum的命令
yum命令的使用,见man yum
repodate目录下面有以下文件:
[root@i repodata]# ls -lrt total 9564 -rw-r--r-- 1 root root 951 Dec 22 04:18 repomd.xml -rw-r--r-- 1 root root 578572 Dec 22 04:18 primary.xml.gz -rw-r--r-- 1 root root 7023387 Dec 22 04:18 other.xml.gz -rw-r--r-- 1 root root 2161684 Dec 22 04:18 filelists.xml.gz
手动创建repodate目录,需要用到createrepo这个命令,在rhel4光盘中默认是没有这个包,我们需要手动去下载,这个包我随后会上传上来。
下面是创建的过程。
1,安装createrepo包
[root@i soft]# ls createrepo-0.4.6-1.el4.rf.noarch.rpm [root@i soft]# rpm -ivh *.rpm warning: createrepo-0.4.6-1.el4.rf.noarch.rpm: V3 DSA signature: NOKEY, key ID 1aa78495 Preparing... ########################################### [100%] 1:createrepo ########################################### [100%]
2,手动mount光盘到目录
[root@i ~]# mkdir /media/rhel4 [root@i ~]# mount /dev/cdrom /media/rhel4 mount: block device /dev/cdrom is write-protected, mounting read-only
3,创建repodate
[root@i ~]# cd /media [root@i media]# createrepo ./ 1871/1871 - rhel4/SRPMS/comps-4AS-0.20090520.src.rpm .x86_64.rpm6_64.rpmm Saving Primary metadata Saving file lists metadata Saving other metadata
4,配置本地repo文件
[root@i repodata]# cd /etc/yum.repos.d/ [root@i yum.repos.d]# ls [root@i yum.repos.d]# vi local.repo [rhel4.8] name=rhel4.9 baseurl=file:///media/ enabled=1 gpgcheck=0 [root@i yum.repos.d]# yum list Setting up repositories rhel4.8 100% |=========================| 951 B 00:00 Reading repository metadata in from local files primary.xml.gz 100% |=========================| 565 kB 00:00 rhel4.8 : ################################################## 1871/1871 Added 1871 new packages, deleted 0 old in 5.44 seconds Installed Packages 4Suite.x86_64 1.0-3 installed Canna-libs.i386 3.7p3-9.el4 installed FreeWnn-libs.i386 1:1.10pl020-6.el4 installed GConf2.i386 2.8.1-2.el4 installed GConf2.x86_64 2.8.1-2.el4 installed
5,yum的命令
[root@i yum.repos.d]# yum -help usage: yum [options] < update | install | info | remove | list | clean | provides | search | check-update | groupinstall | groupupdate | grouplist | groupinfo | groupremove | makecache | localinstall | erase | upgrade | whatprovides | localupdate | resolvedep | shell | deplist > options: -h, --help show this help message and exit -t, --tolerant be tolerant of errors -C run entirely from cache, don't update cache -c [config file] config file location -R [minutes] maximum command wait time -d [debug level] debugging output level -e [error level] error output level -y answer yes for all questions --version show Yum version and exit --installroot=[path] set install root --enablerepo=[repo] enable one or more repositories (wildcards allowed) --disablerepo=[repo] disable one or more repositories (wildcards allowed) --exclude=[package] exclude package(s) by name or glob --obsoletes enable obsoletes processing during updates --noplugins disable Yum plugins
yum命令的使用,见man yum
相关文章推荐
- RHEL5.3中配置本地yum详解(from RHEL5 DVD)
- rhel6.4 配置本地yum的源
- RHEL 5.4 ,配置 yum为本地源
- RHEL5通过光盘配置本地yum仓库及命令详解
- rhel 6.0 配置 yum 本地源
- rhel6.3 yum配置本地安装源
- [基础]RHEL本地yum配置
- RHEL6.4 配置本地yum的源
- VMware中RHEL7配置本地Yum仓库
- RHEL下本地yum仓库的配置方法
- rhel7.x配置本地yum
- rhel yum 本地配置
- rhel yum 安装和配置 推荐
- 配置Rhel5.8的本地yum源
- RHEL6.1配置光盘为本地yum源
- 如何在RHEL6.5中配置光盘中的数据位本地YUM源
- RHEL配置本地yum源
- RHEL5实现YUM本地挂载光盘源的配置
- rhel6.4 配置本地yum的源
- RHEL 5 ORACLE Linux 5.9 配置YUM源 5配置yum