In the company school. There is often a need to set up an Ubuntu source server locally.
Can be set by following this simple step.
1. server-side configuration
Here we use an Ubuntu-equipped PC to do the server.
1.1. Installing the appropriate package
$ sudo apt-get install apache2
$ sudo apt-get install Apt-mirror
1.2. running Apt-mirror
the whole repo is big, we can make some changes to Mirror.list, just select part of the package.
For example, see the following:
Deb Http://archive.ubuntu.com/ubuntu precise main restricted universe
Then run:
$ sudo apt-mirror
1.4. Creating an Ubuntu folder
$ cd/var/www
$ sudo ln-s/var/spool/apt-mirror/skel/archive.ubuntu.com/ubuntu
1.5. restarting the HTTP service
$ sudo service apache2 restart
So the service side is well-equipped.
2. Configuration of the Client
The same, because the client needs to be connected to our well-equipped server, the client side also has to make corresponding adjustments.
2.1. Change/etc/apt/souces.list
Gazing at all other repository, add the following two lines:
Deb Http://192.168.1.2/ubuntu/precise main restricted universe
DEB-SRC http://192.168.1.2/ubuntu/precise main Restricted universe
Here 192.168.1.2 is the IP of the server
2.2. Update the appropriate information
sudo apt-get update
High-speed Setup Ubuntu update source server