您好,登錄后才能下訂單哦!
本篇內(nèi)容主要講解“Linux系統(tǒng)配置本地yum源的方法”,感興趣的朋友不妨來(lái)看看。本文介紹的方法操作簡(jiǎn)單快捷,實(shí)用性強(qiáng)。下面就讓小編來(lái)帶大家學(xué)習(xí)“Linux系統(tǒng)配置本地yum源的方法”吧!
準(zhǔn)備:
系統(tǒng):Centos 6.5
工具:Centos 6.5的系統(tǒng)鏡像文件
[root@local ~]# ls CentOS-6.5-x86_64-bin-DVD1.iso
[root@local ~]# mkdir /media/cd [root@local ~]# mount -o loop /root/CentOS-6.5-x86_64-bin-DVD1.iso /media/cd [root@local ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 41G 4.8G 35G 13% / tmpfs 932M 228K 932M 1% /dev/shm /dev/sda1 504M 45M 434M 10% /boot /dev/sr0 4.2G 4.2G 0 100% /media/cd
ps :centos系統(tǒng)在此目錄下有多個(gè)yum的配置文件,本地yum配置只留下一個(gè)即可。
[root@local ~]# cd /etc/yum.repos.d/ [root@local yum.repos.d]# ls CentOS-Media.repo [root@local yum.repos.d]# cat CentOS-Media.repo # CentOS-Media.repo # # This repo can be used with mounted DVD media, verify the mount point for # CentOS-6. You can use this repo and yum to install items directly off the # DVD ISO that we release. # # To use this repo, put in your DVD and use it with the other repos too: # yum --enablerepo=c6-media [command] # # or for ONLY the media repo, do this: # # yum --disablerepo=\* --enablerepo=c6-media [command] [c6-media] name=CentOS-$releasever - Media baseurl=file:///media/CentOS_6.5_Final/ gpgcheck=0 enabled=1
[root@local yum.repos.d]# yum clean all Loaded plugins: fastestmirror, refresh-packagekit, security Cleaning repos: c6-media Cleaning up Everything Cleaning up list of fastest mirrors [root@local yum.repos.d]# yum repolist Loaded plugins: fastestmirror, refresh-packagekit, security Determining fastest mirrors c6-media | 4.0 kB 00:00 ... c6-media/primary_db | 4.4 MB 00:00 ... repo id repo name status c6-media CentOS-6 - Media 6,367 repolist: 6,367
至此,本地yum源配置完成!
到此,相信大家對(duì)“Linux系統(tǒng)配置本地yum源的方法”有了更深的了解,不妨來(lái)實(shí)際操作一番吧!這里是億速云網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。