配置redhat 使用163 or sohu 的yum 源 1.#cp /etc/yum.repos.d/rhel-debuginfo.repo /etc/yum.repos.d/rhel-debuginfo.repo.bk 首先备份下redhat yum 的配置样例文件。 2.#wget http://mirrors.163.com/.help/CentOS-Base-163.repo 或者 #wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo 下载163或sohu提供的yum 配置文件 3.#vi CentOS-Base-163.repo 替换$releaserver 为5或者6[5/6为centos的版本] 4.#yum makecache 第3部不修改则第4部会出现如下错误:“[root@localhost ~]# yum makecache 5.#cd /etc/pki/rpm-gpg #wget http://mirror./centos/RPM-GPG-KEY-CentOS-5 #yum update 错误信息:warning:rpmts_hdrfromfdno:header v3 dsa signature:nokey,key id e823568 GPG key retrieval:[errno 5] oserror:[errno 2] no such file or directory:'/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5' 原因:localhost不存在指定的文件/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 6.#yum install yum-fastestmirror 安装fastestmirror插件可自动选择最快的yum 源 7.#yum install -y yumex 安装图形化界面的yum yum 常用的命令 #yum install -y xxx 安装xxx软件 #yum info xxx 查看xxx软件的基本信息 #yum remove/erase xxx 卸载xxx软件 |
|