Create the directory: /var/ftp/pub/yum/*OSName*/*RELEASE*/*PATCH*/base/*ARCH*
examples:
/var/ftp/pub/yum/centos/6/6/base/i386
/var/ftp/pub/yum/centos/6/6/base/x86_64
/var/ftp/pub/yum/RHEL/7/1/base/x86_64
mkdir -p /var/ftp/pub/yum/centos/6/6/base/x86_64
Option 1: From Install CD
Required: Installation Mediacp -ar /*CDMOUNTPOINT*/Packages/* /var/ftp/pub/yum/centos/6/6/base/x86_64
cp /*CDMOUNTPOINT*/repodata/*comps*.xml /opt/yum/rhel6.3/repodata/comps.xml
Option 2: From an Internet Repo
Required: Internet ConnectionIf you do it this way, you are grabbing the latest patches from a repository on the internet.
reposync --gpgcheck -l -p /etc/yum.repos.d/redhat-rhui.repo --download_path=/var/ftp/pub/yum/RHEL/7/1/base/x86_64 --downloadcomps --download-metadata
Source: Link Link Link
Server Config
service vsftpd start*If running iptables, you will have to allow it through the firewall
cd /var/ftp/pub/yum/centos/6/6/base/x86_64
createrepo -v .
vim /etc/yum.reposb.d/custom.repo
[name]
name=Centos $releasever Base Updates 6.6
baseurl=ftp://*ip-of-the-computer*/pub/centos/6/6/base/x86_64 enable=1 gpgcheck=0 (this can be changed to 1 once the certs are installed on the system)
yum clean all
yum repolist
Your repo should now be listed
Couple of Notes:
SELinux and the firewall was turned off while doing this
Note: Some systems may require you to run yum-arch /var/ftp/pub/yum/centos
Tested In: CentOS 4.3, 6.6, RHEL 6.4 (just change version numbers above to match your version of the OS)
Troubleshooting:
No comments:
Post a Comment