Make a local Ubuntu mirror station (native package source mirror site)

Source: Internet
Author: User

The lab room builds high availability Openstack environment, in order to ensure the security of the intranet, we use the Jumpbox way to access the internal server. Such internal

Node can not access the network, the installation of the package is not very convenient, so on the Jumpbox to make an Ubuntu full mirror station.

sudo apt-get install apache2sudo apt-get Install Apt-mirror

Apt-mirror is the mirror tool, Apache2 is designed to provide HTTP services to LAN servers

1. Configure/etc/apt/mirror.list

Create a new directory to store the package, before downloading enough controls, trusty all the packages and SRC altogether need about 140G

# Mkdir/mnt/trusty-repositor
# vim/etc/apt/mirror.list

############# Config ##################
#
Set Base_path/mnt/trusty-repository #设置根目录
#
# 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 0
Set Nthreads 20
Set _tilde 0
#
############# End Config ##############
########## #ubuntu 14.04 Software source
Deb Http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
Deb Http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
Deb Http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
##########################################
#deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
##########################################
#deb http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
################### #ubuntu src Source
DEB-SRC http://archive.ubuntu.com/ubuntu trusty main restricted universe Multiverse #磁盘空间不足, do not need source code, can not download, almost halved
DEB-SRC http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
DEB-SRC http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
######################################
#deb-src http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
#clean Http://ubuntu-cloud.archive.canonical.com/ubuntu Trusty-updates/juno Main
#clean Http://archive.ubuntu.com/ubuntu
Clean Http://archive.ubuntu.com/ubuntu

2. Configure Apache2

The default home directory used to Apache2 is/var/www

#vim/etc/apache2/sites-available/000-default.conf

Documentroot/var/www can be customized to the directory you want

#ln-S/mnt/trusty-repository/var/www/ubuntu
#ln-S/mnt/trusty-repository/mirror/archive.ubuntu.com/var/www/ubuntu

3. Configure source.list at the LAN client

#vim/etc/apt/source.list

Delete Other, add a row

Deb Http://10.74.15.13/ubuntu/ubuntu trusty main restricted universe multiverse

#vim apt-get Update

Make a local Ubuntu mirror station (native package source mirror site)

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.