1. 程式人生 > >CentOS7掛載映象為本地YUM源

CentOS7掛載映象為本地YUM源

將映象檔案拷貝至Linux檔案目錄,如/usr/local/src

mkdir  /media/centos7

mount /usr/local/src/centos7.iso  /media/centos7

rm  -rf  /etc/yum.repos.d/*

vim /etc/yum.repos.d/centos7-localsource.repo

輸入內容:

[centos7-localsource]

name=centos7

baseurl=/media/centos7

enabled=1

gpgcheck=0

儲存退出

yum makecache

yum clean all

yum  list

安裝軟體:yum -y install net-tools*