centos7搭建自己的yum源
1. 安装nginx,createrepo
yum install nginx -y
yum install createrepo -y
2. 修改nginx配置文件,/etc/nginx/nginx.conf
location / {
autoindex on;
}
重启nginx, systemctl restart nginx
3. 在nginx根目录建立文件夹
mkdir -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit
4. 准备同步阿里云的源,base,updates,extras,epel, 确保/etc/yum.repos.d/ 下只有下面这两个repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo wget -O /etc/yum.repos.d/CentOS-epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
5. 开始同步下载包
reposync -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/
6. 建仓
createrepo -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/base/Packages
createrepo -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/extras/Packages
createrepo -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/updates/Packages
createrepo -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/epel
7. crontab定时同步
crontab -e
1 2 * * * /usr/bin/reposync -np /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/
参考自:
http://blog.csdn.net/u012402276/article/details/53158682
centos7搭建自己的yum源的更多相关文章
- [转发]centos7搭建自己的yum源
centos7搭建自己的yum源 https://www.cnblogs.com/juandx/p/6136621.html 还是需要学习呢 自己之前记得 查过 但是忘记了. http://w ...
- 基于本地iso 搭建的本地yum源 安装部署openldap
1,yum openldap-servers,openldap-clients 基于iso-cd1搭建的本地yum源(具体搭建参看ruige的repo本地快速搭建,在右边 找找看中输入repo key ...
- CentOS7配置更新国内yum源
备份本地yum源文件 cd /etc/yum.repo.d/ mv CentOS-Base.repo CentOS-Base.repo.bakeup 下载国内yum源 阿里云yum源 wget htt ...
- #centos7 创建内网yum源 OpenStack源部署
#centos7 创建内网yum源#centos7 自动化安装 本地 内网 web源创建.更新 createrepo http OpenStack源部署 Elven原创 http://www.cnbl ...
- CentOS7 配置阿里云yum源,vim编辑器,tab自动补全
1.进入yum的文件夹 命令:cd /etc/yum.repos.d/ 2.下载wget 命令:yum -y install wget 3.删除yum文件夹所有yum源 命令:rm -rf ...
- CentOS7 配置阿里云yum源,非常之简单
1.进入yum的文件夹 命令:cd /etc/yum.repos.d/ 2.下载wget 命令:yum -y install wget 命令:yum install bash-completion ...
- 搭建内网Yum源
搭建内网yum源 阅读(2,238) 一:因内网服务器 众多,当统一安装一些比较大的rpm的时候全部从外网下载就比较慢,而且还占用了一定的出口流量,因此在内网部署了一台yum服务器,将阿里云的epel ...
- CentOS7 配置阿里云yum源
1)下载repo文件 wget http://mirrors.aliyun.com/repo/Centos-7.repo 2)备份并替换系统的repo文件 cp Centos-7.repo /etc/ ...
- Linux 本地yum源搭建和网络yum源搭建
一.本地yum源搭建 首先挂载上光盘 [root@www /]# mount /dev/cdrom /media/cdrom/ 系统默认已经安装了可使用yum的软件包,所以可以直接配置: [root@ ...
随机推荐
- 关于skip_name_resolve参数的总结
作为MySQL调优的一部分,很多人都推荐开启skip_name_resolve.这个参数是禁止域名解析的(当然,也包括主机名).很多童鞋会好奇,这背后的原理是什么,什么情况下开启这个参数比较合适. 基 ...
- MySQL索引下推技术
索引下推整个思路如下: To see how this optimization works, consider first how an index scan proceeds when Index ...
- 学习总结之 WebApi 用户登录和匿名登录,及权限验证
近些天,看了一些博客园大牛关于webApi项目的的文章,也有请教师兄一些问题,自己做了个Demo试了试,收获甚多.感谢感谢,下面是我一些学习的总结,如若有错的地方请多多指教!! WebApi登陆与身份 ...
- 【Java基础】并发
Num1:同步访问共享的可变数据 关键字Synchronized可以保证在同一时刻,只有一个线程可以执行某一个方法,或者某一个代码块.. 同步不仅仅理解为互斥的方式,如果没有同步,一个线程的变化就不能 ...
- 常用查找数据结构及算法(Python实现)
目录 一.基本概念 二.无序表查找 三.有序表查找 3.1 二分查找(Binary Search) 3.2 插值查找 3.3 斐波那契查找 四.线性索引查找 4.1 稠密索引 4.2 分块索引 4.3 ...
- Hibernate —— 映射关联关系
一.映射多对一关联关系. 1.单向的多对一 (1)以 Customer 和 Order 为例:一个用户可以发出多个订单,而一个订单只能属于一个客户.从 Order 到 Customer 是多对一关联关 ...
- LocalDB在IIS中的运行失败
Using LocalDB with Full IIS, Part 1: User Profile http://blogs.msdn.com/b/sqlexpress/archive/2011/12 ...
- 自己封装的Windows7 64位旗舰版,微软官网上下载的Windows7原版镜像制作,绝对纯净版
MSDN官网上下载的Windows7 64位 旗舰版原版镜像制作,绝对纯净版,无任何精简,不捆绑任何第三方软件.浏览器插件,不含任何木马.病毒等. 集成: 1.Office2010 2.DirectX ...
- DevExtreme 学习应用[1]
DevExtreme学习开发 [1] 用HTML开发手机应用,看一哈帮助文档觉得还很不错. 在开发前一定要安装DevExteme 下载连接地址: ftp://211.101.1.108/DevExp ...
- linux使用心得(持续更新)
! 查看发行版本信息 lsb_release -a uname -a 以下方法只适合redhat和centos cat /etc/redhat-release rpm -q redhat-rele ...