Frederico Morais's picture

Hi everyone,

i have a server with turnkey lamp installed, runing debian squeeze 6 and no connection to internet but an internal private network.

I would like to know it there is a way to install a deb package and all its dependencies through the web console.

I have no means to contact physicaly with the server so i was installing all packages that i need by downloading them on to the pc i use to work and uploading them via lan with the web shell.

But this method is very slow and most important not accurate since most of the instalations i did failed due to lack of dependencies and/or incorrect versions.

So i was wondering if there was a way to get a package and all its dependencies in one single file, upload it to turnkey and install it with the web shell.

 

Forum: 
Jeremy Davis's picture

One relatively easy way to make sure that you have all the dependencies though would be to set up a VM (same OS i.e. TKL v12.1 LAMP in your instance) on a PC that does have a net connection.

Then clear the package archives:

apt-get clean

Then install the desired package(s) with apt-get:

apt-get update && apt-get install packagename

That will install the package and all of it's required dependencies and all the debs (including dependencies) will be cached in /var/cache/apt/archive. So you can then copy/upload all the debs in there to the non-internet server (put them all in their own folder). Then on the non-internet machine cd to the folder containing the debs and install them with dpkg like this:

dpkg -i --force-depends *.deb

This will force packages to install even if their dependencies are not met. If you don't use --force-depends then you will need to install the debs in the correct order (i.e. dependencies first) which can be quite painful! Note though if you have any files missing from that folder it might break things!

It would pay to take careful notice of any warnings you get during install (the --force-depends switch turns dependency errors into warnings). If you do end up with a broken system then you may be able to work out what is missing with:

apt-get install -f

Add new comment