redhat 使用yum
来源:互联网 发布:苹果好软件推荐 编辑:程序博客网 时间:2024/06/06 04:56
之前一直用的是ubuntu的系统,安装软件只要使用apt-get install **就可以很方便的安装好软件,特别是交大也有源,速度非常的快。
这些天装了redhat,发现apt-get install无法使用了,每次安装软件都要先下载源代码的包,解压后./configure--》make--》make install这个步骤才行。或者是rpm –ivh *.rpm。后来知道上面也有类似与ubuntu的apt-install,叫做yum。但是,实际却发现无法使用,好像是因为yum是个收费的软件,除非你用的是收费版的redhat,否则都是要花钱用的,后来通过使用Centos5的yum解决了这个问题。
Yum的下载地址http://mirrors.ustc.edu.cn/centos/5/os/i386/CentOS/,我们需要的有rpmyum-3.2.22-33.el5.centos.noarch.rpm,yum-downloadonly-1.1.16-14.el5.centos.1.noarch.rpm,yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm,yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm,yum-utils-1.1.16-14.el5.centos.1.noarch.rpm这5个rpm,找到先下载到本地,然后
rpm –ivh yum*
安装这5个包。如果之前有安装yum,需要卸载(首先先用rpm -qa|grep yum*指令来查看原先的yum安装文件,直接rpm -e 来删除具体的已安装的yum文件,若遇到依赖问题,直接--nodeps)
之后修改YUM的源,编辑/etc/yum.repos.d/rhel-debuginfo.repo文件,里面内容全部替换为
[base]
name=CentOS-5 - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch&
repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://ftp.sjtu.edu.cn/centos/5/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#released updates
[update]
name=CentOS-5 - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
baseurl=http://ftp.sjtu.edu.cn/centos/5/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#packages used/produced in the build butnot released
[addons]
name=CentOS-5 - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons
baseurl=http://ftp.sjtu.edu.cn/centos/5/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras
baseurl=http://ftp.sjtu.edu.cn/centos/5/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#additional packages that extendfunctionality of existing packages
[centosplus]
name=CentOS-5 - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplus
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
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contrib
baseurl=http://ftp.sjtu.edu.cn/centos/5/contrib/$basearch/
gpgcheck=1
enabled=0
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
然后导入key
rpm --import http://ftp.sjtu.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
OK,现在可以用yum来install软件了,比如安装gcc编译环境。。。。轻松多了~~~
- RedHat - as5 使用yum
- redhat 使用yum
- redhat使用免费yum
- Redhat使用yum
- redhat无法使用yum解决方案
- redhat使用yum在线更新
- redhat使用centos的yum
- RedHat使用CentOS Yum源
- redhat 使用centos6 yum源
- redhat使用本地yum源
- 使用yum升级和yum使用简介(LInux, RedHat, Fedora)
- 使用yum升级和yum使用简介(LInux, RedHat, Fedora)
- 使用YUM自动更新RedHat AS 4
- Redhat 使用Yum安装、更新rpm包
- redhat中使用centos配置yum源
- 在Linux Redhat 9.0使用YUM
- RedHat 6使用CentOS YUM源更新
- RedHat使用Centos的yum源
- 湫湫系列故事--植树节(hdu4503 算法 组合数学)
- 如何查询sql server验证模式登录密码?
- version
- C/C++内存泄漏及检测 #include <crtdbg.h>
- Attribute在.net编程中的应用(二)
- redhat 使用yum
- ORA-00600: [kccpb_sanity_check_2], [494207], [493984], [0x0], [],
- CPU类型
- 计算机视觉、机器学习相关领域论文和源代码大集合--持续更新……
- Having
- ios面试题整理
- OpenJTAG与Jlink/J-link的区别
- Java中Calendar的一些简单操作 及 JS中获取当前时间前一天时间(js中时间Date操作)
- [算法导论]分治法---最大子数组