本地yum源搭建

cd源  mount /dev/sr0 /mnt

vim  /etc/yum.repos.d/base.repo

[centos-base]
name=centos7
#baseurl=file:///var/www/html/centos/
baseurl=file:///mnt
enabled=1
gpgcheck=0

yum clean all

yum makecache

yum repolist

iso源  mount -o loop centos7.4.iso /mnt  同上

http源  服务端:cp  -R  /mnt/*  /var/www/html/centos

createrepo /var/www/html/centos

yum install -y httpd

ps -ef |grep httpd && netstat -antup |grep 80

getenforce 0 && systemctl stop firewalld.service

客户端:vim /etc/yum.repos.d/base.repo

[centos-base]
name=centos7
baseurl=http://192.168.0.1/centos/
enabled=1
gpgcheck=0

yum clean all

yum makecache

yum repolist

同步外网yum源

使用reposync工具可以同步几乎所有的yum源,同步外网yum源软件至本地

wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

mv  CentOS7-Base-163.repo  /etc/yum.repos.d/centos.repo

yum clean all

yum makecache

安装reposync工具

yum install -y createrepo

通过reposync命令工具获取外网yum源所有软件包,-r指定repolist id,默认不加-r表示获取玩玩所有yum软件包,-p 指定下载软件的路径

reposync  -r base -p /var/www/html/centos/

reposync  -r updates -p /var/www/html/centos/

通过createrepo命令更新本地yum仓库源

createrepo /var/www/html/centos/

修改本地yum源配置文件

vim centos.repo

centos-base]
name=centos7
baseurl=file:///var/www/html/centos/
#baseurl=file:///mnt
enabled=1
gpgcheck=0

yum仓库源搭建的更多相关文章

  1. yum仓库客户端搭建和NTP时间同步客户端配置

    一.yum仓库客户端搭建 yum源仓库搭建分为服务器端和客户端. 服务端主要提供软件(rpm包)和yumlist.也就是提供yum源的位置.一般是通过http或者ftp提供位置. 客户端的配置:yum ...

  2. Linux Yum仓库源配置

    Yum概念:Yum软件仓库的作用是为了进一步简化RPM管理软件的难度以及自动分析所需软件包及其依赖关系的技术 Yum配置仓库源放置位置:/etc/yum.repo.d/ :配置文件需以 .repo 结 ...

  3. cobbler搭建本地的yum仓库源

    cobbler自动化安装参考文档 https://www.cnblogs.com/minseo/p/8537266.html 使用cobbler可以快速搭建一个本地的yum仓库 cobbler rep ...

  4. [How to]基于本地镜像的yum镜像源搭建

    1.简介 本文介绍如何在封闭环境(无外网)下安装离线安装本地镜像与基于本地镜像的yum镜像源. 2.环境版本交代: OS:CentOS-6.7-x86_64-minimal yum: yum-3.2. ...

  5. 本地yum仓库的搭建

    . 1.直接断开网络,模拟生产内网环境 2.将原先的网络yum仓库全部移动到 backup目录下 3.创建本地yum仓库  local_yum.repo vi /etc/yum.repos.d/loc ...

  6. 设置centos的yum仓库源为阿里源

    前提 使我们的主机能够连接到外网 cd /etc/yum.repos.d/ #切换到yum仓库目录下 rm -rf * #删除默认配置仓库 wget -O /etc/yum.repos.d/CentO ...

  7. 从建立yum仓库到搭建ftp以及http服务

    1 什么是yum仓库 yum工作需要依赖C/S架构工作模式的文件服务器,服务器中存放了yum工作时所需的程序包.yum接收到需要安装的程序包的名称之后,通过文件共享协议(或者文件传输协议),在配置文件 ...

  8. YUM仓库的搭建方式

    搭建YUM仓库 通俗的讲,实际上就是创建一个链接,将一堆可用于Linux系统安装的数据包用一种链接的方式给Linux系统读取,方法步骤如下: 一.找到可用的yum软件包的位置 二.创建挂载点提供访问y ...

  9. Linux小项目/rhel-基于同步官网yum仓库数据搭建本地yum服务器

    本文的实验环境:aws上的Redhat 7.x , 同样也适用于Centos 7.x 简单说主要分为三步: (1) 向官网同步yum数据,可以根据具体情况,创建脚本及配置周期例行任务  (2) 搭建w ...

随机推荐

  1. __x__(42)0910第六天__表格布局 老旧的布局方法

    table 布局 不易于维护,耦合太严重了. 不利于搜索引擎检索. 效果图: html代码: <!doctype html> <html> <head> <m ...

  2. (66)Wangdao.com第十一天_JavaScript 数组Array

    数组 Array 本质上,数组属于一种特殊的对象.typeof 运算符会返回数组的类型是 object 数组的特殊性体现在,它的键名是按次序排列的一组整数(0,1,2...) // Object.ke ...

  3. mobile_轮播图_style_left 版本

    mobile 轮播图 小圆点逻辑(排他) 1. 统一给所有 span 元素加 class=""; 2. 切换到谁,谁的 class="active"; 移动端轮 ...

  4. [LeetCode] Implement Rand10() Using Rand7() 使用Rand7()来实现Rand10()

    Given a function rand7 which generates a uniform random integer in the range 1 to 7, write a functio ...

  5. 变量类型-String

    教程:一:字符串的创建 用单引号.双引号括起来,同时用转义字符转义 二:字符串的索引 变量[头标:尾标]    从前到后:0---end    从后到前:-1---->-len(str)三:获取 ...

  6. 壁虎书3 Classification

    MNIST fetch_openml returns the unsorted MNIST dataset, whereas fetch_mldata() returned the dataset s ...

  7. NetBeans GUI tests on Jenkins + Windows (转)

    from http://forgetfulprogrammer.wordpress.com/tag/interact-with-desktop/ Running NetBeans applicatio ...

  8. boot跳转到app后,中断不起作用的原因

    boot跳转到app后 osKernelStart()之前,中断有问题,不起作用 原因是因为boot跳转之前__disable_irq(); 跳转到APP后,并不是一切从头开始,__disable_i ...

  9. GridFS and Geospatial

    GridFS - specification for storing and retrieving large files... images,audio file, video files... F ...

  10. 隐藏input光标和输入内容方法

    text-indent: -999em; // 隐藏input文字margin-left: -100%;// 隐藏input光标