#author("2022-04-29T02:23:29+00:00","","") #topicpath * 目次 [#p89c0df5] #contents(); /////////////////////////////////////////////////////////////////////////////// * distcc [#distcc] //============================================================================= ** setup (master, slave 共通) [#setup-common] - 全てのマシンに distcc パッケージをインストールする - /etc/default/distcc -- 記述例 # Defaults for distcc initscript # sourced by /etc/init.d/distcc # # should distcc be started on boot? # # マシンの起動時に distccd を自動起動する場合は true にする。 STARTDISTCC="true" # # Which networks/hosts should be allowed to connect to the daemon? # You can list multiple hosts/networks separated by spaces. # Networks have to be in CIDR notation, e.g. 192.168.1.0/24 # Hosts are represented by a single IP address # # distcc の命令を受けるホストを IP address の範囲で指定 ALLOWEDNETS="192.168.0.0/24" # # Which interface should distccd listen on? # You can specify a single interface, identified by it's IP address, here. # # LISTENER="127.0.0.1" # distcc の命令を listen するインターフェース(=自機の IP address) LISTENER="192.168.100.12" # # You can specify a (positive) nice level for the distcc process here # # 引き受ける Job の優先度(高:-20〜19:低) NICE="10" # # You can specify a maximum number of jobs, the server will accept concurrently # # 引き受ける job の上限数 JOBS="4" # # Enable Zeroconf support? # If enabled, distccd will register via mDNS/DNS-SD. # It can then automatically be found by zeroconf enabled distcc clients # without the need of a manually configured host list. # # zeloconf 環境を構築している場合は true にする。 ZEROCONF="false" //============================================================================= ** setup (master) [#setup-master] *** 環境変数 DISTCC_HOSTS の設定 [#kcb503c7] - distcc の命令を受けるホストの "IP address/他重度" を指定する。多重度は省略すると 4 になる。 - 以下のいずれかの方法で設定する。 -- 環境変数を直接設定する $ export DISTCC_HOSTS="192.168.0.0/8 192.169.1.0/4 localhost" -- ${HOME}/.distcc/hosts に記載する 192.168.0.0/8,lzo 192.169.1.0/4,cpp,lzo localhost - gcc の置き換え -- 何らかの方法で、"gcc" を "distcc gcc" に置き換える。 -- 方法1:Makefile の記載を変える (変更前) CC := gcc (変更後) CC := distcc gcc -- 方法2:コマンドを置き換える(${HOME}/bin/gcc に wrapper を作る) --- 環境変数で、${HOME}/bin 配下を優先的に見に行くようにする $ export PATH=${HOME}/bin:${PATH} --- ${HOME}/bin/gcc #!/bin/bash distcc gcc ${@} //============================================================================= ** setup (slave) [#setup-slave] //============================================================================= ** monitor [#monitor] - distccmon-gnome -- GUI の distcc モニタ -- distccmon-gnome パッケージでインストールする。 - distccmon-text -- CUI の distcc モニタ - distcc パッケージに含まれている。 /////////////////////////////////////////////////////////////////////////////// * 参考リンク [#c326f890]