zoukankan      html  css  js  c++  java
  • CentOS 7 安装与yum源

    CentOS 7 的安装:

    使用powerISO将centos 7 镜像写入U盘。

    使用U盘启动即可安装。

     

    CentOS 7添加第三方yum源:

    EPEL源:

    键入指令:yum install epel*

    查看是否安装成功:yum repolist

    一般有类似如下输出:

    repo id repo name status
    base/7/x86_64 CentOS-7 - Base 8,465
    epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 7,192
    extras/7/x86_64 CentOS-7 - Extras 104
    google-chrome google-chrome 3
    google64 Google - x86_64 3
    updates/7/x86_64 CentOS-7 - Updates 1,668
    repolist: 17,435

     

    REMI源:

    下载REMI
    http://rpms.famillecollet.com/

    vim remi.repo 将[remi] 中的 enabled=0 改成 enabled=1 来启用 remi 源 

    rpmforge源:

    下载rpmforge:

    见:Centos wiki

    在   http://apt.sw.be/redhat/el7/en/x86_64/rpmforge/RPMS/ 下搜索关键字rpmforge (在网页中搜索,快捷键为CTR-F) ,下载对应rpm包。

    导入GPG key :  rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

    rpmfusion源:

    进入  http://rpmfusion.org/Configuration ,下载对应版本的rpm包安装。

     其他较为少用的yum源:

    Nux's repos:      http://li.nux.ro/repos.html  (这个源应该为个人或小众人员维护,最好用于个人娱乐。)

     rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro

    rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm

    ATrpms:

    http://atrpms.net/ 

    LON-CAPA

    安装yum-priorities插件:yum install yum-plugin-priorities.noarch   (在centos7中似乎可以不用安装,也可不配置)

    当完成上面yum源的安装后,分别对/etc/yum.repos.d/ 下后缀为.repo的文件内容进行更改,

    一般系统自带的.repo文件中priority=1,第三方yum源形成的.repo文件priority大于10。

    例如:

    CentOS-Base.repo(系统自带的.repo文件)
    #
    # The mirror system uses the connecting IP address of the client and the
    # update status of each mirror to pick mirrors that are updated to and
    # geographically close to the client. You should use this for CentOS updates
    # unless you are manually picking other mirrors.
    #
    # If the mirrorlist= does not work for you, as a fall back you can try the 
    # remarked out baseurl= line instead.
    #
    #

    [base]
    name=CentOS-$releasever - Base
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
    #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
    priority=1

    #released updates 
    [updates]
    name=CentOS-$releasever - Updates
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
    #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

    priority=1

    ...................

    [rpmfusion-free-updates](第三方源形成的.repo文件)
    name=RPM Fusion for EL 6 - Free - Updates
    #baseurl=http://download1.rpmfusion.org/free/el/updates/6/$basearch/
    mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-el-updates-released-6&arch=$basearch
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-el-6

    priority=14
    [rpmfusion-free-updates-debuginfo]
    name=RPM Fusion for EL 6 - Free - Updates Debug
    #baseurl=http://download1.rpmfusion.org/free/el/updates/6/$basearch/debug/
    mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-el-updates-released-debug-6&arch=$basearch
    enabled=0
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-el-6

    priority=14

    .............................

  • 相关阅读:
    线程访问ui,托管
    获取当前线程id
    线程访问ui,使用委托方式
    python的reflect反射方法
    python读写Excel文件(xlrd、xlwr)
    基于python+selenium的框架思路(二)
    基于python+selenium的框架思路
    python之sys.argv
    Django ajax方法提交表单,及后端接受数据
    jenkins+checkstyle
  • 原文地址:https://www.cnblogs.com/jiahu-Blog/p/4278882.html
Copyright © 2011-2022 走看看