You can always downsload an archived JDK from oracle. This can be moved to an appropriate position, and extracted there.
Java doesn't need much setup. Setting JAVA_HOME in in a profile file is a good idea, and putting the JDK/bin - dir into the path. However ...
- If there is already an OpenJDK installed, or Java-1.5, it can be more complicated. There are often a lot of links in /etc/alternatives for Java - check that out.
central machine as repository
I don't know if it is possible to use the central pc as a proxy. to install the JDK there, and tell the other machines to use it as source. Keywords for a search: repository, apt-get, proxy.
Copy the so downloaded .dep-files to the clients, and use
dpkg -i xy.deb to install it.
You can use a few commands, put into a script, to use the central machine as router, to visit the internet from the clients. You need 2 commands on the clients too. Then you could use apt-get from the clients to access the internet.
I don't understand these scripts myself - only in sofar, to adopt it to my needs. :) This is my 'gateway.sh' script, to be run on the router with sudo:
# test if ip-forward is up - if not, enable it:
# maybe the network card has no IPv4 adress? Use a static IP:
# if you have a static, well known IP, comment this out:
ifconfig eth0 192.168.32.8 up
# Tell the kernel to do ip-forwarding:
if [[ ipf -eq "0" ]] ; then
echo "1" > /proc/sys/net/ipv4/ip_forward
# forward-masquerade, script follows:
# might or might not be needed.
# start dhcp-server, older method:
# /etc/init.d/dhcp3-server start
# newer method:
# /etc/init.d/dhcdbd start
Then you need the ip-masquerade-script, which you needn't place in /etc/ppp/masqeuerade, but change the line in gateway.sh, if you don't do so.
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables -A FORWARD -p tcp --tcp-flags SYN,RST, SYN -j TCPMSS --clamp-mss-to-pmtu
Just a few lines. Now you would start
sudo gateway.sh and wait for the clients. These wouldn't do much:
sudo route add default gw 192.168.32.8
whatever the IP of the central machine is. This could already be sufficient. Maybe you would modify the DNS-Server, to have one of your ISPs DNS in there:
sudo edit /etc/resolv.conf
A running avahi-daemon and NetworkManager could interfere with the clients, mainly.
For the third and first way, I know how to do it exactly, but the most elegant way would probably be No. 2, but I never did it myself. So I would recommend to search a bit, or wait a little, maybe somebody knows how to do it, or how to do something better.