📄 distccd.1
字号:
.TH distccd 1 "23 October 2003".SH "NAME"distccd \- distributed C/C++ compiler server.SH "SYNOPSIS".B distccd --daemon .I [OPTIONS].SH "DESCRIPTION".I distccd is the server for the distcc(1) distributed compiler. It accepts andruns compilation jobs for network clients..PPdistcc can run over either TCP or a connection command such as ssh(1).TCP connections are fast but relatively insecure. SSH connections aresecure but slower. .PPFor SSH connections, distccd must be installed on the volunteer butshould not run as a daemon -- it will be started over SSH as needed.SSH connections have several advantages: neither the client nor serverlistens on any new ports; compilations run with the privileges of theuser that requested them; unauthorized users cannot access the server;and source and output is protected in transit..PPFor TCP connections, distccd can run either from an inetd-styleprogram, or as a standalone server. Standalone mode is recommendedbecause it is slightly more efficient and allows distccd to regulatethe number of incoming jobs. The .B --listenand .B --allowoptions can be used for simple IP-based access control..PPdistcc may be started either by root or any other user. If run byroot, it gives away privileges and changes to the user specified bythe .B --useroption, or the user called "distcc", or the user called "nobody"..PPdistccd does not have a configuration file; it's behaviour iscontrolled only by command-line options and requests fromclients..SH "STANDALONE SERVER"The recommended method for running distccd is as a standalone server.distccd will listen for network connections and fork several childprocesses to serve them..PPIf you installed distcc using a packaged version you may be able tostart the server using the standard mechanism for your operatingsystem, such as.RS.PP# service distcc start.RE.PPTo start distccd as a standalone service, run a command likethis either as root or an ordinary user:.RS.PP# distccd --daemon.RE.SH "RUNNING FROM INIT"distccd may be run as a standalone daemon under thecontrol of another program like init(8) ordaemontools. The super-server starts distccdwhen the system boots, and whenever it exits..PPdistccd should be started just as for a standalone server,except that the .B --no-detachoption should be used so that the super-server can monitor it..PPFor example, to add distccd as a process to Linuxsysvinit, add this line to .I /etc/inittab.RS.PPdscc:2345:respawn:/usr/local/bin/distccd --verbose --no-detach --daemon.RE.SH "RUNNING FROM INETD"distccd may be started from a network super-server such as inetd orxinetd. In this case inetd listens for network connections andinvokes distccd when one arrives..PPThis is slightly less efficient than running a standalone distccddaemon. distccd is not able to regulate the number of concurrent jobsaccepted, but there may be an option in your inetd configuration to doso..PPFor traditional Unix inetd, a line like this can be addedto /etc/inetd.conf:.RS.PPdistcc stream tcp nowait.6000 root /usr/local/bin/distccd distccd --inetd.RE.PPinetd imposes a limit on the rate of connections to a service toprotect against accidental or intentional overuse. The default inLinux NetKit inetd is 40 per minute, which is far too low for distccd.The \.6000 option raises the limit to 6000 per minute..SH "TERMINATING DISTCCD"To shut down a standalone server, send a SIGTERMsignal to the parent process. The most reliable way to dothis from a script is to use the .I --pid-fileoption to record its process ID. Shutting down the server in this wayshould allow any jobs currently in progress to complete..SH "OPTIONS".TP.B --helpDisplay summary usage information..TP.B --versionShows the daemon version and exits..TP.B -j, --jobs JOBSSets a limit on the number of jobs that can be accepted at any time.By default this is set to two greater than the number of CPUs on themachine, to allow for some processes being blocked on network IO.(Daemon mode only.).TP .B -N, --nice NICENESSMakes the daemon more nice about giving up the CPU to other tasks onthe machine. NICENESS is an increment to the current priority of theprocess. The range of priorities depends on the operating system butis typically 0 to 20. By default the niceness is increased by 5..TP.B -p, --port PORTSet the TCP port to listen on, rather than the default of 3632.(Daemon mode only.).TP.B --listen ADDRESSInstructs the distccd daemon to listen on the IP addressADDRESS. This can be useful for access controlon dual-homed hosts. (Daemon mode only.).TP.B -P, --pid-file FILESave daemon process id to file FILE. (Daemon mode only.).TP.B --user USERIf distccd gets executed as root, change to user USER..TP.B -a, --allow IPADDR[/MASK]Instructs distccd to accept connections from the IP addressIPADDR. A CIDR mask length can be supplied optionally after atrailing slash, e.g. 192.168.0.0/24, in which case addresses thatmatch in the most significant MASK bits will be allowed. If no--allow options are specified, all clients are allowed. Unauthorizedconnections are rejected by closing the TCP connection immediately. Awarning is logged on the server but nothing is sent ot the client..TP.B --no-detachDo not detach from the shell that started the daemon. .TP.B --no-forkDon't fork children for each connection, to allow attaching gdb.Don't use this if you don't understand it!.TP.B --log-file FILESend messages to file FILE instead of syslog.Logging directly to a file is significantly faster thangoing via syslog and is recommended..TP.B --log-level LEVELSet the minimum severity of error that will be included in the logfile. Useful if you only want to see error messages rather than anentry for each connection. LEVEL can be any of the standard sysloglevels, and in particular.I critical, error, warning, notice, info, or.I debug..TP.B --log-stderrSend log messages to stderr, rather than to a file orsyslog. This is mainly intended for use in debugging. Do not use ininetd mode..TP.B --verboseInclude debug messages in log. Equivalent to.B --log-level=debug.TP.B --wizardTurn on all options appropriate for starting distccd under gdb: run asa daemon, log verbosely to stderr, and do not detach or fork. Forwizards only..TP.B --inetdServe a client connected to stdin/stdout. As the namesuggests, this option should be used when distccd is runfrom within a super-server like inetd. distccdassumes inetd mode when stdin is a socket..TP .B --daemonBind and listen on a socket, rather than running frominetd. This is used for standalone mode. distccdassumes daemon mode at startup if stdin is a tty, so--daemon should be explicitly specified whenstarting distccd from a script or in a non-interactivessh connection..SH "SEARCH PATHS".PPdistcc can pass either a relative or an absolute name for the compilerto distccd. If distcc is given an explicit absolute compilerfilename, that name is used verbatim on both the client and server.If the compiler name is not an absolute path, or if the client is usedin masquerade mode, then the server's PATH is searched..PPdistccd inherits its search path from its parent process. By defaultdistccd tries to remove directories that seem to contain distccdmasquerade links, to guard against inadvertent recursion. The.B DISTCCD_PATHenvironment variable may be used to set the path..PPThe search path is logged when --verbose is given. In case ofconfusion, check the logs..PPWhen distccd is run over ssh, the .I $HOME/.ssh/environment file may be useful in setting the path. See .B ssh(1)..SH "DIAGNOSTICS"distccd logs messages to syslog's .I daemonfacility bydefault, which normally writes to .I /var/log/daemon or.I /var/log/messages. Log messages can be sent to adifferent file using the .B --log-file option..SH "ENVIRONMENT VARIABLES".TP.B "DISTCCD_PATH"When starting distccd, if this value is set it will be used unalteredfor the command-execution PATH. The code that normally tries toremove masquerade directories from the path is skipped..TP.B "DISTCC_SAVE_TEMPS"If set to 1, temporary files are not deleted after use..PPNote that .B "DISTCC_LOG"does not affect the log destination for the server..TP.B "DISTCC_TCP_DEFER_ACCEPT"On Linux, turn on the TCP_DEFER_ACCEPT socket option. Defaults to on..TP.B "TMPDIR"Directory for temporary files such as preprocessor output. By default/tmp/ is used..SH "SEE ALSO"distcc(1), ccache(1), gcc(1), make(1).I http://distcc.samba.org/.SH "BUGS"IP-based access control is not secure against attackers able to spoofTCP connections, and cannot discriminate different users on a client..PP TCP connections are not secure against attackers able to observe ormodify network traffic..PPBecause ccache does not cache compilation from .B .ifiles, it is not useful to call it from distccd..SH "LICENCE"You are free to use distcc. distcc (including this manual) may becopied, modified or distributed only under the terms of the GNUGeneral Public Licence version 2 or later. distcc comes withabsolutely no warrany. A copy of the GPL is included in the fileCOPYING..SH "AUTHOR"distcc was written by Martin Pool <mbp@sourcefrog.net>, with theco-operation of many scholars including Wayne Davison, Frerich Raabe,Dimitri Papadopoulos and others noted in the NEWS file. Please reportbugs to <distcc@lists.samba.org>.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -