Linux 7 中Yum 配置 说明

在之前的Blog中写了Linux Yum 的配置方法,参考:

Linux 平台下 YUM 源配置 手册

http://www.cndba.cn/account/article/details/154

刚安装的Linux 7中测试发现有点注意事项。 在安装完系统之后,默认只有一个yum的配置文件。

[[email protected] mnt]# lsb_release -a
LSB Version:     :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: RedHatEnterpriseServer
Description:     Red Hat Enterprise Linux Server release 7.2 (Maipo)
Release:  7.2
Codename:      Maipo
[[email protected] mnt]#

如果没有lsb_release 命令,使用yum 安装即可,命令:yum install redhat-lsb*

在Yum的默认只有redhat.repo文件:

[[email protected] yum.repos.d]# pwd
/etc/yum.repos.d
[[email protected] yum.repos.d]# ll
total 8
-rw-r--r--. 1 root root 358 Mar  1 17:02 redhat.repo
[[email protected] yum.repos.d]# cat redhat.repo
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated.  Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***
#
# If this file is empty and this system is subscribed consider
# a "yum repolist" to refresh available repos
 
[[email protected] yum.repos.d]#

根据里面的说明,这个redhat.repo 文件是自动生成的,不能在这里面写YUM的配置信息,否则会被覆盖掉。

所以我们这里直接touch 一个文件:dave.repo, 然后添加如下内容:

[[email protected] yum.repos.d]# cat dave.repo
[dave]
name=dave
baseurl=file:///mnt
enabled=1
gpgcheck=0
 
[[email protected] yum.repos.d]# yum clean all
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: dave
Cleaning up everything
[[email protected] yum.repos.d]#

然后就可以正常使用YUM了。

这里以安装Teamviewer为例:

[[email protected] ~]# rpm -ivh teamviewer_11.0.53191.i686.rpm
warning: teamviewer_11.0.53191.i686.rpm: Header V4 DSA/SHA1 Signature, key ID 72db573c: NOKEY
error: Failed dependencies:
         libSM.so.6 is needed by teamviewer-11.0.53191-0.i686
         libXdamage.so.1 is needed by teamviewer-11.0.53191-0.i686
         libXext.so.6 is needed by teamviewer-11.0.53191-0.i686
         libXfixes.so.3 is needed by teamviewer-11.0.53191-0.i686
         libXinerama.so.1 is needed by teamviewer-11.0.53191-0.i686
         libXrandr.so.2 is needed by teamviewer-11.0.53191-0.i686
         libXrender.so.1 is needed by teamviewer-11.0.53191-0.i686
         libXtst.so.6 is needed by teamviewer-11.0.53191-0.i686
         libasound.so.2 is needed by teamviewer-11.0.53191-0.i686
         libc.so.6(GLIBC_2.4) is needed by teamviewer-11.0.53191-0.i686
         libdbus-1.so.3 is needed by teamviewer-11.0.53191-0.i686
         libfontconfig.so.1 is needed by teamviewer-11.0.53191-0.i686
         libfreetype.so.6 is needed by teamviewer-11.0.53191-0.i686
         libgcc_s.so.1 is needed by teamviewer-11.0.53191-0.i686
         libjpeg.so.62 is needed by teamviewer-11.0.53191-0.i686
         libpng12.so.0 is needed by teamviewer-11.0.53191-0.i686
         libz.so.1 is needed by teamviewer-11.0.53191-0.i686
[[email protected] ~]#
 
这里少了很多的包,我们打上:
[[email protected] ~]# yum install libSM.so.6 libXdamage.so.1 libXext.so.6 libXfixes.so.3 libXinerama.so.1 libXrandr.so.2 libXrender.so.1 libXtst.so.6 libasound.so.2 libc.so.6 libdbus-1.so.3 libfontconfig.so.1 libfreetype.so.6 libgcc_s.so.1 libjpeg.so.62 libpng12.so.0 libz.so.1  -y
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
dave                                                                                                                                  | 4.1 kB  00:00:00    
(1/2): dave/group_gz                                                                                                                  | 136 kB  00:00:00    
(2/2): dave/primary_db                                                                                                                | 3.6 MB  00:00:00    
Resolving Dependencies
--> Running transaction check
---> Package alsa-lib.i686 0:1.0.28-2.el7 will be installed
---> Package dbus-libs.i686 1:1.6.12-13.el7 will be installed
---> Package fontconfig.i686 0:2.10.95-7.el7 will be installed
--> Processing Dependency: libexpat.so.1 for package: fontconfig-2.10.95-7.el7.i686
---> Package freetype.i686 0:2.4.11-11.el7 will be installed
---> Package glibc.i686 0:2.17-105.el7 will be installed
--> Processing Dependency: libfreebl3.so for package: glibc-2.17-105.el7.i686
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.17-105.el7.i686
---> Package libSM.i686 0:1.2.2-2.el7 will be installed
--> Processing Dependency: libICE.so.6 for package: libSM-1.2.2-2.el7.i686
--> Processing Dependency: libuuid.so.1 for package: libSM-1.2.2-2.el7.i686
--> Processing Dependency: libuuid.so.1(UUID_1.0) for package: libSM-1.2.2-2.el7.i686
---> Package libXdamage.i686 0:1.1.4-4.1.el7 will be installed
--> Processing Dependency: libX11.so.6 for package: libXdamage-1.1.4-4.1.el7.i686
---> Package libXext.i686 0:1.3.3-3.el7 will be installed
---> Package libXfixes.i686 0:5.0.1-2.1.el7 will be installed
---> Package libXinerama.i686 0:1.1.3-2.1.el7 will be installed
---> Package libXrandr.i686 0:1.4.2-2.el7 will be installed
---> Package libXrender.i686 0:0.9.8-2.1.el7 will be installed
---> Package libXtst.i686 0:1.2.2-2.1.el7 will be installed
--> Processing Dependency: libXi.so.6 for package: libXtst-1.2.2-2.1.el7.i686
---> Package libgcc.i686 0:4.8.5-4.el7 will be installed
---> Package libjpeg-turbo.i686 0:1.2.90-5.el7 will be installed
---> Package libpng12.i686 0:1.2.50-6.el7 will be installed
---> Package zlib.i686 0:1.2.7-15.el7 will be installed
--> Running transaction check
---> Package expat.i686 0:2.1.0-8.el7 will be installed
---> Package libICE.i686 0:1.0.9-2.el7 will be installed
---> Package libX11.i686 0:1.6.3-2.el7 will be installed
--> Processing Dependency: libxcb.so.1 for package: libX11-1.6.3-2.el7.i686
---> Package libXi.i686 0:1.7.4-2.el7 will be installed
---> Package libuuid.i686 0:2.23.2-26.el7 will be installed
---> Package nss-softokn-freebl.i686 0:3.16.2.3-13.el7_1 will be installed
--> Running transaction check
---> Package libxcb.i686 0:1.11-4.el7 will be installed
--> Processing Dependency: libXau.so.6 for package: libxcb-1.11-4.el7.i686
--> Running transaction check
---> Package libXau.i686 0:1.0.8-2.1.el7 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
=============================================================================================================================================================
 Package                                     Arch                          Version                                       Repository                     Size
=============================================================================================================================================================
Installing:
 alsa-lib                                    i686                          1.0.28-2.el7                                  dave                          391 k
 dbus-libs                                   i686                          1:1.6.12-13.el7                               dave                          151 k
 fontconfig                                  i686                          2.10.95-7.el7                                 dave                          229 k
 freetype                                    i686                          2.4.11-11.el7                                 dave                          388 k
 glibc                                       i686                          2.17-105.el7                                  dave                          4.2 M
 libSM                                       i686                          1.2.2-2.el7                                   dave                           39 k
 libXdamage                                  i686                          1.1.4-4.1.el7                                 dave                           20 k
 libXext                                     i686                          1.3.3-3.el7                                   dave                           39 k
 libXfixes                                   i686                          5.0.1-2.1.el7                                 dave                           18 k
 libXinerama                                 i686                          1.1.3-2.1.el7                                 dave                           14 k
 libXrandr                                   i686                          1.4.2-2.el7                                   dave                           25 k
 libXrender                                  i686                          0.9.8-2.1.el7                                 dave                           25 k
 libXtst                                     i686                          1.2.2-2.1.el7                                 dave                           20 k
 libgcc                                      i686                          4.8.5-4.el7                                   dave                          103 k
 libjpeg-turbo                               i686                          1.2.90-5.el7                                  dave                          137 k
 libpng12                                    i686                          1.2.50-6.el7                                  dave                          181 k
 zlib                                        i686                          1.2.7-15.el7                                  dave                           90 k
