Monday, December 16, 2013

Install Packages via yum using CentOS Media repo

when need to install new packages using yum, you can use either online repo or dvd repo. If there is no internet connection, possible solution is DVD repo. Here is simple way to configure DVD repo on Centos.

1) View Centos media repo file.

Since I use Centos 6.3 it is similar to following.you can use either less or cat command to view the file content. Some  lines are removed due to brevity

less /etc/yum.repos.d/CentOS-Media.repo
[c6-media]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS/
        file:///media/cdrom/
        file:///media/cdrecorder/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6


give more attention to following parameters
repo name -> c6-media
baseurl -> there is 3 file paths, those are the mount point of Centos DVD. you can customize it.




2) Create mount point if not exist

since this is demo, I create DVD mount location as first base URL. possible use any location which is defined in baseurl.
[root@localhost ~]# mkdir /media/CentOS


3) mount centos cdrom

mount /dev/cdrom /media/CentOS/

4)Install your package using yum

yum --disablerepo=\* --enablerepo=[repo name] install [pakage name]

ex:-
yum --disablerepo=\* --enablerepo=c6-media install cpan

if this is not working, you may need to clean repo using following command
[root@localhost ~]# yum clean all

9 comments:

  1. Please click to play,if you wanna join casino online. Thank you
    จีคลับ
    gclub online
    gclub casino

    ReplyDelete
  2. This blog has left its gathering of spectators completely charmed.
    brian holm lawyer san diego

    ReplyDelete
  3. sbobet, sbobet asia, sbothai, sbobet888, บอลออนไลน์, ทางเข้า sbobet, sbobet mobile, แทงบอล, แทงบอลออนไลน์, พนันบอล, สโบเบ็ต.
    thank you so much for the information
    sbobet.fyi
    sbobet fyi
    ทางเข้า sbobet
    sbobet
    sbothai
    sbobet asia

    ReplyDelete
  4. Thanks! Finally figured out how to use media repo properly !

    ReplyDelete
  5. Firstly we would like to thank you before commenting your marvelous and very useful blog. If you love to do betting then cm2bet.com is the place you are looking for. Visit here online sports betting Singapore

    ReplyDelete
  6. Very informative and It was an awesome post...... PaperScan Pro Crack

    ReplyDelete
  7. This comment has been removed by a blog administrator.

    ReplyDelete

Related Posts