rpm包用:rpm -ivh ...
bz2包用:tar -xvf ...
进入distcc解压后的目录
./configure && make && make install
mkdir /usr/lib/distcc/bin
cd /usr/lib/distcc/bin
ln -s /usr/local/bin/distcc gcc
ln -s /usr/local/bin/distcc cc
ln -s /usr/local/bin/distcc g++
ln -s /usr/local/bin/distcc c++
vi ~/.bash_profile
或者
vim ~/.bashrc
## ----- Distcc -----
#
DISTCC_HOSTS="localhost red green blue"
DISTCC_VERBOSE=1
DISTCC_LOG="/var/log/distcc.log"
export DISTCC_HOSTS PATH DISTCC_VERBOSE DISTCC_LOG
#
## ----- End -----
进入ccache解压目录
./configure –prefix=/usr/bin
make && make install
mkdir /Data
mkdir /Data/Cache
mkdir /Data/Cache/CCache
vim ~/.bashrc
## ----- Ccache -----
#
# export CCACHE_DISABLE=1
CCACHE_DIR=/Data/Cache/CCache
CCACHE_LOGFILE=/Data/Cache/CCache.log
CCACHE_PREFIX="distcc"
CC="ccache gcc"
CXX="ccache g++"
export CCACHE_DIR CCACHE_LOGFILE CCACHE_PREFIX CC CXX
#
## ----- End -----
用#
distccmon-text 2
或者#
watch distccmon-text# 查看distcc工作情况,每2秒更新一次数据