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,查看有哪些可用包
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,查看有哪些可用包
相关文章推荐
- Linux进程间通信方式--信号,管道,消息队列,信号量,共享内存
- linux lsof详解
- Linux 编译器之 GCC
- Linux 常用编辑器之vim
- Linux基础正则表达式字符汇整(characters)
- Linux基础正则表达式字符汇整(characters)
- Linux 常用命令的使用
- Linux 文件权限简单说明
- Linux 目录结构及文件
- 换一种方式创建Linux下的自解压文件
- Ubuntu:14.04.2 安装多个Linux内核
- linux下svn的常用指令
- Linux必备软件之SSH
- Ubuntu Amarok 安装及几个常见问题解决
- 如何在Linux下安装Erlang
- ARM Linux系统的时钟机制
- centOS简单优化
- 编程获取linuxservercpu、内存和磁盘使用
- Linux - grep的一些进阶选项
- Linux - grep的一些进阶选项