job server 安装在gearman-job服务器上。
worker安装在worker服务器上。
全部以gearman用户运行。
job server 启动命令:
/opt/app/gearman/sbin/gearmand -L 192.168.0.x -d
worker 启动命令:
( /opt/app/gearman/bin/gearman -w -h gearman-job -f businessLogger | /usr/local/sbin/cronolog /opt/log/business.%Y%m%d.log & )
client 启动命令,以client1为例:
screen -dmS gearman
script /dev/null
screen -r gearman
tail -F ar/log/log1 | awk '{print "app1",$0}' | /opt/app/gearman/bin/gearman -n -h gearman-job -f businessLogger &
ctl-a d