Installing for dependencies:
 expat                                       i686                          2.1.0-8.el7                                   dave                           80 k
 libICE                                      i686                          1.0.9-2.el7                                   dave                           64 k
 libX11                                      i686                          1.6.3-2.el7                                   dave                          610 k
 libXau                                      i686                          1.0.8-2.1.el7                                 dave                           29 k
 libXi                                       i686                          1.7.4-2.el7                                   dave                           40 k
 libuuid                                     i686                          2.23.2-26.el7                                 dave                           75 k
 libxcb                                      i686                          1.11-4.el7                                    dave                          202 k
 nss-softokn-freebl                          i686                          3.16.2.3-13.el7_1                             dave                          187 k
 
Transaction Summary
=============================================================================================================================================================
Install  17 Packages (+8 Dependent packages)
 
Total download size: 7.3 M
Installed size: 22 M
Downloading packages:
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                         39 MB/s | 7.3 MB  00:00:00    
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libgcc-4.8.5-4.el7.i686                                                                                                                  1/25
  Installing : nss-softokn-freebl-3.16.2.3-13.el7_1.i686                                                                                                2/25
  Installing : glibc-2.17-105.el7.i686                                                                                                                  3/25
  Installing : libICE-1.0.9-2.el7.i686                                                                                                                  4/25
  Installing : libuuid-2.23.2-26.el7.i686                                                                                                               5/25
  Installing : libXau-1.0.8-2.1.el7.i686                                                                                                                6/25
  Installing : libxcb-1.11-4.el7.i686                                                                                                                   7/25
  Installing : libX11-1.6.3-2.el7.i686                                                                                                                  8/25
  Installing : libXext-1.3.3-3.el7.i686                                                                                                                 9/25
  Installing : libXi-1.7.4-2.el7.i686                                                                                                                  10/25
  Installing : libXfixes-5.0.1-2.1.el7.i686                                                                                                            11/25
  Installing : libXrender-0.9.8-2.1.el7.i686                                                                                                           12/25
  Installing : zlib-1.2.7-15.el7.i686                                                                                                                  13/25
  Installing : freetype-2.4.11-11.el7.i686                                                                                                             14/25
  Installing : expat-2.1.0-8.el7.i686                                                                                                                  15/25
  Installing : fontconfig-2.10.95-7.el7.i686                                                                                                           16/25
  Installing : libpng12-1.2.50-6.el7.i686                                                                                                              17/25
  Installing : libXrandr-1.4.2-2.el7.i686                                                                                                              18/25
  Installing : libXdamage-1.1.4-4.1.el7.i686                                                                                                           19/25
  Installing : libXtst-1.2.2-2.1.el7.i686                                                                                                              20/25
  Installing : libXinerama-1.1.3-2.1.el7.i686                                                                                                          21/25
  Installing : libSM-1.2.2-2.el7.i686                                                                                                                  22/25
  Installing : libjpeg-turbo-1.2.90-5.el7.i686                                                                                                         23/25
  Installing : 1:dbus-libs-1.6.12-13.el7.i686                                                                                                          24/25
  Installing : alsa-lib-1.0.28-2.el7.i686                                                                                                              25/25
  Verifying  : libXext-1.3.3-3.el7.i686                                                                                                                 1/25
  Verifying  : fontconfig-2.10.95-7.el7.i686                                                                                                            2/25
  Verifying  : libICE-1.0.9-2.el7.i686                                                                                                                  3/25
  Verifying  : glibc-2.17-105.el7.i686                                                                                                                  4/25
  Verifying  : libXrandr-1.4.2-2.el7.i686                                                                                                               5/25
  Verifying  : libgcc-4.8.5-4.el7.i686                                                                                                                  6/25
  Verifying  : libXdamage-1.1.4-4.1.el7.i686                                                                                                            7/25
  Verifying  : nss-softokn-freebl-3.16.2.3-13.el7_1.i686                                                                                                8/25
  Verifying  : libxcb-1.11-4.el7.i686                                                                                                                   9/25
  Verifying  : libSM-1.2.2-2.el7.i686                                                                                                                  10/25
  Verifying  : libXinerama-1.1.3-2.1.el7.i686                                                                                                          11/25
  Verifying  : libuuid-2.23.2-26.el7.i686                                                                                                              12/25
  Verifying  : libjpeg-turbo-1.2.90-5.el7.i686                                                                                                         13/25
  Verifying  : libXau-1.0.8-2.1.el7.i686                                                                                                               14/25
  Verifying  : libXfixes-5.0.1-2.1.el7.i686                                                                                                            15/25
  Verifying  : libpng12-1.2.50-6.el7.i686                                                                                                              16/25
  Verifying  : libXtst-1.2.2-2.1.el7.i686                                                                                                              17/25
  Verifying  : zlib-1.2.7-15.el7.i686                                                                                                                  18/25
  Verifying  : freetype-2.4.11-11.el7.i686                                                                                                             19/25
  Verifying  : 1:dbus-libs-1.6.12-13.el7.i686                                                                                                          20/25
  Verifying  : alsa-lib-1.0.28-2.el7.i686                                                                                                              21/25
  Verifying  : libXrender-0.9.8-2.1.el7.i686                                                                                                           22/25
  Verifying  : libX11-1.6.3-2.el7.i686                                                                                                                 23/25
  Verifying  : expat-2.1.0-8.el7.i686                                                                                                                  24/25
  Verifying  : libXi-1.7.4-2.el7.i686                                                                                                                  25/25
 
