LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   yum local configuration (https://www.linuxquestions.org/questions/linux-newbie-8/yum-local-configuration-896192/)

mlnm 08-08-2011 09:58 AM

yum local configuration
 
hi , i was trying to configure yum locally , can i copy files to any other location other than /var/ftp/pub.If possible please tell me how to configure yum.repos.d/rhel debuginfo file.

dafydd2277 08-08-2011 01:14 PM

Hi, mlnm,

I don't have a good idea about what you're trying to do, but yum repositories are actually very easy to set up. First, /etc/yum.repos.d/<anything>.repo will be read as a repository. I generally use base.repo, and avoid modifying the installed debug repository. Inside the repository file, entries have this form:
Code:

[Repository Label]
name=Repository Name
baseurl=file:///path/to/repository
enabled=1
gpgcheck=1
gpgkey=file:///path/to/repository/keyfile

enabled=[0|1] tells yum whether or not to reference this repository.
gpgcheck=[0|1] tells yum whether or not to verify the GPG signature of the packages in the repository.

You can copy your RPM files to any directory you wish, provided yum can read from it. Then, provide the path in the baseurl value. If you are trying to manage several hosts, consider using Apache to set up an http file server on one host. Then, you can change baseurl and gpgkey to something like:

Code:

baseurl=http://server.sub.dom.ain/path/to/repository
gpgkey=http://server.sub.dom.ain/path/to/repository/keyfile

Finally, yum requires a "repodata" directory as a sub of the file location directory. Repodata is a set of XML files (and, optionally, an sqlite database) with information on the files available in the given packages, dependencies, etc. You create the repository by doing

Code:

[root]# /path/to/repository
[root]# createrepo -d .

(Note the cwd dot at the end of the createrepo command.) This will set up the repository for yum to use.

At the end, execute

Code:

[root]# yum repolist
to verify yum can correctly interact with your new repository.

Good luck!
dafydd

John VV 08-08-2011 03:56 PM

without knowing what OS this is ???
rhel5 or 6
centos 5 or 6
SL 5 or 6
fedora 14 or 15

guessing fedora 15
if so did you read the documentation
https://docs.fedoraproject.org/en-US/index.html
that is covered
if rhel/cent/sl
https://access.redhat.com/knowledge/docs/
http://wiki.centos.org/HowTos/CreateLocalRepos


All times are GMT -5. The time now is 05:40 AM.