Changes

Jump to: navigation, search

Ubuntu

1,733 bytes added, 07:05, 13 November 2009
Import from old wiki
= Using Local Mirrors =
You will need to alter your <tt>/etc/apt/sources.list</tt> file.
First of all, make a backup of your original. Open a terminal
emulator (Applications &#8594; Accessories &#8594; Terminal) and enter the command:

<pre>sudo cp /etc/apt/sources.list /etc/apt/sources.list.original
</pre>
Next, copy the commands below into a shell script. You can use a
text editor like gedit; Applications &#8594; Accessories &#8594; Text Editor.
Select the mirror you wish to remove by uncommenting (removing the
beginning <tt>#</tt> character from) one of the two lines with <tt>MIRROR=</tt>. Save it in your home directory as <tt>vtmirror.sh</tt>:

<pre>#!/bin/sh
## Uncomment one of the two MIRROR lines below to choose your mirror
##
## VT Campus Computing mirror
#MIRROR="mirror.cc.vt.edu/pub/ubuntu"
## VBI Mirror (which also hosts PowerPC and SPARC repositories)
#MIRROR="mirrors.vbi.vt.edu/mirrors/linux/ubuntu"

sed "s,\(us\.\)\?archive.ubuntu.com/ubuntu,$MIRROR," /etc/apt/sources.list.original |\
sed s,security.ubuntu.com/ubuntu,$MIRROR, &gt; \
/etc/apt/sources.list.new
mv /etc/apt/sources.list.new /etc/apt/sources.list
</pre>
'''IMPORTANT''': make sure that you have uncommented one of the <tt>MIRROR=</tt> lines.
Next, in your terminal window, change the permissions on this file to make it executable:

<pre>chmod u+x vtmirror.sh
</pre>
Finally, run the script from the terminal with

<pre>sudo ./vtmirror.sh
</pre>
Next, update your package information. You can do this in the terminal with

<pre>sudo apt-get update
</pre>
You can also do this with the Update Manager in System &#8594; Administration &#8594; Update Manager.
You will now be downloading all standard Ubuntu packages from your local VT mirror.
Anonymous user

Navigation menu