Installed:
  alsa-lib.i686 0:1.0.28-2.el7         dbus-libs.i686 1:1.6.12-13.el7         fontconfig.i686 0:2.10.95-7.el7         freetype.i686 0:2.4.11-11.el7       
  glibc.i686 0:2.17-105.el7            libSM.i686 0:1.2.2-2.el7               libXdamage.i686 0:1.1.4-4.1.el7         libXext.i686 0:1.3.3-3.el7          
  libXfixes.i686 0:5.0.1-2.1.el7       libXinerama.i686 0:1.1.3-2.1.el7       libXrandr.i686 0:1.4.2-2.el7            libXrender.i686 0:0.9.8-2.1.el7     
  libXtst.i686 0:1.2.2-2.1.el7         libgcc.i686 0:4.8.5-4.el7              libjpeg-turbo.i686 0:1.2.90-5.el7       libpng12.i686 0:1.2.50-6.el7        
  zlib.i686 0:1.2.7-15.el7           
 
Dependency Installed:
  expat.i686 0:2.1.0-8.el7     libICE.i686 0:1.0.9-2.el7 libX11.i686 0:1.6.3-2.el7                   libXau.i686 0:1.0.8-2.1.el7 libXi.i686 0:1.7.4-2.el7
  libuuid.i686 0:2.23.2-26.el7 libxcb.i686 0:1.11-4.el7  nss-softokn-freebl.i686 0:3.16.2.3-13.el7_1
 
Complete!
[[email protected] ~]#
 
 
[[email protected] ~]# rpm -ivh teamviewer_11.0.53191.i686.rpm
warning: teamviewer_11.0.53191.i686.rpm: Header V4 DSA/SHA1 Signature, key ID 72db573c: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:teamviewer-11.0.53191-0          ################################# [100%]
[[email protected] ~]#

Teamviewer安装成功。

转:http://www.cndba.cn/account/article/details/155

时间: 2024-10-20 15:30:54

Linux 7 中Yum 配置 说明的相关文章

马哥Linux学习之YUM配置

