1. 程式人生 > >虛擬機無法訪問外網如何搭建yum源

虛擬機無法訪問外網如何搭建yum源

yum 源搭建

1.掛載磁盤:

[[email protected] ~]# cat /etc/fstab | tail -1

/dev/cdrom /mnt iso9660 loop,defaults 0 0

[[email protected] ~]# mount –a

[[email protected] ~]# df -h | tail -1

/dev/sr0 4.2G 4.2G 0 100% /mnt

2.搭建:

[[email protected] ~]# cat/etc/yum.repos.d/CentOS-6.repo

[local-yum]

name=CentOS-loal

baseurl=file:///mnt

gpgcheck=0

enabled=1

[[email protected] ~]# yum clean all

[[email protected] ~]# yum repolist


本文出自 “一葉劍客” 博客,謝絕轉載!

虛擬機無法訪問外網如何搭建yum源