获取镜像源来搭建本地Ubuntu14.04源
来源:互联网 发布:算账软件 编辑:程序博客网 时间:2024/05/21 22:51
针对公司的网络限制,可以在局域网内搭建一台本地的ubuntu源。
1、修改源配置,换成搜狐源(默认的ubuntu源不如某些国内的源速度快)
vi /etc/apt/source.list
deb http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multivers
2、安装apt-mirror工具
apt-get install -y apt-mirror
3、配置apt-mirror工具
vi /etc/apt/mirrors.list
这里只下载了64位的二进制文件
set nthreads 20
set _tilde 0
deb http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse
clean http://mirrors.sohu.com/ubuntu
4、开始下载,速度取决于网速(大概有75G)
apt-mirror
5、作为本机源
源路径在 /var/spool/apt-mirror/mirror/mirrors.sohu.com/ubuntu
vi /etc/apt/sources.list
deb file:///var/spool/apt-mirror/mirror/mirrors.sohu.com/ubuntu trusty main restricted universe multiverse
deb file:///var/spool/apt-mirror/mirror/mirrors.sohu.com/ubuntu trusty-security main restricted universe multiverse
deb file:///var/spool/apt-mirror/mirror/mirrors.sohu.com/ubuntu trusty-updates main restricted universe multiverse
deb file:///var/spool/apt-mirror/mirror/mirrors.sohu.com/ubuntu trusty-proposed main restricted universe multiverse
deb file:///var/spool/apt-mirror/mirror/mirrors.sohu.com/ubuntu trusty-backports main restricted universe multiverse
6、作为局域网源
安装apache2
apt-get install apache2
将镜像目录链接到apache2的根目录(/var/www/html/)下
ln -s /var/spool/apt-mirror/mirror/mirrors.sohu.com/ubuntu /var/www/html/ubuntu
7、修改局域网ubuntu内源配置为该主机ip
vi /etc/apt/sources.list
deb http://x.x.x.x/ubuntu trusty main restricted universe multiverse
deb http://x.x.x.x/ubuntu trusty-security main restricted universe multiverse
deb http://x.x.x.x/ubuntu trusty-updates main restricted universe multiverse
deb http://x.x.x.x/ubuntu trusty-proposed main restricted universe multiverse
deb http://x.x.x.x/ubuntu trusty-backports main restricted universe multiverse
- 获取镜像源来搭建本地Ubuntu14.04源
- 获取镜像源来搭建本地Ubuntu14.04源
- Ubuntu14.04搭建LXR本地服务器阅读Linux内核代码
- ubuntu14.04搭建samba
- Ubuntu14.04搭建ftp
- ubuntu14.04环境搭建
- ubuntu14.04搭建samba
- ubuntu14.04搭建LAMP
- Ubuntu14.04 搭建FTP
- Ubuntu14.04 jsoncpp搭建
- ubuntu14.04 搭建ftp
- Ubuntu14.04搭建WordPress
- ubuntu14.04 nfs 搭建
- Ubuntu14.04 搭建FTP
- ubuntu14.04下利用pypi-server搭建本地的pip库
- 本地Ubuntu14.04虚拟机搭建fbctf线上CTF比赛平台教程
- Ubuntu14.04 LAMP环境搭建
- ubuntu14.04 搭建svn服务
- Android 异常 [INSTALL_FAILED_NO_MATCHING_ABIS]
- CSSS书写规范
- 一种简单的利用文本扫描类写的猜数字游戏
- TextView 上下默认有留白
- logback配置按照大小滚动
- 获取镜像源来搭建本地Ubuntu14.04源
- MVC 自定义异常错误页需要注意的地方
- Linux笔记(49)——正则表达式与字符命令
- 原生javascript 简易实现放大镜效果
- 无法打开包括文件: “extensions/ExtensionExport.h”: No such file or directory
- 本地下载的软件包制作成本地repo源并使用apache发布
- 上下机消费时间+职责链模式
- RPC
- 付款问题