Yum from the mount CD or ISO installation basic tutorial

  
 

yum installation is very convenient, but if RedHat is not registered or the host is disconnected, it cannot be installed online. It can only be used as a local yum source by means of ISO or CD-ROM. This article only summarizes the usage of RedHat6 and CentOS6 systems. In a virtual machine environment or other version system, the path and name in some commands below may need to be modified, such as the CD-ROM path and ISO image name.

First, make a CD ISO

1, insert a CD

Ensure that the CD-ROM is available.

2, execute copy command

mkdir /repo/iso

cp /dev/cdrom /repo/iso/rhel-6.0-x86_64-dvd.iso

Assuming the generated ISO name is rhel-6.0-x86_64-dvd.iso, please modify it if the version is different, the same below.

Second, mount CD ISO

1, such as using optical drive

mount /dev/cdrom /media/

2, if using ISO

# mount -t iso9660 -o loop /repo/iso/rhel-6.0-x86_64-dvd.iso /media/

Three, configure repo resource pool

1, if Is RedHat

vi /etc/yum.repos.d/install_dvd.repo

Contents are as follows:

  • [base]
  • name= Installation DVD
  • baseurl=file:///media/Server
  • enable=1
  • gpcheck=1
  • gpgkey=file:///media /RPM-GPG-KEY-redhat-release

    2, if it is CentOS

    first need to back up the original resource pool file:

    mv /etc/yum. Repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

    Modify the resource pool file again:

    vi /etc/yum.repos The .d/CentOS-Base.repo

    content is as follows:

  • [base]
  • name=CentOS-$releasever - Media
  • baseurl =file:///media/CentOS/
  • gpgcheck=1
  • enabled=0
  • gpgkey=file:///etc/pki/rpm-gpg/RPM -GPG-KEY-beta

    Four, execute yum Install

    Desktop environment:

    # system-config-packages

    Command line:

    # yum install mysql mysql-server mysql-devel< Br>

    V. Uninstall ISO

    umount /media/

    If the above is not mount to /media, the corresponding modification can be.

  • Copyright © Windows knowledge All Rights Reserved