Peter's picture

Hi,

I am hoping someone can point me in the right direction to modify the Turnkey - Core appliance installation to allow for the input of a proxy server.

In my test environment I have setup a number of servers based on the Turnkey - Core platform to test and develop ideas.  As part of this environment I have setup one of the boxes with apt-cacher and have configured each client to use it as the central hub for apt-get packages.

Is there an easy way to modify the install system to allow for the input of a proxy server?

Thanks,

Peter.

Forum: 
Jeremy Davis's picture

Please correct me if I'm wrong, but are you after an easy way to use your apt-cacher as a proxy for updates?

If so the easiest way I've found is to tell apt to use your apt-cacher server as an update proxy. This is acheived by adding a 01proxy file to the /etc/apt/apt.conf.d/ directory. Thus all your updates go via the apt-cacher server, but nothing else goes through the proxy.

In a terminal, type: 

nano /etc/apt/apt.conf.d/01proxy  

Inside your new file, add a line that says: 

Acquire::http::Proxy "http://<IP address or hostname of the apt-cacher server>:3142";

You can add this file to any Ubuntu/Ubuntu based system on your network. Please note it is not advisable to simultaneously use apt-cacher with Debian/other Debian based distros because packages from different distros may interfere with one another.

Also I have read that apt-cacher-ng uses a slightly different entry in the 01proxy file (but I can't confirm this as I only have apt-cacher). What I've read suggest you use this instead:

Acquire::http { Proxy “http://<IP address or hostname of the apt-cacher server>:3142″; };

Peter's picture

Thanks for the reply.  Unfortunatly this does not help.  I am already aware of how to setup the proxy on an already installed system.

I am actually hoping to be able to add/setup a proxy during the installation process so I can use my apt-cacher cache during the installation phase.

Thanks,

Peter


Jeremy Davis's picture

You could patch the ISO prior to burning to cd so it includes the apropriate 01proxy file. The TKL Patch documentation can be found here.

Peter's picture

Thanks for the follow up answer.

I will look at building a local TKLPatch.  However to try to provide something back to the community where would I look in the iso for the files related to the installation wizard?

I would love it to be part of the installation wizard, my idea is to provide the options to:

1.  Use Defaults (Default option to use the standard sources file);

2.  Allow the installer to provide a location for a local package repository (either a country mirror or something local on the LAN); or

3.  Allow the installer to configure a proxy.

Thanks,

Peter


Liraz Siri's picture

Remember all the components in TKL are fully open source so if you're wondering how something works just crack open a text editor or point your web browser to:

http://code.turnkeylinux.org/

Also, most packages have some documentation under docs/ in the source to help explain things.

But anyway I think you may interested in the following paths:

/usr/lib/di-live.d
/usr/lib/live-installer.d
/usr/lib/inithooks/
Take a look at what's in these paths on a random appliance. You'll get the idea.

Add new comment