1. Install packet createrepo-0.4.11-3.el5.noarch.rpm, kebetulan package tersebut ada di cd4 dari Redhat Enterprise Linux 5.2.
[root@localhost ~]# rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm
2. Buat struktur directories seperti ini :
[root@localhost ~]# mkdir /DATA/repos/{cd1,cd2,cd3,cd4,cd5}
[root@localhost ~]# ls -l /DATA/repos/
total 24
drwxr-xr-x 8 root root 4096 Dec 15 17:51 cd1
drwxr-xr-x 6 root root 4096 Dec 15 17:54 cd2
drwxr-xr-x 6 root root 4096 Dec 15 17:57 cd3
drwxr-xr-x 6 root root 4096 Dec 15 18:01 cd4
drwxr-xr-x 6 root root 4096 Dec 15 18:04 cd5
3.Copy semua source dari masing-masing cd ke directory /DATA/{cd1,cd2,cd3,cd4,cd5}
4. Jalankan createrepo pada /DATA/repos/
[root@localhost ~]# createrepo /DATA/repos/
createrepo akan membuat repodata dari semua cd.
5. Kita copy template rhel-debuginfo.repo menjadi local.repo, pastikan extensionnya .repo
[root@localhost ~]# cp -va /etc/yum.repos.d/rhel-debuginfo.repo.bak /etc/yum.repos.d/local-repo.repo
6. Kemudian kita edit local.repo menjadi seperti ini :
[root@localhost yum.repos.d]#vi /etc/yum.repos.d/local-repo.repo
[local-repo-cd-based]
name=Red Hat Enterprise Linux Server cd1
baseurl=file:///DATA/repos/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
7. Kita clean cache dari repo yg pernah dibuat.
[root@localhost ~]# yum clean all
Loading "security" plugin
Loading "rhnplugin" plugin
Cleaning up Everything
8. Kemudian buat cache kembali
[root@localhost ~]# yum makecache
Loading "security" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
local-repo-cd-based 100% |=========================| 951 B 00:00
primary.xml.gz 100% |=========================| 767 kB 00:00
local-repo: ################################################## 2324/2324
filelists.xml.gz 100% |=========================| 2.5 MB 00:00
local-repo: ################################################## 2324/2324
other.xml.gz 100% |=========================| 6.1 MB 00:00
local-repo: ################################################## 2324/2324
Metadata Cache Created
9. Done... :)
references :