学习到第11天了,系统相关的软件配置使用rpm包或源码配置都会遇到各种依赖问题,YUM就是Red Hat出的软件包管理工具,能有效的自动解决软件包的依赖问题. YUM(Yellowdog Update Modifier):把各种程序依赖关系都集成收集,并在安装软件时自动解决的工具.这个工具是使用C/S架构的,从而分为了服务器端(yum仓库)和客户端.  YUM仓库相关. yum仓库,主要由数据和元数据组成.数据就是各种各样的软件包,而元数据就是包名.版本信息.各包所包含的文件列表.依赖关系.包分

Linux 系统中 如何配置自定义命令 (Mac本同样适用)

我相信  熟悉Linux的同学们  都有一个烦恼  就是 如果要查看某一个文件的时候   要一级或者多级的去cd切换目录,哪有木有便捷的方法来随意切换呢?  就像快捷键一样这就是在 Linux 系统中配置自定义命令,很简单?? 在文件/root/.bashrc中,添加以下行: alias mycommand = "cd /root" 在终端直接执行mycommand就会执行cd /root ??:    source ~/.bash_profile  这个命令一定要记得执行,这一行命令

linux系统中网卡配置详解

文件:/etc/sysconfig/network-scripts/ifcfg-eth0 以下各值常见于所有的基本配置文件中: * DEVICE=name,这里name是物理设备的名字(动态分配的PPP设备应当除外, 它的名字是“逻辑名”. * IPADDR=addr, 这里addr是IP地址. * NETMASK=mask, 这里mask是网络掩码. * NETWORK=addr, 这里addr是网络地址. * BROADCAST=addr, 这里addr是广播地址. * GATEWAY=ad

Red Hat Enterprise Linux(RHEL)中yum的repo文件详解

Yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及CentOS中的Shell前端软件包管理器.基于RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软件包,无须繁琐地一次次下载.安装. 使用yum help查看所有支持的命令: 首先查看/etc/yum.conf的内容: 下面逐行介绍这个配置文件里每一行的作用. cachedir=/var/cache/yum/$basearch/$

Linux系统中yum 命令讲解

(一)yum介绍 Yum(全称为 Yellow dogUpdater, Modified)是一个在Fedora和RedHat以及CentOS中的Shell前端软件包管理器.基于RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软件包,无须繁琐地一次次下载.安装.yum提供了查找.安装.删除某一个.一组甚至全部软件包的命令,而且命令简洁而又好记. (二)yum使用 yum的命令形式一般是如下:    yum –选项命令包 其中选项是可选的,选项

老男孩教育每日一题-2017年5月12日-磁盘知识点:linux系统中LVM配置实现方法?

1.题目 2.参考答案 01:将一个或多个物理分区创建为一个PV # pvcreate /dev/sdb{1,2} Physical volume "/dev/sdb1" successfully created Physical volume "/dev/sdb2" successfully created # pvs          #<- 查看系统中的PV信息 PV                 VG   Fmt      Attr     PSiz

Linux系统中yum源更新为国内镜像地址

yum源更新为国内的镜像地址    1)备份系统原文件 [[email protected] ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2)下载国内的镜像地址文件 [[email protected] ~]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo -P /usr/local/src/ --2015-07

Manjaro Linux 18 中安装配置搜狗拼音输入法

1.配置好Archlinuxcn源. 2.安装以下软件 sudo pacman -S fcitx-configtool fcitx-lilydjwg-git fcitx-sogoupinyin 3.编辑 .xprofile文件 export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export XMODIFIERS="@im=fcitx" 4.注销即可 原文地址:https://www.cnblogs.com/manjarocn/p/

在RedHat Linux系统中安装和配置snmp服务

检查系统是否安装snmp服务 # rpm -qa|grep snmp net-snmp-5.3.2.2-17.el5 net-snmp-perl-5.3.2.2-17.el5 net-snmp-devel-5.3.2.2-17.el5 net-snmp-libs-5.3.2.2-17.el5 net-snmp-utils-5.3.2.2-17.el5 net-snmp-libs-5.3.2.2-17.el5 net-snmp-devel-5.3.2.2-17.el5 SNMP服务安装后会有以上安