您的位置:首页 > 运维架构 > Linux

centos 配置本地yum源

2015-08-07 15:58 627 查看
1.虚拟机要加载centos安装光盘dvd,先把光驱挂载到任意目录下,如:mount /dev/cdrom /media

2.配置/etc/yum.repos.d/CentOS-Base.repo文件,vim打开,整个文件内容配置如下:

# CentOS-Base.repo

#

# The mirror system uses the connecting IP address of the client and the

# update status of each mirror to pick mirrors that are updated to and

# geographically close to the client. You should use this for CentOS updates

# unless you are manually picking other mirrors.

#

# If the mirrorlist= does not work for you, as a fall back you can try the

# remarked out baseurl= line instead.

#

#

[base]

name=CentOS-$releasever - Base

baseurl=file:///media

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

3.yum list |grep httpd,查看有哪些可用包
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: