1.官方软件仓库的建立          1.1.需要一个与本机匹配的安装镜像            例如:rhel-server-7.0-x86_64-dvd.iso,这个文件从官方网站下载得到       1.2挂载,让系统能够读取rhel-server-7.0-x86_64-dvd.iso中的内容                1.2.1 配置文件挂载           vim /etc/fstab/xxx/rhel-server-7.0-x86_64-dvd.iso    /xxx    iso9660    ro,relatime    0   0  镜像文件           挂在点    类型    挂载参数    备份    检测                1.2.2命令挂载                  #mount  /xxx/rhel-server-7.0-x86_64-dvd.iso     /xxx            mount -a  ###查看挂载详情                    1.3.编写软件仓库的指定文件/etc/yum.repos.d    ##仓库指向文件存储目录vim /etc/yum.repos.d/test.repo    ###仓库指向文件[redhatsoftware]        ###仓库名称name=localsoftware        ###仓库描述baseurl=file:///source        ###仓库地址gpgcheck=1|0            ###是否检测软件的gpgkeyenabled=1            ###此仓库在系统中生效gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release                                 ##本机gpgkey文件yum yum clean all            ###刷新仓库配置          1.4.网络yum源的配置yum install httpdsystemctl stop firewalldsystemctl start httpdsystemctl enable httpdvim /etc/fstab       ###卸载原有挂载,建立新网络yum源挂载/xxx/rhel-server-7.0-x86_64-dvd.iso     /var/www/html/source                                                                       iso9660 ro,relatime     0       0vim /etc/yum.repos.d/test.repo    ###仓库指向文件 mount -a yum 源:http://当前主机/source 安装firefox后不能输入汉字处理。    # yum groups install Input\mode.... 2.脚本完成yum仓库配置先创建/iso目录,把镜像放在里面 #!/bin/bash#############create  local  yumsoure ###########################mount /iso/rhel-server-7.0-x86_64-dvd.iso  /mntrm -rf /etc/yum.repos.d/* cat > /etc/yum.repos.d/yum.repo <
>/etc/fstabmount -a########### mode local yumsoure ########################cat > /etc/yum.repos.d/yum.repo<