The methods for setting up the Ubuntu update source server mainly include apt-mirror and sync. This article mainly introduces the first method, which is simple and easy to do. Before installation, you must first prepare a network-Connected Server with a hard disk space of more than 80 GB and install the Linux operating system. The main steps are as follows. 1. Install apt-mirrorapt-mirror to get the http://apt-mirror.sourceforge.net/apt-mirror/apt-mirro from the address below
The methods for setting up the Ubuntu update source server mainly include apt-mirror and sync. This article mainly introduces the first method, which is simple and easy to do. Before installation, you must first prepare a network-Connected Server with a hard disk space of more than 80 GB and install the Linux operating system.
The main steps are as follows.
1. Install apt-mirror
Apt-mirror can be obtained from the following address:
Http://apt-mirror.sourceforge.net/apt-mirror/apt-mirror_0.4.8.orig.tar.gz
Or install the apt-mirror executable package of Ubuntu.
Https://launchpad.net/ubuntu/lucid/+package/apt-mirror
$ Tar xzvf apt-mirror_0.4.8.orig.tar.gz
$ Cd apt-mirror-0.4.8
$ Cp apt-mirror/bin
$ Mkdir-p/etc/apt
$ Cp mirror. list/etc/apt
The installation file contains postmirror. sh, which is placed in the var directory of the image directory. After the apt-mirror command is executed, the script content is automatically modified. The default value is postmirror. sh has nothing to do. If you need to install additional software packages or other purposes, add the script here.
2. Modify mirror. list
$ Vi/etc/apt/mirror. list
############# Config ##################
#
# Default configuration options (uncomment and change to override)
#
# Set base_path/var/spool/apt-mirror
#
# If you change the base path you must create the directories below with write privlages
#
# Set pai_path $ base_path/mirror
# Set skel_path $ base_path/skel
# Set var_path $ base_path/var
# Set cleanscript $ var_path/clean. sh
#
# Set defaultarch
# Set nthreads 20
# Set _ tilde 0
#
# Valid values for limit_rate are:
#10 for 10 Bytes/Second, 10 k for 10 Kilobytes/Second, and 10 m for 10 Megabytes/Second
#
# Set limit_rate 100 m
#
############ End Config ##############
######### Listing ing List ##############
#
# Supported apt-mirror list entries:
#
# Debian source: deb-src http ://...
# Default native arch: deb http ://...
# Debian non-native arch: deb-$ arch http ://...
# Where $ arch can = (alpha | amd64 | armel | arm | hppa | hurd-i386 | i386 | ia64 | lpia | m68k | mipsel | mips | powerpc | s390 | sh | iSCSI)
#
Deb http://ftp.us.debian.org/debian unstable main contrib non-free
Deb-src http://ftp.us.debian.org/debian unstable main contrib non-free
#
######## End processing ing List ##########
######### Cleaning Section ############
#
# Directorys managed by apt-mirror
Clean http://ftp.us.debian.org/debian
# Directorys NOT managed by apt-mirror
# Skip-clean http://ftp.us.debian.org/debian-minicd/
# Skip-clean http://ftp.us.debian.org/debian/dists/sarge/main/installer-i386/
# Skip-clean http://ftp.us.debian.org/debian/dists/sid/main/installer-i386/
Red is the part to be replaced. Base_path indicates your image directory. The default value is/var/spool/apt-mirror,
You can also cancel the preceding comment and change it to a custom directory. I found that the modification was not available, and the link method was used to solve the problem.
For example:
$ Cd/var/spool
$ Ln-s/ubuntu apt-mirror
If you need to install Ubuntu 10.04, find the nearest source from the network, modify the content of mirror. lst, and copy the source.
The environment on my side is CERNET, which is very close to Chengdu University of electronic science and technology.
As follows.
Deb http://ubuntu.uestc.edu.cn/ubuntu lucid main restricted universe multiverse
Deb http://ubuntu.uestc.edu.cn/ubuntu lucid-backports main restricted universe multiverse
Deb http://ubuntu.uestc.edu.cn/ubuntu lucid-proposed main restricted universe multiverse
Deb http://ubuntu.uestc.edu.cn/ubuntu lucid-security main restricted universe multiverse
Deb http://ubuntu.uestc.edu.cn/ubuntu lucid-updates main restricted universe multiverse
The deb-src http://ubuntu.uestc.edu.cn/ubuntu lucid main restricted universe multiverse
Deb-src http://ubuntu.uestc.edu.cn/ubuntu lucid-backports main restricted universe multiverse
Deb-src http://ubuntu.uestc.edu.cn/ubuntu lucid-proposed main restricted universe multiverse
The deb-src http://ubuntu.uestc.edu.cn/ubuntu lucid-security main restricted universe multiverse
The deb-src http://ubuntu.uestc.edu.cn/ubuntu lucid-updates main restricted universe multiverse
Clean http://ubuntu.uestc.edu.cn/ubuntu
Replace the above red text with these rows. Save the text and exit.