If you want to setup this configuration you need to minimum 350Gb free disk space.

############### Server Side ###############

sudo apt-get install apache2

sudo apt-get install apt-mirror

sudo mkdir -p /Mirror/apt-mirror

sudo vi /etc/apt/mirror.list

############# config ##################
#
set base_path			/Mirror/apt-mirror
#
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 12.04 X64 PRECISE
deb-amd64 http://tr.archive.ubuntu.com/ubuntu precise main restricted universe multiverse
deb-amd64 http://tr.archive.ubuntu.com/ubuntu precise-security main restricted universe multiverse
deb-amd64 http://tr.archive.ubuntu.com/ubuntu precise-updates main restricted universe multiverse

# UBUNTU 14.04 X64 TRUSTY
deb-amd64 http://tr.archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
deb-amd64 http://tr.archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
deb-amd64 http://tr.archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse

# UBUNTU 16.04 X64 XENIAL
deb-amd64 http://tr.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb-amd64 http://tr.archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb-amd64 http://tr.archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse

clean http://tr.archive.ubuntu.com/ubuntu

sudo apt-mirror

ll /Mirror/apt-mirror/

# Web Config
ln -s /Mirror/apt-mirror/mirror/tr.archive.ubuntu.com/ubuntu/ /var/www/html/ubuntu

crontab -e
0 23 * * * /usr/bin/apt-mirror && /Mirror/apt-mirror/var/clean.sh

############### Client Side ###############

sudo vi /etc/apt/sources.list

# Ubuntu 12.04 x64 Precise

deb [arch=amd64] http://repository.local.server/ubuntu precise main restricted universe multiverse
deb [arch=amd64] http://repository.local.server/ubuntu precise-security main restricted universe multiverse
deb [arch=amd64] http://repository.local.server/ubuntu precise-updates main restricted universe multiverse

# Ubuntu 14.04 x64 Trusty

deb [arch=amd64] http://repository.local.server/ubuntu trusty main restricted universe multiverse
deb [arch=amd64] http://repository.local.server/ubuntu trusty-security main restricted universe multiverse
deb [arch=amd64] http://repository.local.server/ubuntu trusty-updates main restricted universe multiverse

# Ubuntu 16.04 x64 Xenial

deb [arch=amd64] http://repository.local.server/ubuntu xenial main restricted universe multiverse
deb [arch=amd64] http://repository.local.server/ubuntu xenial-security main restricted universe multiverse
deb [arch=amd64] http://repository.local.server/ubuntu xenial-updates main restricted universe multiverse

Note: repository.local.server

          Change your own repository server name.

apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y && apt-get autoremove -y

Loading

Leave a reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.