User Tools

Site Tools


eduardo:linux:yum

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
eduardo:linux:yum [2014/11/17 09:12] eduardoeduardo:linux:yum [2024/02/23 08:20] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Yum ======
 +YUM is the package management tool that help to install or update the package through the network or local, the same time it provides easy method to install a package with it’s dependent packages. Configuration files are under /etc directory, /etc/yum.conf is the mail global file that contains the global options such as cache directory,log directory etc… To add new or update the existing repository, you must got to the /etc/repos.d directory and create or open a file that ends on .repo respectively.
 +
 +===== CDROM/DVD =====
 +
 +First you must determine the name of the CD-ROM or DVD drive and there are 3 methods:
 +
 +**[a] dmesg Command**
 +
 +dmesg command is used to examine the Linux kernel ring buffer i.e. display bootup messages on screen. To find out if cdrom was detected or not, run:
 +
 +<code>
 +bash# dmesg | egrep -i --color 'cdrom|dvd|cd/rw|writer'
 +
 +ata2.00: ATAPI: VMware Virtual IDE CDROM Drive, 00000001, max UDMA/33
 +sr0: scsi3-mmc drive: 1x/1x writer dvd-ram cd/rw xa/form2 cdda tray
 +</code>
 +
 +**[b] /proc/sys/dev/cdrom/info file name.**
 +
 +<code>
 +bash# cat /proc/sys/dev/cdrom/info
 +
 +CD-ROM information, Id: cdrom.c 3.20 2003/12/17
 +
 +drive name:             sr0
 +drive speed:            1
 +drive # of slots:       1
 +Can close tray:         1
 +Can open tray:          1
 +Can lock tray:          1
 +Can change speed:       1
 +Can select disk:        0
 +Can read multisession:  1
 +Can read MCN:           1
 +Reports media changed:  1
 +Can play audio:         1
 +Can write CD-R:         1
 +Can write CD-RW:        1
 +Can read DVD:           1
 +Can write DVD-R:        1
 +Can write DVD-RAM:      1
 +Can read MRW:           1
 +Can write MRW:          1
 +Can write RAM:          1
 +
 +bash#
 +</code>
 +
 +**[c] lsblk command**
 +
 +<code>
 +bash# lsblk
 +
 +NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
 +sda      8:0    1   558G  0 disk
 +├─sda1   8:   1   307M  0 part /boot
 +├─sda2   8:   1   250G  0 part /datasql
 +├─sda3   8:   1     6G  0 part [SWAP]
 +├─sda4   8:   1     1K  0 part
 +└─sda5   8:   1 301.7G  0 part /
 +sr0     11:   1  1024M  0 rom  
 +
 +</code>
 +
 +===== Mount CDROM/DVD =====
 +
 +Insert the Red Hat Enterprise Linux Server DVD into your DVD-ROM drive and mount the CD/DVD ROM on the any directory of your wish, for testing mount it on /mnt/cdrom.
 +
 +<code>
 +bash# mkdir /mnt/cdrom
 +
 +bash# mount /dev/sr0 /mnt/cdrom
 +</code>
 +
 +===== Config Repository =====
 +
 +Create a new repository file.
 +
 +<code>
 +bash# vi /etc/yum.repos.d/rhel-dvd.repo
 +
 +[dvd]
 +name=DVD Repo
 +baseurl=file:///mnt/cdrom
 +enabled=1
 +gpgcheck=1
 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
 +</code>
 +
 +===== Install from CDROM/DVD =====
 +
 +Now you should be able to install from CDROM or DVD
 +
 +<code>
 +bash# yum install <packages>
 +</code>