让redhat5以yum方式安装软件
默认情况下redhat的yum源是收费的,我们可以使用centos的源
cd /etc/yum.repos.d
vi rhel-debuginfo.repo将内容修改为
[base]
name=CentOS-5 - Base
baseurl=http://ftp.sjtu.edu.cn/centos/5/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
[update]
name=CentOS-5 - Updates
baseurl=http://ftp.sjtu.edu.cn/centos/5/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
[addons]
name=CentOS-5 - Addons
baseurl=http://ftp.sjtu.edu.cn/centos/5/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
[extras]
name=CentOS-5 - Extras
baseurl=http://ftp.sjtu.edu.cn/centos/5/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
[centosplus]
name=CentOS-5 - Plus
baseurl=http://ftp.sjtu.edu.cn/centos/5/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
baseurl=http://ftp.sjtu.edu.cn/centos/5/contrib/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
# vi dag.repo
[dag]
name=Dag RPM Repository for RHEL5
baseurl=http://ftp.riken.jp/Linux/dag/redhat/el5/en/$basearch/dag/
enabled=1
gpgcheck=1
gpgkey=http://ftp.riken.jp/Linux/dag/packages/RPM-GPG-KEY.dag.txt
然后在此文件夹下面新建rpmforge.repo,mirrors-rpmforge两个文件
vi rpmforge.repo设置内容为
[rpmforge]
name = Red Hat Enterprise $releasever - RPMforge.net - dag
#baseurl = http://apt.sw.be/redhat/el5/en/$basearch/dag
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
vi mirrors-rpmforge设置内容为
http://apt.sw.be/redhat/el5/en/$ARCH/dag
http://archive.cs.uu.nl/mirror/dag.wieers/redhat/el5/en/$ARCH/dag
http://ftp2.lcpe.uni-sofia.bg/freshrpms/pub/dag/redhat/el5/en/$ARCH/dag
#http://ftp.heanet.ie/pub/freshrpms/pub/dag/redhat/el5/en/$ARCH/dag
http://ftp-stud.fht-esslingen.de/dag/redhat/el5/en/$ARCH/dag
http://mirror.cpsc.ucalgary.ca/mirror/dag/redhat/el5/en/$ARCH/dag
http://mirrors.ircam.fr/pub/dag/redhat/el5/en/$ARCH/dag
http://rh-mirror.linux.iastate.edu/pub/dag/redhat/el5/en/$ARCH/dag
http://rpmfind.net/linux/dag/redhat/el5/en/$ARCH/dag
http://wftp.tu-chemnitz.de/pub/linux/dag/redhat/el5/en/$ARCH/dag
http://www.mirrorservice.org/sites/apt.sw.be/redhat/el5/en/$ARCH/dag
在此之后需要安装一个软件包rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-* //输入KEY
如果key不匹配则手动指定
rpm --import http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
为yum加速安装这个软件包yum-fastestmirror
OK了之后就可以用yum来安装软件了,再也不用担心依赖问题了
出现错误:
Error: yum conflicts with yum-rhn-plugin < 0.5.3-30.el5
解决:yum remove yum-rhn-plugin
然后yum update
如果电脑碰巧不能联网,没关系,我们还可以拿DVD镜像制作本地yum源
首先挂在上光盘,把光盘上的东西拷贝出来,这里我复制到/tmp/packges目录下
vi /etc/yum.repos.d/rhel-debuginfo.repo
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=ftp:///tmp/packges/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Cluster]
name=Red Hat Enterprise Linux $releasever - $basearch - Cluster
baseurl=file:///tmp/packges/Cluster
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[ClusterStorage]
name=Red Hat Enterprise Linux $releasever - $basearch - ClusterStorage
baseurl=file:///tmp/packges/ClusterStorage
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[VT]
name=Red Hat Enterprise Linux $releasever - $basearch - VT
baseurl=file:///tmp/packges/VT
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
然后安装一下软件包 rpm -ivh createrepo-0.4.4-2.fc6.noarch.rpm 重新生成依赖关系
# createrepo -o /tmp/packges/Cluster -g /tmp/packges/Cluster/repodata/comps-rhel5-cluster.xml
# createrepo -o /tmp/packges/ClusterStorage -g /tmp/packges/ClusterStorage/repodata/comps-rhel5-cluster-st.xml
# createrepo -o /tmp/packges/Server -g /tmp/packges/Server/repodata/comps-rhel5-server-core.xml
# createrepo -o /tmp/packges/VT -g /tmp/packges/VT/repodata/comps-rhel5-vt.xml
之后修改/usr/lib/python2.4/site-packages/yum/yumRepo.py第411行:
remote = url + '/' + relative
改为:
remote = “/tmp/packges” + '/' + relative
yum clean all;yum install
之后就可以了,执行yum install vsftp试一下!如果还嫌麻烦,那这样,直接拿上光盘挂载,用光盘做yum源!
转载于:https://blog.51cto.com/lymrg/510581
让redhat5以yum方式安装软件相关推荐
- Linux采用yum方式安装及卸载软件
前言 很多时候,我们在Linux中安装了软件,但是却不怎么会卸载,Linux不像Windows可以直接在控制面板中卸载.这篇文章肯定会帮助到你.收藏好了. 正文 1.采用yum方式安装软件 yum方式 ...
- centos7 docker安装_教你如何在 CentOS 7 下 yum 方式安装 Docker 环境
记录在CentOS 7下使用yum方式安装Docker环境的步骤. 1.移除旧版本: yum remove docker \ docker-client \ ...
- CentOS yum方式安装ffmpeg
系统为CentOS 6.4,自己编译ffmpeg和众多解码器太痛苦了,yum方式安装ffmpeg的解码器很全,先用用看. 1.安装所需软件 yum install -y automake autoco ...
- CentOS7安装配置Vsftpd服务器(yum方式安装)
目录 Vsftpd服务器安装配置 Vsftpd匿名用户配置 Vsftpd系统用户配置 Vsftpd虚拟用户配置 Vsftpd服务器安装配置 Vsftpd服务器端安装有两种方法:一是基于YUM方式安装: ...
- 【Zabbix】yum方式安装zabbix
前言 redhat 7.0 (查看redhat版本: cat /etc/redhat-release) zabbix 3.4 yum方式安装zabbix Zabbix介绍 Zabbix(音同 za:b ...
- centos7 yun安装mysql,CentOS7 yum方式安装MySQL5.7
MySQL 完整的初始密码规则可以通过如下命令查看: mysql> SHOW VARIABLES LIKE 'validate_password%'; +-------------------- ...
- CentOS 7以yum方式安装zabbix3.2及配置文件详解
一.zabbix简介与环境准备 简介详见 ---> zabbix简介 环境准备: CentOS 7(node7):zabbix-server,web,mysql,agent mariadb:5. ...
- yum方式安装mySql
Yum方式安装mysql服务 步骤一:首先下载mysql的yum源配置 wget http://dev.mysql.com/get/mysql57-community-release-el7-11.n ...
- linux下Yum方式安装gcc
linux下Yum方式安装gcc学习记录 从CentOS7的系统安装镜像中取出需要的rpm包(也可以通过别的方式获取):解压镜像文件,进入"Packages"目录,里面很多rpm包 ...
最新文章
- 聚合类新闻client初体验
- 18春《c语言》在线作业3,18春福师《C++语言程序设计》在线作业二【参考答案】...
- [xsy3343]程序锁
- JavWeb笔记:JavaScript总结
- docker mysql 日志_在docker mysql容器中启用日志记录
- spring boot之security
- 爬虫python入门_python爬虫入门教程有哪些?适合的只有这三个
- eclipse,MATLAB,python,VS Code,VS,apache(阿帕奇),Notepad++官方下载网址史上最详细
- StyTr^2:Image Style Transfer with Transformers
- 安装SQL Server 2012时报.net framework 3.5错误
- 微信图片怎么添加竖排文字_微信字体竖排怎么设置 微信怎样编辑竖排文字
- Solr8.0速成系列 | Solr整合IKAnalyzer分词器 05
- Js之$.ajax回调函数获取结果的问题-yellowcong
- 接上一篇——上海有哪些值得加入的互联网公司
- Java高并发程序设计(三)——JDK并发包(一)
- java基于springboot的学生公寓管理系统
- kubernetes1.22安装使用ingress-nginx
- Innodb引擎中B+树一般有几层?能容纳多少数据量?
- 正在家里愉快办公,突然被通知公司倒闭,员工:没想到来得这么快
- 阿里云服务器域名http升级为https访问,SSL证书下载安装全流程