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

Linux 平台下 YUM 源配置 手册

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

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

[root@cndba.cn 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
[root@cndba.cn mnt]#

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

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

[root@cndba.cn yum.repos.d]# pwd
/etc/yum.repos.d
[root@cndba.cn yum.repos.d]# ll
total 8
-rw-r--r--. 1 root root 358 Mar  1 17:02 redhat.repo
[root@cndba.cn 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
 
[root@cndba.cn yum.repos.d]#

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

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

[root@cndba.cn yum.repos.d]# cat dave.repo
[dave]
name=dave
baseurl=file:///mnt
enabled=1
gpgcheck=0
 
[root@cndba.cn 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
[root@cndba.cn yum.repos.d]#

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

这里以安装Teamviewer为例:

[root@cndba.cn ~]# 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
[root@cndba.cn ~]#
 
这里少了很多的包,我们打上:
[root@cndba.cn ~]# 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!
[root@cndba.cn ~]#
 
 
[root@cndba.cn ~]# 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%]
[root@cndba.cn ~]#

Teamviewer安装成功。

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

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

  1. Linux系统中yum 命令讲解

    (一)yum介绍 Yum(全称为 Yellow dogUpdater, Modified)是一个在Fedora和RedHat以及CentOS中的Shell前端软件包管理器.基于RPM包管理,能够从指定 ...

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

    Yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及CentOS中的Shell前端软件包管理器.基于RPM包管理,能够从指定的服务器自动下载 ...

  3. CentOS7中yum配置

    1.打开centos的yum文件夹 输入命令cd  /etc/yum.repos.d/ 2.用wget下载repo文件 输入命令wget  http://mirrors.aliyun.com/repo ...

  4. (3)ElasticSearch在linux环境中安装与配置head插件

    1.简介 ElasticSearch-Head跟Kibana一样也是一个针对ElasticSearch集群操作的API的可视化管理工具,它提供了集群管理.数据可视化.增删改查.查询语句等功能,最重要还 ...

  5. Linux中yum和apt-get用法及区别

    Linux中yum和apt-get用法及区别   一般来说著名的linux系统基本上分两大类:   1.RedHat系列:Redhat.Centos.Fedora等   2.Debian系列:Debi ...

  6. 在新安装的Linux系统中,防火墙默认是被禁掉的,一般也没有配置过任何防火墙的策略,所有不存在/etc/sysconfig/iptables文件。

    原因:在新安装的Linux系统中,防火墙默认是被禁掉的,一般也没有配置过任何防火墙的策略,所有不存在/etc/sysconfig/iptables文件. 解决办法: .随便写一条iptables命令配 ...

  7. Zabbix 4.0.2试用(七):在Linux主机中安装zabbix agent并添加该主机(yum源安装)

    Zabbix 4.0.2试用(七):在Linux主机中安装zabbix agent并添加主机(yum源安装) 2018年12月20日, 上午6:42 之前介绍的是下载源安装包,编译安装的方式来安装ag ...

  8. linux的软件管理的rpm包和yum配置加tar解压包和安装编译./configuer

    软件管理 rpm包  和yum 1.软件形式 Linux系统的第三方软件,无论是应用软件还是工具软件,大多以以下两种形式之一发行: 源代码形式       预编译形式 获取的源代码形式的软件,需要对其 ...

  9. 详解在Linux中安装配置MySQL

    最近在整理自己私人服务器上的各种阿猫阿狗,正好就顺手详细记录一下清理之后重装的步骤,今天先写点数据库的内容,关于在Linux中安装配置MySQL 安装环境 CentOS7 + MySQL5.7 下载安 ...

随机推荐

  1. ASP文件操作(FSO)详解

    实例一:写入文件 语法 object.CreateTextFile([要建立的文件],[如存在,是否替代]) <% Set fs =Server.CreateObject("Scrip ...

  2. Unity3d Android程序嵌入Admob广告条

    原地址:http://dong2008hong.blog.163.com/blog/static/4696882720140441353482/ Seems like using a simple A ...

  3. c# 4.0新特性一览

    原文:http://www.cnblogs.com/palo/archive/2009/03/01/1400949.html 终于静下心来仔细听了一遍Anders Hejlsberg(Visual S ...

  4. 无法将 lambda 表达式 转换为类型“System.Delegate”,因为它不是委托类型

    this.BeginInvoke(() => { this.btnQuery.Enabled = false; //禁用查询 }); 跨线程调用时,编译上面的代码将提示 对于Control.In ...

  5. Opc

    http://www.tuicool.com/articles/nymUz2 http://blog.chinaunix.net/uid-20692368-id-3434001.html http:/ ...

  6. 51Nod 有限背包计数问题 题解报告

    首先这道题理论上是可以做到O(nlogn)的,因为OEIS上有一个明显可以用多项式乘法加速的式子 但是由于模数不是很兹磁,所以导致nlogn很难写 在这里说一下O(n*sqrt(n))的做法 首先我们 ...

  7. eclipse的设置和优化

    转载:http://my.oschina.net/zhaoqian/blog/66545 1.eclipse下的编码设置: eclipse 中使用模板新建 JSP,xhtml等 文件时,默认的编码为: ...

  8. windows下编译FreeSwitch

    FreeSWITCH的是一个跨平台的开源电话交换平台 windows版本:win7 64位的操作系统 [下载] 我下载的是release版本,下载的文件是freeswitch-1.4.20.zip,下 ...

  9. SULogger:iOS日志可视化工具

    前言 debug对于咋们程序员来说家常便饭,但有时候我们会遇到一种情况:开发某个功能时,需要在某个特定场景下进行调试,而这个场景并没有MacBook来进行连接debug,偏偏我们需要获得调试时的一些信 ...

  10. 74. Search a 2D Matrix

    题目: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the f ...