Linux virtual machine yum install local software

When deploying the environment, the system prompts that gcc is missing, and gcc needs to be installed, because the intranet cannot be installed on the Internet and can only be installed using the ISO file of the operating system;

First, you need to mount; mount /dev/cdrom /media/cdrom Among them, /media/cdrom is the directory after mounting.

Step 2: Configure yum local source;

            1. Create a new local source configuration file redhat.repo in the /etc/yum.repos.d path, the file suffix must be of type repo

             2. Write
              [redhat-mylocal] //yum ID in the file redhat.repo , unique locally, used to distinguish different yum sources
              name=redhatmyrepo //description information
                baseurl=file:///media/cdrom/ //front The file:// is the protocol, and the following /mnt is the CD mount point.
                 gpgcheck=0 //1 uses the public key to verify the correctness of the rpm package, 0 does not verify
                 enabled=1 //1 enables the yum source, 0 disables the yum source

Step 3: Clear the source information 

              yum clean all

              yum makecache

Step 4: Now start to install some of the required dependent software (some dependent packages can be found in the ISO file of the operating system)

                yum install gcc

Guess you like

Origin blog.csdn.net/u014179640/article/details/109095497