---
title: "rhel5 Server添加/删除程序"
author: "chenchi1985"
date: "2010-05-16T14:26:29Z"
tags: []
categories: ["操作系统"]
slug: "rhel5-server"
draft: false
lastmod: "2010-05-17T08:57:53Z"
id: 667560
url: "https://chenchi1985.iteye.com/blog/667560"
---

解决rhel5 server上的添加/删除程序不能浏览和搜索程序的问题。  
把安装光盘放进光驱，默认应该是mount到/media目录下的，例如：/media/RHEL\_5.4 x86\_64 DVD。  
但是yum的repo路径配置里面不能有空格。

 

```
umount /media/RHEL_5.4 x86_64 DVD。
mkdir /media/rh
mount /dev/dvd-hdc /media/rh
```

 将光盘mount到rh目录下。

编辑进入/etc/yum.repos.d目录，新建一个1.repo，写入以下内容：

```
[base]
name=base RPM Repository for RHEL5
baseurl=/media/rh/Server/
enabled=1
gpgcheck=0
```

 注意baseurl后面要加上Server，因为光盘上的rpm包都在Server目录下。  
运行

```
yum clean all
```

 然后就可以在图形界面下添加/删除程序了。