Set local dir as yum repo

新装的RH52,装软件的时候想用yum解决依赖关系,看帮助没找到zypper里面的ar,只好去改配置文件。

按着/etc/yum.repos.d下的一个.repo文件改了一下,其实也简单,只需要提供名字,baseurl,就差不多了,文件如下:

$ cat local.repo
[local repo]
name=Repository on lldev
baseurl=file:///XXX/YYY/ZZZ
enabled=1
gpgcheck=0

需要注意的是那个baseurl下需要有一个目录叫repodata,里面要有个文件repomd.xml,这样才能被yum认出,我用的是光盘目录下的Server目录。比较不爽的是这个baseurl只支持http/https/ftp/file,想用nfs啥的都没门,只好mount了~

This entry was posted in 小企鹅Linux and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>