CentOS Configuration local Yum source

Source: Internet
Author: User

methods for configuring local yum sources1. Mount Mirror configuration with optical drive1. 1 first put the CD in the CD-ROM drive, if this time drive has been mounted please use the Umount command first umount the optical drive off1. 2 Create the relevant directory, creating the Local.repo file [[email protected]~]#mkdir/mnt/Yum/[[Email protected]~]#Mount/dev/hdc/mnt/Yum[[Email protected]~]#VI/etc/Yum. repos.d/Local.repo #添加以下内容 [Iso]name=centos-$releasever-Isobaseurl=file:///Mnt/yumgpgcheck=0enabled=1   1.3view the configured yum source [[email protected]~]#YumClean all [[email protected]~]#Yumrepolistloaded plugins:fastestmirror, securityloading mirror speeds from cached HostfilerepoIDRepo Name Statusiso CentOS-5-ISO2,791repolist:2,791[[Email protected]~]#Yumlist Loaded Plugins:rhnplugin, security this system was not a registered with the portal.  Portal support would be disabled. Base|1.3Kbxx:xxBase/primary #################################### so the Yum warehouse is built. 2Create a Yum repository with a local file directory2. 1 Insert the disc into the optical driveMount/DEV/HDC/MNT [[email protected]~]#Mount/dev/hdc/mnt/Mount: Block DEVICE/DEV/HDC isWrite-protected, mounting read-Only Note: The directory where the yum source is stored must have writable permissions, or it will be createrepo. 2. 2 Copy the disc file to the Yum directory [email protected]~]#Umount/dev/HDC [[email protected]~]#Mount/dev/hdc/mnt/Mount: Block DEVICE/DEV/HDC isWrite-protected, mounting read-only [[email protected]~]#Mount/DEV/SDA1 on/type ext3 (rw) proc on/proc type proc (rw) Sysfs on/sys type SYSFS (rw) devpts on/dev/pts type devpts (rw,gid=5, mode=620)  /dev/sda2 on/Home type ext3 (rw) TMPFS on/dev/SHM type TMPFS (rw) None on/proc/sys/fs/Binfmt_misc type Binfmt_misc (rw) sunrpc on/var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)/DEV/HDC on/mnt type iso9660 (RO) [[email protected]~]# cd/mnt/[email protected] mnt]#ls-LDserver/Dr-xr-xr-x3Root root217088  to- +  to: Oneserver/2.2Copy Server directory [[email protected] mnt]#CP-R server//Yum/2. 3 installing Createrepo [[email protected]~]# CD/Yum/server/[email protected] server]# rpm-IVH createrepo-0.4. One-3. el5.noarch.rpm Warning:createrepo-0.4. One-3. El5.noarch.rpm:Header V3 DSA Signature:nokey, key ID37017186Preparing ... ########################################### [ -%] Package Createrepo-0.4. One-3. El5.noarch is installed2. 4 Creating a local source # Createrepo-G/Yum/server/repodata/comps-rhel5-server-core.xml/Yum/Server [[email protected]~]#VI/etc/Yum. repos.d/Local.repo [Base] name=Local BaseURL=file:///Yum/servergpgcheck=0enabled=1[[Email protected]~]#Yumlist Loaded Plugins:rhnplugin, security this system was not a registered with the portal.  Portal support would be disabled. Base|1.3Kbxx:xxBase/primary #################################### to build Vt,cluster,clusterstorage Yu in the same way M source to note baseurl after the file:///"three slashes"

CentOS Configuration local Yum source

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.