`
xukenetwork
  • 浏览: 74318 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

rhel下yum相关知识

阅读更多

卸载原有yum

rpm -aq|grep yum|xargs rpm -e --nodeps

 

 

wget -c http://yum.baseurl.org/download/2.0/yum-2.0.8-1.src.rpm

rpmbuild --rebuild yum-2.0.8-1.src.rpm

cd /usr/src/redhat/RPMS/noarch/

rpm -ivh yum-2.0.8-1.noarch.rpm

 

Yum软件仓库---redhat

网络地址:http://ayo.freshrpms.net/(官网)

 

http://apt.sw.be/

 

http://vault.centos.org/

 

http://ftp.freshrpms.net/redhat/9/

 

http://fedoraproject.org/wiki/EPEL

http://repoforge.org/

http://pkgs.repoforge.org/

http://rpmfusion.org/Configuration/

 

安装地址:http://ayo.freshrpms.net/redhat/9/i386/freshrpms/headers/header.info

更新地址:http://ayo.freshrpms.net/redhat/9/i386/updates/headers/header.info

 

 

资源真的是非常丰富,从Centos到Ubuntu,ISO镜像、升级包,应有尽有,上交的兄弟们真是幸福,羡慕啊。不过还好,我们好歹也算是在教育网内,凑合着也可以沾点光,下载一些。

ftp://ftp.sjtu.edu.cn/

 

yum的命令形式一般是如下:yum [options] [command] [package ...]

其中的[options]是可选的,选项包括-h(帮助),-y(当安装过程提示选择全部为"yes"),-q(不显示安装的过程)等等。[command]为所要进行的操作,[package ...]是操作的对象。

 

自动搜索最快镜像插件:   yum install yum-fastestmirror

安装yum图形窗口插件:    yum install yumex

查看可能批量安装的列表: yum grouplist

 

 

 

虚拟下安装RedHat Linux5.6  [红帽企业Linux.5.6].rhel-server-5.6-i386-dvd

http://lilaili.blog.163.com/blog/static/268436942013022111033103/

 

 

解决This system is not registered with RHN

Redhat之所以会出现这个错误是因为没有注册RHN,我们只需要更新一下yum的源就可以了。使用命令 cd /etc/yum.repos.d/   进入yum的配置目录。

在终端中输入 wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo 命令,下载CentOS- Base.repo文件。

 

然后将原有的rhel-debuginfo.repo备份一下,使用命令mv CentOS-Base.repo rhel-debuginfo.repo,将CentOS- Base.repo重命名成rhel-debuginfo.repo。

mv /etc/yum.repos.d/rhel-debuginfo.repo  /etc/yum.repos.d/rhel-debuginfo.repo.bak 

成功以后,使用yum install build-essential安装成功。

 

修改yum源后要执行

yum clean all     #清理yum缓存

yum makecache     #将服务器上的软件包信息缓存到本地,以提高搜索安装软件的速度

yum install vim*  #测试yum是否可用

 

 

配置本地yum仓库篇

1. 编辑yum配置仓库文件vi /etc/yum.repos.d/rhel-debuginfo.repo

 [rhel-yuminstaller]

 name=Red Hat Enterprise Linux $releasever - $basearch – Debug

 baseurl=file:///home/yum

 enabled=1

 gpgcheck=0

 gpgcheck=0不启用签名检查;如果要启用gpgcheck=1需要在以上配置文件末加上

 pgpkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

 并使用rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release导入签名文件

 

2.挂载rhel5.6系统光盘并复制光盘/Server目录下所有文件到/home/yum

 mount /dev/cdrom /mnt

 cp –rfv /mnt/Server/* /home/yum

3.安装createrepo.rpm并生成仓库数据库文件

 rpm -ivh /home/yum/createrepo*

 createrepo /home/yum/

 这样本地yum仓库就建立成功,可以使用yum install packagename测试。

 

 

使用yum命令时,出现:

Existing lock /var/run/yum.pid: another copy is running as pid:3355.

Another app is currently holding the yum lock; waiting for it to exit...

    The other application is: yum-updatesd-he

……

主要原因就是yum在自动更新 只要关掉他就可以了

解决方案:

直接输入  rm -f    /var/run/yum.pid
或者:      /etc/init.d/yum-updatesd stop
也可以等更新完了再进行安装

 

 

 

http://repoforge.org/use/

 

  • Use cat /etc/redhat-release to find which release of EL you are using
  • Use uname -a to find your processor architecture
  • Use rpm -ivh package-filename to install the rpmforge-release package (also works with URLs)
  • You can use wget or curl to download the package using one of the above links if needed (for example on a server with no X Window)
  • Then you can use yum to install the available packages from the RepoForge repo, e.g. yum install --enablerepo=rpmforge-extras
  • Afterward, you can disable accidental updates from the repo by setting enabled = 0 in the repo definition file in/etc/yum.repos.d/

 

分享到:
评论

相关推荐

    rhel中yum源替换centos中yum源

    rhel中yum源替换centos中yum源

    rhel5.5 yum本地源

    Rhel 5制作本地yum源 ,介绍了相关的用法和相关的步骤。

    RHEL安装yum源

    yum-3.4.3-154.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-42.el7.noarch.rpm python-urlgrabber-3.10-8.el7.noarch.rpm yum-metadata-parser-1.1.4-10.el7.x86_64.rpm rpm-4.11.3-25.el7.x86_64....

    RHEL5下使用centos Yum源

    介绍如何在RHEL5没有subscription的情况下换用centos yum源

    RHEL换YUM库

    NULL 博文链接:https://jdkleo.iteye.com/blog/2236566

    Linux(rhel)yum配置详解

    yum配置是redhat5以上的特色所在,因为在redhat9.0之前,安装程序时在依赖方面不太明显...但是rhel5后,在安装程序时,文件与文件之间的依赖性是很重要的。其中,最重要的就是yum的配置和熟练应用是更重要的部分之一。

    RHEL5配置YUM源

    NULL 博文链接:https://xukenetwork.iteye.com/blog/2158168

    RHEL7-yum安装依赖.rpm.zip

    wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-150.el7.centos.noarch.rpm wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm wget ...

    rhel6 yum安装包

    rhel6 yum安装包,注意安装顺序 1) python-iniparse-0.3.1-2.1.el6.noarch.rpm 2)yum-metadata-parser-1.1.2-16.el6.x86_64.rpm 3) yum-3.2.29-81.el6.centos.noarch.rpm 4) yum-plugin-fastestmirror-1.1.30-...

    RHEL7配置yum源

    新手使用RHEL常遇到的问题是无法安装软件,yum安装时常出现:系统未注册,没有可用repos,即没有yum安装源。

    rhel 6 yum源本地化

    rhel6的 yum源本地化方法 非常简单。适合新手

    RedHat Linux RHEL6配置本地YUM源

    RedHat Linux RHEL6配置本地YUM源

    RHEL4 INSTALL YUM

    RHEL4 INSTALL YUM 教你如何在rhel4的系统上安装yum

    rhel5.6yum源配置

    本地yum配置(光盘)、网络yum配置(centsos源) 先试试将对应版本目录下的yum-centos.repo拷贝至/etc/yum.repos.d/下,运行yum makecache,若不能缓冲数据库,再看README。

    RHEL5配置 CentOS YUM更新源

    NULL 博文链接:https://mypanpan.iteye.com/blog/1164635

    RedHat9下安装yum

    安装了gcc后,源码安装gettext,再源码安装yum即可,亲测成功

    rhel配置新的yum源

    rhel配置新的yum源需要的安装包

    RHEL5yum方式安装XEN

    xen安装手记,综合了各种网上资料。内部附有参考网站链接,都是可以打开的。

    RHEL 6.X使用CentOS yum源

    RHEL 6.X使用CentOS yum源,

    更改RHEL7.4的yum源.zip

    更改RHEL7.4 yum源。为了减去在开源网站寻找这几个文件的麻烦,所需的centos系统的.rpm文件已经打包好了。还包括了已经编写好了的.repo文件和一个FTP传输软件。

Global site tag (gtag.js) - Google Analytics