Debian 7.7.0 下编译安装gearman 1.1.2

gearman网站

http://gearman.org/getting-started/

下载源代码,并解压

https://launchpad.net/gearmand

tar xzf gearmand-1.1.12.tar.gz
cd gearmand-1.1.12

安装缺少的依赖库

Synaptic 新丽得软件包管理器中安装

  1. libboost-all-dev
  2. gperf
  3. libevent-dev
  4. uuid-dev

编译并安装

./configure
make
sudo make install

gearmand 在/usr/local/sbin/下

$ sudo /usr/local/sbin/gearmand -d
/usr/local/sbin/gearmand: Could not open log file "/usr/local/var/log/gearmand.log", from "/home/shen/下载/gearmand-1.1.12", switching to stderr. (No such file or directory)
$ sudo mkdir /usr/local/var/log -p
$ sudo /usr/local/sbin/gearmand -d

gearman运行时缺少库文件

$ gearman
gearman: error while loading shared libraries: libgearman.so.8: cannot open shared object file: No such file or directory

需要更新ld路径 sudo ldconfig 生成/etc/ld.so.cache后,再运行 shen@debian:~/下载/gearmand-1.1.12$ gearman

gearman	Error in usage(No Functions were provided).

Client mode: gearman [options] [<data>]
Worker mode: gearman -w [options] [<command> [<args> ...]]

Common options to both client and worker modes.
	-f <function> - Function name to use for jobs (can give many)
	-h <host>     - Job server host
	-H            - Print this help menu
	-v            - Print diagnostic information to stdout(false)
	-p <port>     - Job server port
	-t <timeout>  - Timeout in milliseconds
	-i <pidfile>  - Create a pidfile for the process
	-S            - Enable SSL connections

Client options:
	-b            - Run jobs in the background(false)
	-I            - Run jobs as high priority
	-L            - Run jobs as low priority
	-n            - Run one job per line(false)
	-N            - Same as -n, but strip off the newline(false)
	-P            - Prefix all output lines with functions names
	-s            - Send job without reading from standard input
	-u <unique>   - Unique key to use for job

Worker options:
	-c <count>    - Number of jobs for worker to run before exiting
	-n            - Send data packet for each line(false)
	-N            - Same as -n, but strip off the newline(false)
	-w            - Run in worker mode(false)

转载于:https://my.oschina.net/fitnessefan/blog/349664

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值