centos5.8 local mount Yum source, install package

Source: Internet
Author: User

First of all

[[email protected] media]# cd/etc/yum.repos.d/[[email protected] yum.repos.d]# lltotal 16-rw-r--r--1 root root  560 D EC 01:20 centos-media.repodrwxr-xr-x 2 root root 4096 Dec 20:03 bakdrwxr-xr-x 2 root root 4096 Jan 19:17 ncurses- Develdrwxr-xr-x 2 root root 4096 Mar 18:32 Openssl-devel[[email protected] yum.repos.d]# cat Centos-media.repo # CentOS -media.repo## this repo are used to mount the default locations for a Cdrom/dvd on#  CentOS-5.  You can use the this repo and the Yum to install items directly off the#  DVD ISO then we release.## to use this repo, put in Y Our DVDs and use it with the other repos too:#  yum--enablerepo=c5-media [command]#  # or for only the media repo, D o this:##  yum--disablerepo=\*--enablerepo=c5-media [command] [c5-media]name=centos-$releasever-mediabaseurl= File:///mnt/cdrom/gpgcheck=1enabled=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

See the baseurl=file:///mnt/cdrom/in Centos-media.repo?

If a Centos-meida source is specified, the system looks for the package that is required to install according to the path

Then create a catalog file, mount the image to that directory

[Email protected] yum.repos.d]# mkdir-p/mnt/cdrom[[email protected] yum.repos.d]# mount-o Loop/dev/cdrom/mnt/cdrom
You can then install the software you need to install:

[[email protected] yum.repos.d]# yum--disablerepo=\*--enablerepo=c5-media install xinetdloaded plugins: Fastestmirror, securityloading mirror speeds from cached hostfilesetting up Install processresolving dependencies--> R unning Transaction Check---> Package xinetd.x86_64 2:2.3.14-16.el5 set to be updated--> finished Dependency Resoluti Ondependencies resolved========================================================================================                                 =============================================================================== Package Arch Version Repository Siz e==============================================================================================================                               =========================================================INSTALLING:XINETD x86_64                      2:2.3.14-16.el5          C5-media 127 ktransaction summary================================================= =============================================================================================================== =======install 1 package (s) Upgrade 0 package (s) Total download size:127 kIs this ok [y/n]: ydownloading packag Es:running rpm_check_debugrunning Transaction testfinished Transaction testtransaction Test succeededrunning                                                                                                                                          Transaction installing:xinetd                                                                                                                                        1/1 Installed:xinetd.x86_64 2:2.3.14-16.el5 complete!  [[email protected] yum.repos.d]#


centos5.8 local mount Yum source, install package

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.