搭建本地Ubuntu14.04源
针对公司的网络限制,可以在局域网内搭建一台本地的ubuntu源。
1、修改源配置,换成搜狐源(默认的ubuntu源不如某些国内的源速度快)
vi /etc/apt/source.list
deb trusty main restricted universe multiverse deb trusty-security main restricted universe multiverse deb trusty-updates main restricted universe multiverse deb trusty-proposed main restricted universe multiverse deb trusty-backports main restricted universe multiverse
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 trusty main restricted universe multiverse deb trusty-security main restricted universe multiverse deb trusty-updates main restricted universe multiverse deb trusty-proposed main restricted universe multiverse deb 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 trusty main restricted universe multiverse deb trusty-security main restricted universe multiverse deb trusty-updates main restricted universe multiverse deb trusty-proposed main restricted universe multiverse deb 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 trusty main restricted universe multiverse deb trusty-security main restricted universe multiverse deb trusty-updates main restricted universe multiverse deb trusty-proposed main restricted universe multiverse deb trusty-backports main restricted universe multiverse
本文出自 “破万卷书” 博客,谢绝转载!
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。