dberkholz Retired Dev
Joined: 18 Mar 2003 Posts: 1008 Location: Minneapolis, MN, USA
|
Posted: Mon Jun 02, 2003 5:08 am Post subject: Distcc on a different port (Good in private networks) |
|
|
I had a little trouble getting distcc to run on a different port. This is nice for me, because I have a network behind a router that does port-based redirection. So if I want to use distcc from the other side of the router, I need to use different ports for each LAN host.
In /etc/conf.d/distccd on one of the clients (where jobs are sent), the one where you want a different port: Code: | DISTCCD_OPTS="--port NEWPORT" |
Then, as root: Code: | # /etc/init.d/distccd restart |
The distccd server usually listens on port 3632, this tells it to listen on NEWPORT instead. It may or may not be possible to cause it to listen on multiple ports, I haven't tried.
Then set the host correctly with the port info on the server (where jobs originate): Code: | distcc-config --set-hosts localhost/JOBS host1/JOBS host2:NEWPORT/JOBS |
This sends jobs to localhost, host1 on oldport, and host2 on newport. The key to this is, host1's IP and host2's IP can be the same (that of the router), but since the ports are different, you can route them differently.
The :NEWPORT and /JOBS parts are separately optional (i.e., could be host2:NEWPORT or host2/JOBS or just host2). :NEWPORT tells it the port to which it should send jobs, and /JOBS tells it the number of jobs to send to that host. |
|