Linux ubuntu local mirror software source Authoring method

Source: Internet
Author: User

1, the configuration of the current software source, the image is very large, so the first to configure the fast download software source HTTP://FFFO.BLOG.163.COM/BLOG/STATIC/2119130682014322104136601/2, install the image software and To modify a mirror parameter file
1), install Apt-mirror
sudo apt-get install Apt-mirror
2), modify Mirror.list
sudo gedit/etc/apt/mirror.list
The contents of the file are as follows:
—————————————— Reference begins ——————————————————
############# Config ##################
#
# set BASE_PATH/VAR/SPOOL/APT-MIRROR [Mirror Store directory location, can be changed according to disk capacity situation]
#
# If you change the base path to must create the directories below with write privileges
#
# 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 Nthreads 3 [download process, default 20, recommendation 3]
Set _tilde 0
#
############# End Config ##############

#镜像 64-bit 2-pack (personal enough)
Deb Http://mirrors.163.com/ubuntu/trusty main restricted universe multiverse
Deb Http://mirrors.163.com/ubuntu/trusty-security main restricted universe multiverse
Deb Http://mirrors.163.com/ubuntu/trusty-updates main restricted universe multiverse
Deb http://mirrors.163.com/ubuntu/trusty-proposed main restricted universe multiverse
Deb Http://mirrors.163.com/ubuntu/trusty-backports main restricted universe multiverse
# Mirror 64-bit source (enterprise)
DEB-SRC http://mirrors.163.com/ubuntu/trusty main restricted universe multiverse
DEB-SRC http://mirrors.163.com/ubuntu/trusty-security main restricted universe multiverse
DEB-SRC http://mirrors.163.com/ubuntu/trusty-updates main restricted universe multiverse
DEB-SRC http://mirrors.163.com/ubuntu/trusty-proposed main restricted universe multiverse
DEB-SRC http://mirrors.163.com/ubuntu/trusty-backports main restricted universe multiverse
#镜像 32-bit 2-in-one package (enterprise)
deb-i386 http://mirrors.163.com/ubuntu/trusty main restricted universe multiverse
deb-i386 http://mirrors.163.com/ubuntu/trusty-security main restricted universe multiverse
deb-i386 http://mirrors.163.com/ubuntu/trusty-updates main restricted universe multiverse
deb-i386 http://mirrors.163.com/ubuntu/trusty-proposed main restricted universe multiverse
deb-i386 http://mirrors.163.com/ubuntu/trusty-backports main restricted universe multiverse
# Mirror 32-bit source code (I often show storage)
DEB-I386-SRC http://mirrors.163.com/ubuntu/trusty main restricted universe multiverse
DEB-I386-SRC http://mirrors.163.com/ubuntu/trusty-security main restricted universe multiverse
DEB-I386-SRC http://mirrors.163.com/ubuntu/trusty-updates main restricted universe multiverse
DEB-I386-SRC http://mirrors.163.com/ubuntu/trusty-proposed main restricted universe multiverse
DEB-I386-SRC http://mirrors.163.com/ubuntu/trusty-backports main restricted universe multivers


Deb Http://archive.ubuntu.com/ubuntu jaunty main restricted universe Multiverse
Deb/http Archive.ubuntu.com/ubuntu jaunty-updates main restricted universe Multiverse
Deb Http://archive.ubuntu.com/ubuntu Jaunty-backports main restricted universe Multiverse
Deb Http://archive.ubuntu.com/ubuntu jaunty-security Main Restricted universe Multiverse
Deb Http://archive.ubuntu.com/ubuntu jaunty-proposed main restricted universe Multiverse
Deb Http://archive.ubuntu.org.cn/ubuntu-cn/jaunty main restricted universe multiverse
[Apt software source address to be mirrored, select a faster official source or domestic source]

#deb-src http://archive.ubuntu.com/ubuntu Jaunty main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu jaunty-updates main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu jaunty-backports main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu jaunty-security main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu jaunty-proposed main restricted universe multiverse
[Do not need source code, use # for address masking]

Clean Http://archive.ubuntu.com/ubuntu
Clean HTTP://ARCHIVE.UBUNTU.ORG.CN/UBUNTU-CN
[Compare local image and software source when mirroring is complete]
—————————————— End of reference ——————————————————
3. Create the Mirror root directory
Mkidr/var/spool/apt-mirror
4, start mirroring (support for the continuation of the breakpoint, any interruption will not be affected)
1) sudo apt-mirror
Timed execution of the above command, can achieve the effect of timing synchronization remote Warehouse
2) Clean up redundant files after mirroring is completed
sudo/var/spool/apt-mirror/var/clean.sh

5, use local source
cd/etc/apt
sudo mv source.list source.list.bak
sudo vim source.list
Add the following
Deb file:/data/ Apt-mirror/mirror/mirrors.163.com/ubuntu Trusty main restricted universe Multiverse
Deb file:/data/apt-mirror/ Mirror/mirrors.163.com/ubuntu trusty-security main restricted universe Multiverse
Deb file:/data/apt-mirror/ Mirror/mirrors.163.com/ubuntu trusty-updates main restricted universe Multiverse
Deb File:/data/apt-mirror/mirror /mirrors.163.com/ubuntu trusty-proposed main restricted universe Multiverse
Deb file:/data/apt-mirror/mirror/ Mirrors.163.com/ubuntu trusty-backports main restricted universe multiverse

Deb File:///var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/jaunty main restricted universe multiverse
Deb File:///var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/jaunty-backports restricted universe Multiverse
Deb file:///var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/jaunty-proposed main restricted universe Multiverse
Deb file:///var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/jaunty-security main restricted Universe Multiverse
Deb File:///var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/jaunty-updates main Restricted universe Multiverse
Deb File:///var/spool/apt-mirror/mirror/archive.ubuntu.org.cn/ubuntu-cn/jaunty Main Restricted universe multiverse

6. Publish to LAN
1) Install Apache2
sudo apt-get install apache2
2) Establish a symbolic connection to connect the image to the Apache virtual directory.
sudo ln-s/var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu//var/www/ubuntu
sudo ln-s/VAR/SPOOL/APT-MIRROR/MIRROR/ARCHIVE.UBUNTU.ORG.CN/UBUNTU-CN/VAR/WWW/UBUNTU-CN
3) Modify the Sources.list file for each user in the LAN
Cd/etc/apt
sudo mv Source.list Source.list.bak
sudo vim source.list
Add the following:
Deb Http://192.168.0.10/ubuntujaunty main restricted universe multiverse
Deb Http://192.168.0.10/ubuntu jaunty-backports restricted universe multiverse
Deb Http://192.168.0.10/ubuntu jaunty-proposed main restricted universe multiverse
Deb Http://192.168.0.10/ubuntu jaunty-security main restricted universe multiverse
Deb Http://192.168.0.10/ubuntu jaunty-updates main restricted universe multiverse
Deb HTTP://192.168.0.10/UBUNTU-CN jaunty main restricted universe multiverse

Linux ubuntu local mirror software source Authoring method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.