搭建本地Ubuntu14.04源
2015-02-06 09:47
417 查看
针对公司的网络限制,可以在局域网内搭建一台本地的ubuntu源。
1、修改源配置,换成搜狐源(默认的ubuntu源不如某些国内的源速度快)
vi /etc/apt/source.list
apt-get install -y apt-mirror
3、配置apt-mirror工具
vi /etc/apt/mirrors.list
这里只下载了64位的二进制文件
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 multivers2、安装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[/code]4、开始下载,速度取决于网速(大概有75G) apt-mirror
5、作为本机源
源路径在 /var/spool/apt-mirror/mirror/mirrors.sohu.com/ubuntu
vi /etc/apt/sources.listdeb 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 multiverse6、作为局域网源
安装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.listdeb 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源
- Ubuntu10.04制作官方源镜像以及搭建本地源
- ubuntu 搭建php本地开发环境
- 本地搭建Hadoop伪分布式环境之三:FlashFXP上传文件到Ubuntu
- 获取镜像源来搭建本地Ubuntu14.04源
- 虚拟化:搭建本地虚拟化环境和安装ubuntu操作系统
- Ubuntu Server搭建FTP服务器(2) --本地用户FTP服务器架设
- 本地搭建ubuntu
- 在Ubuntu系统中搭建本地openstack(icehouse)源
- ubuntu 14.04(trusty)下搭建本地docker regestry
- 基于本地Ubuntu主机的Hadoop系统环境搭建
- ubuntu12.04本地搭建ubuntu更新源
- jekyll本地环境搭建(Ubuntu 12.04)
- 使用ubuntu搭建wordpress本地环境
- 本地搭建Hadoop伪分布式环境之二:XShell连接Ubuntu
- Ubuntu10.04制作官方源镜像以及搭建本地
- 搭建本地Ubuntu 镜像服务器
- ubuntu本地搭建网站服务器——lamp
- 在Ubuntu 14.04 64bit上搭建单机本地节点Spark 1.3.0环境
- 在ubuntu上搭建GitLab本地服务器