The right way to build a local yum yum source and remove the source of

Copyright: https://blog.csdn.net/zhydream77/article/details/89519055

Build yum source


[root @ xixi Desktop] # cd / iso ---- jump to the next / iso directory
[root @ xixi iso] # ls ---- what view mirror
CentOS-7-x86_64-DVD- 1708.iso rhel- the x86_64-7.4--Server DVD.iso
Lost + found Ubuntu-14.04.5-Desktop-amd64.iso
RHEL-6.7-Server-DVD.iso the x86_64-Win10_Pro_X64_zh_CN.iso
[@ xixi the root ISO] # CD / the root / Desktop - ---- Go to the desktop
[root @ xixi Desktop] # mkdir zhy ---- create a file called zhy of
[root @ xixi Desktop] # vim / etc / fstab ---- specify the / iso / CentOS- 7-x86_64-DVD-1708.iso mount the folder / root / Desktop / ZHY
/iso/CentOS-7-x86_64-DVD-1708.iso / root / Desktop / ZHY iso9660 Defaults 0 0
[root @ xixi Desktop ] # mount -a ----- mount
[root @ xix Desktop] # cd /etc/yum.repos.d/ ------ Jump to /etc/yum.repos.d/
[root @ xixi yum.repos.d] # vim zhy.repo ------ file written yum
[zhuhaiyan]
name = zhuhaiyan
baseurl = File: /// root / Desktop / zhy ---- look for a custom package under the table name to the specified directory yum
Enabled = 1
gpgcheck = 0
[root @ xixi yum.repos.d ] # yum repolist ---- see how many yum package

Delete yum source


[root @ xixi Desktop] # vim / etc / fstab ---- view mirror specified mount which
/iso/rhel-server-7.4-x86_64-dvd.iso / mnt iso9660 Defaults 0 0
/ ISO / RHEL-Server- the x86_64-DVD.iso-6.7 / var / FTP / ISO9660 Zhu Defaults 0 0
/iso/CentOS-7-x86_64-DVD-1708.iso / the root / Desktop / ISO9660 ZHY Defaults 0 0
[@ xixi the root Desktop] # umount / mnt ---- uninstall mount path
[root @ xixi Desktop] # umount / var / ftp / zhu ---- unload mount path
[root @ xixi Desktop] # umount / root / Desktop / zhy --- - uninstall mount path
[root @ xixi Desktop] # rm -rf / mnt ---- delete the mount path
[root @ xixi Desktop] # rm -rf / var / ftp / zhu / ---- delete hanging load path
[root @ xixi Desktop] # rm -rf / root / Desktop / zhy ---- delete the mount path

[root @ xixi Desktop] # vim / etc / fstab 
/iso/rhel-server-7.4-x86_64-dvd.iso / mnt iso9660 Defaults 0 0 ---- delete the row mounted path
/ iso / rhel-server- 6.7-x86_64-dvd.iso / var / ftp / zhu iso9660 defaults 0 0 ---- delete the path of the line mounted
/iso/CentOS-7-x86_64-DVD-1708.iso / root / Desktop / zhy iso9660 defaults 0 0 ---- delete the row mount path
[root @ xixi Desktop] # cd /etc/yum.repos.d/ ---- yum jump to save the file path under
[root @ xixi yum.repos .d] # ls ---- View yum repository files
zhy.repo
[root @ xixi yum.repos.d] # RM -rf zhy.repo ---- delete yum repository file
[root @ xixi yum.repos .d] # yum clean all ---- refresh yum repository file
[root @ xixi yum.repos.d] # yum repolist ---- see how many yum package

Guess you like

Origin blog.csdn.net/zhydream77/article/details/89519055
Recommended