2

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
2

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 /

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.