Steps by step as followed:
Make a directory rhel5 inside the /var/ftp/pub
# cd /var/ftp/pub
# mkdir rhel5
Mount the RHEL DVD and Moved all files to this Directory /var/ftp/pub/rhel5
# mkdir /mnt/cdrom
# mount -t iso9660 -o ro /dev/cdrom /mnt/cdrom
# cp -rvfp /mnt/cdrom/Server/ rhel5
4. Installed createrepo RPM
# rpm -ivh createrepo
5. Executed this command
# cd /rhel5/Server/
# createrepo -v .
6. Create a myown.repo file at the /etc/yum.repos.d/
# vi /etc/yum.repos.d/myown.repo
[localinfo]
name=MyOwnRepo
baseurl=file:///pub/rhel5/Server/
enabled=1
gpgcheck=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
:wq
Clean the cache and list all the rpms from the yum server
# yum clean all
# yum list
0 comments:
Post a Comment