LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Making Yum work with Remote Repository (https://www.linuxquestions.org/questions/linux-newbie-8/making-yum-work-with-remote-repository-758423/)

your_shadow03 09-29-2009 05:44 AM

Making Yum work with Remote Repository
 
I have a Fedora 9 Machine and All I want is yum to install packages automatically through one of teh remote repository.
Whenever I do :
Code:


wget ftp://130.239.17.6/fedora/releases/9/Fedora/i386/os/Packages/*.rpm

It works fine. But What I want is My Machine should automatically retrieve the package from this Repo whenever I run
Code:

#yum install maven
Under /etc/ I can see lots of yum stuffs .
like yum, yum.repos.d and yum.conf.
I tried adding a line like this:
Code:

[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800
installonly_limit=2
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
baseurl=ftp://130.239.17.6/fedora/releases/9/Fedora/i386/os/Packages/
enabled=1
gpgcheck=0

But That dint work.

Do I need to make any modification in yum.repos.d and yum directory too.
Pls Suggest?

kbp 09-29-2009 08:13 AM

Hi,

Its better to just create a file in /etc/yum.repos.d as follows:

Code:

cat << 'EOF' > /etc/yum.repos.d/myfedora.repo
[myfedora]
name=My Fedora $releasever - $basearch
baseurl=ftp://130.239.17.6/fedora/releases/$releasever/Fedora/$basearch/os/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
EOF

If you're mirroring the official Fedora repo you should probably enable gpgcheck

No need to modify /etc/yum.conf

cheers,

kbp

chrism01 09-29-2009 08:47 PM

Just FYI, F9 is no longer supported or updated and the archives will go away soon. Can I suggest you get eg F11 or any other current distro of your choice.
If you want long term updates & are happy with RH style systems, try Centos.

your_shadow03 09-30-2009 12:01 AM

I got this error:

Code:

[root@Innova yum.repos.d]# yum update
ftp://130.239.17.6/fedora/releases/9/Fedora/i386/os/Packages/repodata/repomd.xml: [Errno 4] IOError: [Errno ftp error] 550 Failed to change directory.
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: extras. Please verify its path and try again

I deleted rest of Reposiotryunder /etc/yum.repos.d/
Pls Suggest


All times are GMT -5. The time now is 02:22 AM.