Setup Local Yum Repository on CentOS / RHEL / Scientific Linux 6.4
2013-10-08 14:06
[root@server Packages]# rpm -ivh libxml2-python-2.7.6-8.el6_3.4.i686.rpm
[root@server Packages]# rpm -ivh deltarpm-3.5-0.5.20090913git.el6.i686.rpm
[root@server Packages]# rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.i686.rpm
[root@server Packages]# rpm -ivh createrepo-0.9.9-17.el6.noarch.rpm
[root@server ~]# createrepo -v /var/ftp/pub/localrepo/
Server Side Configuration
Once you copied all the files, create a repository file called “localrepo.repo” under /etc/yum.repos.d/ directory and add the following lines into the file. You can name this file as your liking:
[root@server ~]# vi /etc/yum.repos.d/localrepo.repo
[localrepo]
name=Unixmen Repository
baseurl=file:///var/ftp/pub/localrepo
gpgcheck=0
enabled=1
Client Side Configuration
Now go to your client systems. Create a new repository file as shown above under /etc/yum.repos.d/ directory and add the following contents:
[root@client ~]# vi /etc/yum.repos.d/localrepo
[localrepo]
name=Unixmen Repository
baseurl:ftp://192.168.1.200/pub/localrepo
gpgcheck=0
enabled=1