1.1 将镜像复制到本地创建yum源

    1、将准备好的系统镜像放到指定的目录,本次目录指定在:/dawnfs/sourcecode
    2、创建挂载目录:mkdir /mnt/yum
    3、挂载镜像: mount -o loop /dawnfs/sourcecode/rhel-server-6.2-x86_64-dvd.iso /mnt/yum挂载完成后,使用 df -h来检查挂载是否成功:

    4、修改/etc/yum.repos.d/local.repo文件

[local]
name = Red Hat Yum Name
baseurl=file:///aaa/CentOS-7.3-x86_64-DVD-1611
enabled=1
gpgcheck=0

local.repo

    ps:原文件中enabled=0,gpgcheck=1.修改成enable=1,gpgcheck=0。否则输入 yum grouplist 命令时会报错
    5、清除原来的yum: yum clean all
    6、检查软件列表:yum list
    7、查看yum组:yum grouplist
    8、安装yum组,以安装Desktop为例: yum install -y "Desktop"

1.2 将windows共享挂载到centos 7.3中并配置yum源

  1、临时挂载windows共享

      mount.cifs  //1.1.1.100/share  /aaa  -o  user=tom,pass=1

  2、配置yum源文件

[local]
name = Red Hat Yum Name
baseurl=file:///aaa/CentOS-7.3-x86_64-DVD-1611
enabled=1
gpgcheck=0

local.repo

1.3 配置centos网路yum源

  cd /etc/yum.repos.d

# CentOS-Base.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 - mirrors.ustc.edu.cn
baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 #released updates
[updates]
name=CentOS-$releasever - Updates - mirrors.ustc.edu.cn
baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 #additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.ustc.edu.cn
baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 #packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons - mirrors.ustc.edu.cn
baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/addons/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5 #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.ustc.edu.cn
baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 #contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - mirrors.ustc.edu.cn
baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5

CentOS5-Base.repo

# CentOS-Base.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 - mirrors.ustc.edu.cn
baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6 #released updates
[updates]
name=CentOS-$releasever - Updates - mirrors.ustc.edu.cn
baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.ustc.edu.cn
baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.ustc.edu.cn
baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - mirrors.ustc.edu.cn
baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6

CentOS6-Base.repo

# CentOS-Base.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://mirrors.ustc.edu.cn/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #released updates
[updates]
name=CentOS-$releasever - Updates
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

CentOS7-Base.repo

1.4 yum常用命令

   yum provides */kinit                    # 列出kinit命令使用哪个安装包

05: 配置yum源的更多相关文章

  1. linux配置yum源、mount及yum命令

    配置yum源:  在/mnt目录下新建一个空的目录,名为rhel. [root@localhost mnt]# mkdir rhel 然后 [root@localhost Packages]# cd ...

  2. RHEL 7.0 本地配置yum源

    RHEL 7.0 本地配置yum源  yum简介  yum = Yellow dog Updater, Modified 主要功能是更方便的添加/删除/更新RPM包. 它能自动解决包的倚赖性问题. 它 ...

  3. CentOS7.1 JDK安装 和 CentOS7.1配置yum源

    1.卸载自带OPENJDK #查看自身jdk java -verson #查看自身安装的java  rpm -qa | grep java #显示如下 python-javapackages-3.4. ...

  4. linux配置yum源

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

  5. RedHat 6配置yum源为网易镜像(转)

    概述 由于版权的问题,RedHat6不能直接使用yum一些指令,需要配置yum源为网易镜像,但是网上谈到很多:整理一下,将有用的信息整理如下,以便于能够为其他的配置服务配置使用:需要卸载掉原理系统自带 ...

  6. Linux 配置yum源.

    Linux 配置yum源. 环境:虚拟机中安装了RedHat ,在进行安装mariadb的时候,出现如下错误.是因为yum源的问题,需要进行配置yum源.本教程是配置本地yum源. [root@loc ...

  7. redhat 配置yum源(配置163 yum repo)

    一般安装好redhat后,不能注册的话,不能使用系统自带的yum源.但是我们可以自己配置yum源来解决这一问题.下面介绍下redhat配置163yum源. 1) 查看版本号和系统类别: cat /et ...

  8. 克隆虚拟机及配置yum源的步骤及讲解(Hadoop基础)

    1.克隆虚拟机 找一台需要克隆的虚拟机但虚拟机必须在关机下进行,(建议将前期Linux环境 配置完成) 在VMware中右键虚拟机找到克隆的选项.   点击克隆 可以克隆他的快照(提前做快照)或者是克 ...

  9. centos 配置yum源

    1.yum配置 yum的配置文件在  /etc/yum.conf [root@mini ~]# cat /etc/yum.conf [main] cachedir=/var/cache/yum/$ba ...

随机推荐

  1. numpy.ndarray的赋值操作

    mat=zeros((3,4)) #生成一个3行4列全部元素为0的矩阵 mat[1,:]=111 #从第1行第0列开始,一直到最后一列,赋值为1,效果与mat[1,0:3]相同,前置0可以省略,最后的 ...

  2. POJ 1180 - Batch Scheduling - [斜率DP]

    题目链接:http://poj.org/problem?id=1180 Description There is a sequence of N jobs to be processed on one ...

  3. TensorFlow 度量张量和张量或者和零之间的误差值

    用于一个回归任务或者正则问题 # l2损失,output= sum(x ** 2)/2 inputdata = tf.Variable(np.random.rand(2,3), dtype=np.fl ...

  4. POJ_2019_Cornfields

    Cornfields Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 7444   Accepted: 3609 Descri ...

  5. Drip is a launcher for the Java Virtual Machine that provides much faster startup times than the java command. The drip script is intended to be a drop-in replacement for the java command, only faster

    小结: 1.初始化jvm: 2.第一次唤醒java命令不快,后续快: https://github.com/elastic/logstash Advanced: Drip Launcher Drip  ...

  6. numpy中np.nan(pandas中NAN)

    转自:http://blog.csdn.net/xiaodongxiexie/article/details/54352889 在处理数据时遇到NAN值的几率还是比较大的,有的时候需要对数据值是否为n ...

  7. PLSQL developer开发工具相关配置

    首先要安装ORACLE Windows版本32位的客户端,在这里只安装ORACLE客户端就可以了,服务端我们选择使用LINUX版本的. 选择不接受安全更新 选择仅安装数据库软件 选择单实例数据库 语言 ...

  8. Mysql 时间类型精度截取的bug

    mysql-connector-java版本升级出现的一次问题.涉及到了时间精度的截取和四舍五入. 首先了解一点,timestamp,datetime如果不指定精度,默认的精度是秒. 当mysql-c ...

  9. Flip Game---poj1753(状压+bfs)

    题目链接:http://poj.org/problem?id=1753    题意:是有一个4X4的图,b代表黑色,w代表白色,问最少翻转几次可以把所有的点变成白色或者黑色,每次翻转一个点时,可以把它 ...

  10. post方式提交数据

    <!DOCTYPE HTML><html>    <head>        <meta charset="utf-8" />   ...