debian搭建本地镜像源
1. 安装apt-mirror
apt-get install apt-mirror
2. 配置apt-mirror
vim /etc/apt/mirror.list
2.1 下载目录什么的基础配置建议使用默认。
2.2 deb 配置的是拖库的目标地址 //次配置中选择的是163镜像站。
############# config ##################
#
# set base_path /var/spool/apt-mirror
#
# set mirror_path $base_path/mirror
# set skel_path $base_path/skel
# set var_path $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch <running host architecture>
# set postmirror_script $var_path/postmirror.sh
# set run_postmirror
set nthreads
set _tilde
#
############# end config ############## deb http://mirrors.163.com/debian/ jessie main non-free contrib
deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
3. 拖库
apt-mirror
此例子中的配置共需下载140+个GB的文件。
4. 发布
4.1 安装apache服务器
apt-get install apache2
4.2 链接
ln -s /var/spool/apt-mirror/mirror/mirrors..com/debian /var/www/html/debian
OK,至此apt-mirror服务器搭建完成。
5. 使用
切换至测试机器
5.1 vim /etc/apt/sources.list
#deb http://mirrors.163.com/debian/ jessie main non-free contrib
#deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib
#deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib deb http://192.168.25.138/debian/ jessie main non-free contrib
deb http://192.168.25.138/debian/ jessie-updates main non-free contrib
deb-src http://192.168.25.138/debian/ jessie main non-free contrib
注:192.168.25.138为apt-mirror服务器的地址。
5.2 更新本地配置
apt-get update
5.3 安装测试
apt-get install 测试软件包名
如果识别并安装成功,恭喜你,从此再也不用担心外网网速了。
debian搭建本地镜像源的更多相关文章
- centos 搭建本地YUM源并使用apache共享YUM源
搭建本地YUM源 1.挂载镜像 2.搭建本地YUM源 删除多余repo文件保留一个就行 本地YUM源就搭建好了 yum repolist 查看yum源 3.使用apache共享YUM源 YUM服务器配 ...
- 搭建本地yum源出现:mount: 在 /dev/sr0 上找不到媒体
2021-07-27 在练习环境搭建时,因为是离线环境,故先搭建本地yum源,但是出现了一个往常没有的问题:mount: 在 /dev/sr0 上找不到媒体,参考其他博主的文章得到解决方法. 排查问题 ...
- 搭建本地yum源并定时同步
在生产中内网的机器都是不能访问外网,所以需要搭建本地yum源.以中国科学科技大学的yum源为基准.http://mirrors.ustc.edu.cn/ 有些模块会同步失败,可以wget下载至指定位置 ...
- [Pipy]利用pip2pi搭建本地pypi源
当我们一个团队开发一个项目的时候,须要的Python第三方包基本是固定的.每次搭建新环境的时候总是由于各种内外网,https问题花费大量的时间来安装执行环境. 所以搭建一个本地的,小巧的,仅仅包括须要 ...
- 使用光盘搭建本地yum源
刚装好的系统,想安装一些常用软件和一些包组的时候,就可以使用安装光盘搭建本地yum 第一步:挂载安装光盘 mount /dev/cdrom /mnt 第二步:编辑repo yum源文件 [root@l ...
- 【转载】搭建本地yum源:以下是以centos7为例子
搭建本地yum源:以下是以centos7为例子 1)首先需要安装 createrepo(需要一个可以使用源的机器,可以访问互联网)安装方法可以使用yum安装epel源 1 yum -y instal ...
- 使用光盘无网络搭建本地yum源仓库
目录 一:使用光盘搭建本地yum源 1,按顺序搭建本地yum源 第一步 : 搭载安装光盘 第二步 : 编辑repo yum源文件 第三步 : 检查 yum makecache 注意事项: 一:使用光盘 ...
- 搭建docker镜像仓库(一):使用registry搭建本地镜像仓库
目录 一.系统环境 二.前言 三.使用registry搭建私有镜像仓库 3.1 环境介绍 3.2 k8smaster节点配置镜像仓库 3.3 k8sworker1节点配置从私有仓库上传和拉取镜像 3. ...
- 搭建docker镜像仓库(二):使用harbor搭建本地镜像仓库
目录 一.系统环境 二.前言 三.Harbor 四.使用harbor搭建私有镜像仓库 4.1 环境介绍 4.2 k8smaster节点安装配置harbor 4.2.1 安装harbor离线包 4.2. ...
随机推荐
- 基于webview的选择滑动控件(PC和wap版)
有了webview,大家开发ios或者安卓的app就方便很多啦. 第一可以增量更新: 第二webview可以同时兼容ios和安卓,减少开发量哦. --------------------------- ...
- git设置默认编辑为vim
f you want to set the editor only for Git, do either (you don’t need both): Set core.editor in your ...
- VMware用于Site Recovery Manager 5的vSphere Replication功能一览
http://www.searchstorage.com.cn/showcontent_54838.htm 参考:深度解析SRM 5.0和vSphere Replication http://wenk ...
- Spring Validation 表单校验
最近开发一个项目,发现字段校验比较多,同事提出使用Validation校验能更方便一些,今天记录下来,供以后参考: 一.在pom.xml中添加依赖: <dependency> <gr ...
- 与web有关的小知识
为什么修改了host未生效:http://www.cnblogs.com/hustskyking/p/hosts-modify.html htm.html.shtml网页区别 Vuex简单入门 详说c ...
- MongoDB numa系列问题二:WARNING: You are running on a NUMA machine.
1:Mongod日志warning: mongodb日志显示如下: WARNING: You are running on a NUMA machine. We suggest launching m ...
- JS-json-1
smarty模板要处理成ajax,所以须要又一次拼接一个html来追加节点. 原先smarty的数组如今须要处理成json数据返回了,服务器端的修改比較小: header("Content- ...
- ReactNative踩坑日志——如何实现删除scrollview中的视图
在reactNative中,页面是根据state值的变化来重新渲染的.因此,传统的前端开发中通过 id 来移除一个页面元素的做法在这里不适用. 一般,我们是通过遍历数组或map来渲染出scrollvi ...
- Java通过在主循环中判断Boolean来停止线程
Java代码: package Threads; /** * Created by Frank */ public class StopBoolean extends Thread { // 确保变化 ...
- python模块之imghdr(识别不同格式的图片文件)
# -*- coding: utf-8 -*- #python 27 #xiaodeng #python模块之imghdr(识别不同格式的图片文件) import imghdr '''>> ...