本文共 1058 字,大约阅读时间需要 3 分钟。
[root@localhost ~]# yum install httpd
Loaded plugins: rhnplugin, security This system is not registered with RHN. RHN support will be disabled. Setting up Install Process No package httpd available. Nothing to do 解决方案:1.卸载redhat自带的yum组件
[root@localhost ~]# rpm -qa|grep yum|xargs rpm -e --nodeps
2.安装centos的yum包
[root@localhost ~]# wget
[root@localhost ~]# wget [root@localhost ~]# wget [root@localhost ~]# rpm -ivh *.rpm warning: yum-3.2.22-37.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897 Preparing... ########################################### [100%] 1:yum-metadata-parser ########################################### [ 33%] 2:yum-fastestmirror ########################################### [ 67%] 3:yum ########################################### [100%]
3. 下载更新源,并存放在系统目录中
[root@localhost ~]# wget[root@localhost ~]#mv CentOS_Base.repo /etc/yum.repos.d/CentOS-Base.repo
4.生成缓存并进行安装
[root@localhost ~]# yum makecache
[root@localhost ~]# yum install httpd转载地址:http://gjkib.baihongyu.com/