Introduction to the
In the VirtualBox VM CentOS system, mount an ISO image as the source repository for software installation
The installation
- Start the centos8 system
- After startup, click Settings, Storage and see if controller: IDE has a disk. If not, add your own ISO. If not, first shut down Centos8 normally, then click “Settings” [Storage] [Controller: IDE] to add an empty disk and occupy a space. Then start Centos8 normally, click Settings [Storage] [Controller: IDE], this time you can add one.
-
After the addition is complete, go to the Linux system at this time, check the /dev directory, there is a Cdrom, this is dvD.iso
-
Mount and check whether the mount is successful
Mkdir /media/cdrom # create a directory mount -o loop /dev/cdrom /media/cdrom # If there is content, the mount is successfulCopy the code
- In /etc/yum.rebo. d/, create your own local_centos.repo, which is the local source
[local_centos8] name = local_centos8 baseurl = # file:///media/cdrom/BaseOS note here, some of the package is in a different position, need to point to the directory is different also, Enabled =1 gpgCheck =1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-8 # local_centos8_app Name = local_centos8_app baseurl = # file:///media/cdrom/AppStream note here, some of the package is in a different position, need to point to the directory is different also, Gpgcheck =1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-8Copy the code
- restart
yum clean all
Copy the code
- use
Yum -config-manager --disable * # disable all sources yum-config-manager --enable * # enable all sources # yum info HTTPD [root@centos7 yum. Repos. D]# yum info HTTPD Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Available Packages Name : httpd Arch : X86_64 Version: 2.4.6 Release: 17.el7.centos.1 Size: 2.7m Repo: local_centos8 # Apache HTTP Server URL: http://httpd.apache.org/ License: ASL 2.0 Description: The Apache HTTP Server is a powerful, efficient, and extensible : web server.Copy the code