Thursday 19 March 2009

Yum Ftp only repository

I need to update servers but do not want to permit server to access internet via http, I created repository below which requires only ftp access.
Only "mirror.fraunhofer.de" is permitting ftp access so I use this server. Probably you can find other distros under same server. I go for CentOS here.
you have to use this command to update and install packages
yum --disableplugin=fastestmirror --disablerepo=\* --enablerepo=alteredbase install yum-fastestmirror
yum --disableplugin=fastestmirror --disablerepo=\* --enablerepo=alteredupdates update


create file /etc/yum.repos.d/x.repo with content below
[alteredbase]
name=CentOS-$releasever - Base
baseurl=ftp://mirror.fraunhofer.de/centos.org/5.2/os/x86_64/
gpgcheck=1
gpgkey=ftp://mirror.fraunhofer.de/centos.org/RPM-GPG-KEY-CentOS-5

[alteredupdates]
name=CentOS-$releasever - Updates
baseurl=ftp://mirror.fraunhofer.de/centos.org/5.2/updates/x86_64/
gpgcheck=1
gpgkey=ftp://mirror.fraunhofer.de/centos.org/RPM-GPG-KEY-CentOS-5

[alteredaddons]
name=CentOS-$releasever - Addons
baseurl=ftp://mirror.fraunhofer.de/centos.org/5.2/addons/x86_64/
gpgcheck=1
gpgkey=ftp://mirror.fraunhofer.de/centos.org/RPM-GPG-KEY-CentOS-5

[alteredextras]
name=CentOS-$releasever - Extras
baseurl=ftp://mirror.fraunhofer.de/centos.org/5.2/extras/x86_64/
gpgcheck=1
gpgkey=ftp://mirror.fraunhofer.de/centos.org/RPM-GPG-KEY-CentOS-5

[alteredcentosplus]
name=CentOS-$releasever - Plus
baseurl=ftp://mirror.fraunhofer.de/centos.org/5.2/centosplus/x86_64/
gpgcheck=1
enabled=0
gpgkey=ftp://mirror.fraunhofer.de/centos.org/RPM-GPG-KEY-CentOS-5

No comments: