Apt Local source build (can be used for LAN Apt-get source or local source) This document describes the use of Apt-mirror software to build apt local source requirements: Intranet development environment for its specific reasons can not Sisu network, So we need the local intranet source to make it easy for developers to download and install software recommendations: Use a single disk to store source files or separate directories to avoid confusion
server-side configuration
1, installation Apt-mirror
Apt-get Install Apt-mirror
2. Modify the Apt-mirror configuration file
Vim/etc/apt/mirror.list
refer to the following configuration file: Empty the original configuration file and use the following configuration file directly
############# Config ################### the contents of the following comments are the default configuration, if you need to customize, uncomment the modification can set base_path/var/spool/apt-mirror## image file # Set Mirror_path $base _path/mirror# Temporary index download file directory, that is, the file stored in the Dists directory of the Software repository (default) # set Skel_path $base _path/skel# configuration log (default) # Set Var_path $base _path/var# Clean Script Location # set Cleanscript $var _path/clean.sh# schema Configuration, I386/AMD64, by default will download source set of the same schema as native Defaultarch amd64# Set Postmirror_script $var _path/postmirror.sh# set run_postmirror 0# number of download threads set nthreads 20set _tilde 0## ############ End config ############### Ali Yun (no source added deb-src here) Deb Http://mirrors.aliyun.com/ubuntu/trusty main Restricted Universe multiversedeb http://mirrors.aliyun.com/ubuntu/trusty-security main restricted universe Multiversedeb http://mirrors.aliyun.com/ubuntu/trusty-updates main restricted universe Multiversedeb/HTTP mirrors.aliyun.com/ubuntu/trusty-proposed main restricted universe Multiversedeb http://mirrors.aliyun.com/ubuntu/ Trusty-backports main restricted universe multiverse clean http://mirrors.aliyun.com/ubuntu
3. Start Syncing
Executive Apt-miiror
And then wait for a long time (the image about 100G, the specific time to see the network environment), the synchronized image file directory is/var/spool/apt-mirror/mirror/mirrors.aliyun.com/ubuntu/, of course, if additional sources , there are other directories under the/var/spool/apt-mirror/mirror directory with the name of the address.
4, installation apache2
Apt-get Install Apache2
Since Apache2 's default Web page file directory is located in/var/www/html, you can make a soft link (so that we can access it directly, without having to import it directly into the directory)
Ln-s/var/spool/apt-mirror/mirror/mirrors.aliyun.com/ubuntu/var/www/html/ubuntu
You can then access it through the following address
Http://[host]:[port]/ubuntu #ip和port是自己本机的, where the port defaults to 80
In the test may encounter can not open the situation, to see whether the iptables rule is limited or selinux problem (this is believed that everyone in the study of LANMP has been known)
Client Configuration:1, edit/etc/apt/source.list, add the following content
# Local Source #ip和port是自己本机的, where port defaults to"Arch=amd64" http://[host]:[port]/ubuntu/trusty main restricted Universe Multiversedeb [ARCH=AMD64] http://[host]:[port]/ubuntu/trusty-security main restricted universe Multiversedeb [ARCH=AMD64] http://[host]:[port]/ubuntu/trusty-updates main restricted universe multiverse Deb [ ARCH=AMD64] http://[host]:[port]/ubuntu/trusty-proposed main restricted universe multiversedeb [ARCH=AMD64] http://[ Host]:[port]/ubuntu/trusty-backports Main restricted Universe multiverse
2. Update Apt-get source
Apt-update #这步很重要
Setup of local source of Apt-get intranet under Ubuntu