- If you have the ISO burnt into a DVD, insert the DVD into the CentOS system. If the ISO is not burnt into a DVD, but present as a separate file on the file system, then skip the next two steps and go directly to step 4 in this list.
- Check if the DVD has been mounted automatically. To do this execute the following command:
mount | grep CentOSIf this command returns an output, it means the DVD has been mounted. For example, the following example output shows that the DVD has been mounted to/media/CentOS_6.4_Finalautomatically./dev/sr0 on /media/CentOS_6.4_Final type iso9660 (ro,nosuid,nodev,uhelper=udisks,uid=500,gid=500,iocharset=utf8,mode=0400,dmode=0500) - If the CD has been mounted automatically, then ignore this step. Otherwise, mount it manually.
mkdir /media/CentOS mount -t iso9660 /dev/sr0 /media/CentOS - If the ISO is present on the file system, mount it to
/media/CentOSusing themountcommand with-o loopoption.mount -o loop CentOS-6.4-x86_64-bin-DVD1.iso /media/CentOS/ - Execute:
cat /etc/yum.repos.d/CentOS-Media.repoand read the information provided as comments in this file. See the repo name within square brackets. It isc6-mediaby default. Also, see the locations specified forbaseurlproperty. These URLs point to local directories/media/CentOS,/media/cdromand/media/cdrecorder/by default. - If the DVD is mounted to a mount point specified in the
baseurlproperty, then ignore this step. Otherwise, create a symbolic link at a location specified in thebaseurlproperty with the mount point as its target. An example follows.ln -s /media/CentOS_6.4_Final /media/CentOS - In the shell, execute the
yumcommand while disabling all repos except the repo specified in/etc/yum.repos.d/CentOS-Media.repo:yum --disablerepo=\* --enablerepo=c6-media install gcc
Monday, February 2, 2015
How to yum install packages from ISO file without internet. (CentOS)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment