Welcome to my site. Please CLICK HERE to give your opinions regarding this new look of "PCTipsbyAnu". Thanks for visiting.

Monday, March 7, 2011

Browse » Home » , , , , , » How to create local YUM repository from iso?

How to create local YUM repository from iso?


With the help of this tutorial you can create your own yum repo from an any ISO...


To Create a local yum repository a separate tool createrepo is required.

To install createrepo, mount the iso and type the following commands...

# mkdir -p /mnt/repo/{1,centoscd}
# mount  -o loop /path/to/centos.iso /mnt/repo/1
# rpm -ivh /mnt/repo/1/CentOS/createrepo*.rpm
Now copy the contents from iso to /mnt/repo/centoscd
# cp -rpf /mnt/repo/1/* /mnt/repo/centoscd/
Now create the repository
# cd /mnt/repo
# createrepo .
To clean existing repo cache enter
# yum clean all
Create config file
Add the following text in /etc/yum.repos.d/localiso.repo
[My-local-repository]
baseurl=file:///mnt/repo
enabled=1
Before installing packages GPG key needs to be imported
# rpm --import /mnt/repo/centoscd/RPM-GPG-KEY-CentOS*
Now use yum command to install packages
# yum install package-name

Thanks...
You can leave a response, or trackback from your own site.

About 'Anu': My name is 'Anu' also Known as 'ANU 007 TIGER' .I'm administrator of 'PC Tips by Anu' blog .This blog was opened for sharing contents about hacking n cracking.
Thanks YAHOO OR GMAIL

0 comments:

Post a Comment

 
Back to Top