VMware linux system mounts the system installation package and sets the local yum source

VMware linux system mounts the system installation package and sets the local yum source
The method of hanging on the system installation package:
1. Click on the virtual machine, select settings, select CD/DVD, select both the device status connected and the startup connection, confirm
to the graphical interface, and the mounted system installation package icon will automatically pop up
Double-click the picture to enter Folder, right-click to open the terminal, enter pwd to see the path (need to be used below).
[root@weizhu1 CentOS_6.5_Final]# pwd
/media/CentOS_6.5_Final

2. Copy the installation package to the system directory, such as /root/Desktop
to set the mount path, mkdir -p /tmp/iso

mount -o loop -t iso9660 /root/Desktop/包名 /tmp/iso

set yum source

[root@weizhu1 Desktop]# cd /etc/yum.repos.d/ #Enter the yum source directory and create a new bak folder

[root@weizhu1 yum.repos.d]# ls #Move the original *.repo file to bak
bak myyum.repo
[root@weizhu1 yum.repos.d]# vi myyum.repo #Create a new myyum.repo file, Add some content
[myyum] #File name
name=Centos6.5 #name can be taken
at will baseurl=file:///media/CentOS_6.5_Final #Local system package path
enabled=1 #Startup file
gpgcheck=0 #0 is not checked , 1 is to check
Execute the following command to see if the execution is successful
[root@weizhu1 yum.repos.d]# yum clean all
Loaded plugins: fastestmirror, refresh-packagekit, security
Cleaning repos: myyum
Cleaning up Everything
Cleaning up list of fastest mirrors
[root @weizhu1 yum.repos.d]# yum makecache
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
myyum                                                    | 4.0 kB     00:00 ... 
myyum/group_gz                                           | 220 kB     00:00 ... 
myyum/filelists_db                                       | 5.8 MB     00:00 ... 
myyum/primary_db                                         | 4.4 MB     00:00 ... 
myyum/other_db                                           | 2.7 MB     00:00 ... 
Metadata Cache Created
安装glibc.i686包
[root@weizhu1 yum.repos.d]# yum install glibc.i868  #安装glibc.i686包

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326692360&siteId=291194637