How to create a yum

2 626 0
How to create a yum

Đang tải... (xem toàn văn)

Thông tin tài liệu

How to create a yum

Create_a_Local_Yum_Repository How to create a yum repository on RHEL/CentOS 5.x with CD/DVD or ISO images.• How to create a yum repository on RHEL/CentOS 5.x with CD/DVD or ISO images o Mount your CD/DVD or ISO images  DVD Disk or DVD ISO image  CD images o Install necessary package o Create yum repository Create metadata  Define yum repository  Test it How to create a yum repository on RHEL/CentOS 5.x with CD/DVD or ISO imagesWe need several packages to create yum repository, you can install them from CD/DVD disks or ISO images.# yum install createrepo wget# cd /mnt # createrepo .Mount your CD/DVD or ISO imagesDVD Disk or DVD ISO image• If you have DVD disk, please mount dvd-rom first, and then create yum repository:# mkdir /mnt/dvd/# mount /dev/cdrom /mnt/dvd/• If you use DVD iso, please copy it to the system, and then create yum repository:# mkdir /mnt/dvd/# mount -o loop /root/rhel5.1-dvd.iso /mnt/dvdCD imagesIf you have multiple CD image files, you should mount all iso images and then create yum repository.• Mount all iso images:# mkdir -p /mnt/{1,2,3,4,5}# mount -o loop rhel5.1-disc1.iso /mnt/1# mount -o loop rhel5.1-disc2.iso /mnt/2# mount -o loop rhel5.1-disc3.iso /mnt/3# mount -o loop rhel5.1-disc4.iso /mnt/4# mount -o loop rhel5.1-disc5.iso /mnt/5Install necessary package • Find and install 'createrepo' package in /mnt directory:# find /mnt -iname 'createrepo*'/mnt/dvd/Server/createrepo-0.4.11-3.el5.noarch.rpm# rpm -ivh /mnt/dvd/Server/createrepo-0.4.11-3.el5.noarch.rpmCreate yum repositoryCreate metadata• Create yum repository:# cd /mnt/# createrepo .Define yum repositoryCreate yum repository define file /etc/yum.repos.d/dvdiso.repo:[MailRepo]name=MailRepobaseurl=file:///mnt/enabled=1gpgcheck=0Test it# yum clean all# yum listIf 'yum list' list all packages in DVD/CD disks or ISO images, it works. :) . Create_ a_ Local _Yum_ Repository How to create a yum repository on RHEL/CentOS 5.x with CD/DVD or ISO images.• How to create a yum repository on. Create yum repository  Create metadata  Define yum repository  Test it How to create a yum repository on RHEL/CentOS 5.x with CD/DVD or ISO imagesWe

Ngày đăng: 18/09/2012, 09:12

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan