网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 服务器与数据库 > Linux
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

Reply
 
Thread Tools Display Modes
  #1   IP: 49.87.50.242
Old 2015-07-20, 08:25 AM
O'Brien O'Brien is offline
初级会员
 
Join Date: 2012-10-31
Posts: 2
O'Brien 现在声名狼藉
Default Centos6.4 本地yum源配置

第一步,在etc目录下建立ftp目录, 并将centos6.4第一张iso安装盘所有文件复制到centos目录下。
# mkdir /etc/centos

图型界面下进入centos6.4第一张iso安装盘所有文件复制到ftp目录下。

第二步,进入 /etc/yum.repos.d目录, 配置默认的yum源为本地指定目录,即为/etc/ftp。 其它的全部禁止。
# cd /etc/yum.repos.d
# ls -a

CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo  

----

#mv CentOS-Base.repo CentOS-Base.repose_bak
#mv CentOS-Debuginfo.repo CentOS-Debuginfo.repo_bak

第三步,修改配置文件CentOS-Media.repo  
#vim CentOS-Media.repo

Code:
[root@sl yum.repos.d]# more CentOS-Media.repo  #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:///ftp/centos/     #yum源目录,源地址
gpgcheck=1                #检查GPG-KEY,0为不检查,1为检查
enabled=1               #是否用该yum源,0为禁用,1为使用
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6  #gpgcheck=0时无需配置
第四步,测试yum是否配置成功
# yum list
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 10:44 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.