Ubuntu: How would I get an update mirror to use its mirror folder for an update



Question:

I have a trusty mirror file structure mounted from an external volume. What I would like to do is to spin up a new, blank VM, and have it update, upgrade and install an ftp server to serve the mirror to other VMs.

I can't modify /etc/apt/sources.list to use ftp:// before the server is installed.

Is there a way to get apt-get to use the mounted volume? Will sources.list support file:// protocol?


Using the answer below, I mounted the mirror directory as a shared folder, and ran the following on the VM;

sed -i -e s#http://archive.ubuntu.com#file:///srv/ftp#g \         -e s#http://security.ubuntu.com#file:///srv/ftp#g \         /etc/apt/sources.list   apt-get update   apt-get -y upgrade   apt-get -y install proftpd-basic   apt-get -y autoremove  # configure /etc/proftpd/conf.d/anonymous.conf  service proftpd restart  

Other VMs refer to the newly minted mirror for their updates;

sed -i -e s#http://archive.ubuntu.com#ftp://mirror-vm#g \         -e s#http://security.ubuntu.com#ftp://mirror-vm#g \         /etc/apt/sources.list   apt-get update   apt-get -y upgrade   apt-get -y install yada-yada-yada   apt-get -y autoremove  


Solution:1

I don't quite get how you intend to install the ftp server, but sources.list does support the file:// 'protocol'.

To add a deb package to your sources.list file:

deb file:///path/to/directory /  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »