redhat7.2修改yum源-以及-yum操作的技巧(xxx.so文件缺失处理办法)

来源:互联网 发布:fpgrowth算法详解 编辑:程序博客网 时间:2024/05/16 19:46

  • redhat72修改yum源
  • yum list根据package名称关键词进行搜索确认
  • yum install去掉下载确认的步骤
  • yum provide 命令特别推荐
  • 总结
  • 参考文档

redhat7.2修改yum源

redhat企业版7.2安装软件,需要操作系统注册才行。
但是redhat的软件跟centos软件的源都是一样的。所以可以用centos软件的源替换。
下面介绍redhat企业版7.2修改配置yum源的方法。

redhat7.2配置yum源_百度经验
http://jingyan.baidu.com/article/6dad50751f4912a123e36e38.html

最后使用下述命令验证一下:

yum install redhat-lsb -ylsb_release -a

另外,介绍一个yum安装技巧。

yum list根据package名称关键词,进行搜索确认

因为yum后面是package的名称,跟linux命令名称是不一样的。
为了安装合适的package,可以使用下述命令查找确认。
yum list | grep lsb


再说一个相关技巧

yum install去掉下载确认的步骤

一般yum install xxxxxxxx 安装的时候,会提示软件占用空间大小。每次都得输入y确认。
如果不想确认,那就改为

yum install xxxxxxxx -y

yum provide 命令(特别推荐)

适合.so文件缺失或者程序名称
举2个例子:

[qilei@localhost 2.5.2]$ cdnshelpCadence Help v02.10-p001Copyright (c) 2006-2013 Cadence Design Systems, Inc. All rights reservedLaunching gui.../home/qilei/cadence/INCISIV14/tools.lnx86/cdnshelp/bin/cdnshelp.exe /home/qilei/cadence/INCISIV14/doc/xmlreg/library.lbr/home/qilei/cadence/INCISIV14/tools.lnx86/cdnshelp/bin/32bit/cdnshelp.exe: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory[qilei@localhost 2.5.2]$ suPassword: [root@localhost 2.5.2]# yum provides libz.so.1Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Loading mirror speeds from cached hostfilezlib-1.2.7-17.el7.i686 : The compression and decompression libraryRepo        : baseMatched from:Provides    : libz.so.1[root@localhost 2.5.2]# yum install zlib-1.2.7-17.el7.i686 -y
[root@localhost 2.5.2]# yum provides emacsLoaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Loading mirror speeds from cached hostfile1:emacs-24.3-18.el7.x86_64 : GNU Emacs text editorRepo        : base

总结

有了上述yum源和yum操作技巧,redhat系统下安装软件的方法就简单多了。

参考文档:

注意:
1. redhat6.3配置yum源,使之来自centos;
2. redhat6.3除了下述操作外,还要修改centos源的版本号为最新。否则会提示网址请求无应答的错误。
3. 下载http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6;放在目录:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
4. 命令执行:rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
rehat 安装软件源”Unable to read consumer identity”解决:使用非注册的软件源 - 河西无名式 - 博客频道 - CSDN.NET
http://blog.csdn.net/trochiluses/article/details/17027045

0 0