============================================================================
原创作品,允许转载。转载时请务必以超链接形式标明原始出处、以及本声明。
请注明转自:http://yunjianfei.iteye.com/blog/
============================================================================
Gearman支持各种语言,其官网的描述如下:
Select your language – cross links to download section which details all your options.
C, C#/.NET, Go, Java, Lisp, Nodejs, PHP, Perl, Python, Ruby, Database UDFs.
个人尝试了C、python、perl三种语言的API,感觉perl的API功能相对来说齐全一点。Gearman::XS是perl的开源支持。链接如下:http://search.cpan.org/~krow/Gearman-XS/
我是在RHEL5.7下安装的Gearman::XS,中间出了各种问题,这里主要记录是怎么解决的。首先,我使用了cpanm来安装Gearman::XS,结果如下:
--> Working on Gearman::XS
Fetching http://www.cpan.org/authors/id/K/KR/KROW/Gearman-XS-0.15.tar.gz ... OK
Configuring Gearman-XS-0.15 ... OK
Building and testing Gearman-XS-0.15 ... FAIL
! Installing Gearman::XS failed. See /root/.cpanm/work/1392343258.18128/build.log for details. Retry with --force to force install it.
显然force强制安装肯定是不行的,所以就找原因。查看 /root/.cpanm/work/1392343258.18128/build.log文件,发现其中有如下的提示:
cc1: error: unrecognized command line option "-Wno-format-invalid-specifier"
make: *** [XS.o] Error 1
-> FAIL Installing Gearman::XS failed.
看到是在编译的时候出了问题,所以,咱们切换到它的编译目录(即 /root/.cpanm/work/1392343258.18128/这个目录)
然后执行make命令,就可以看到上面报的编译错误了。ok,着手解决它。
找到
删掉最后的“-Wno-format-invalid-specifier”这个选项,然后保存退出,再次执行make。
发现报如下错误:
gearman_xs.h:18:36: error: libgearman-1.0/gearman.h: No such file or directory
XS.c: In function 'XS_Gearman__XS_strerror':
XS.c:229: error: 'gearman_return_t' undeclared (first use in this function)
XS.c:229: error: (Each undeclared identifier is reported only once
XS.c:229: error: for each function it appears in.)
XS.c:229: error: expected ';' before 'rc'
XS.xs:82: warning: implicit declaration of function 'gearman_strerror'
XS.xs:82: error: 'rc' undeclared (first use in this function)
XS.xs:82: warning: assignment makes pointer from integer without a cast
make: *** [XS.o] Error 1
很明显,是找不到gearman.h,也就是说需要gearman-devel,正常情况下通过yum直接安装gearman-devel包就可以解决这个问题,但是,我的rhel是手动安装的Gearman-1.1.11版本,和yum安装的版本不一致,所以,再次打开并修改Makefile。
找到INC以及LDDLFLAGS,修改为如下内容:
可以看到就是加入了Gearman的incule以及lib相关的东西。保存退出Makefile,再次执行make,顺利通过,然后make install就安装完毕了。
相关推荐
主要介绍了Gearman::XS在Centos下的编译安装方法,需要的朋友可以参考下
pecl-gearman:libgearmanPHP包装器
码头工人Docker Gearman服务器
Gearman客户和工人优点: 全面实施工人和客户通过原始Gearman协议进行精益抽象大量的单元测试快速地小的与用其他语言编写的齿轮工客户和工人完全可互操作缺点: 缺乏优雅的高级抽象来进行工作。 多写一些样板每个...
gm := gearman . NewGearman ( workerNum , queueSize , SetIdleTimeout ( 1 * time . Minute ), SetExceptionCall ( func ( error ))) 开始/停止 gm . Start () defer gm . Stop () 提交 gm . Submit ( sharding...
Gearman-ruby 这是什么? 这是用于分布式作业系统的纯Ruby库。 需要做什么? 更多测试,一些代码清除。 这到底是什么 目前,该库对Ruby应用程序具有客户端和工作程序支持。 入门 客户 一个非常简单的客户端,它...
li3_gearman 是在 [BSD License] 下发布的。 安装 建议您将 li3_gearman 作为 GIT 子模块安装,以便跟上最新的升级。 为此,请切换到包含您的锂应用程序的核心目录,然后执行以下操作: $ git submodule add ...
齿轮人该项目允许利用... class DemoWorker extends Gearman_Worker { protected $_registerFunction = 'demowork'; protected $_timeout = 10000; // 10 seconds protected $_memory = 10; // 10 MB protected functi
在Naemon核心中有一个NEB模块,它将servicecheck,hostcheck和eventhandler添加到Gearman队列中。 对方是执行检查的一个或多个工作客户端。 可以将Worker配置为仅运行对特定主机或服务组的检查。 并且您至少需要...
2)安装操作系统环境:CentOS-6.5,(其它linux操作系统请自行尝试)。 3)本软件安装步骤详解:http://blog.csdn.net/clevercode/article/details/45718735。 4) 博客专栏地址(Linux常用软件安装与配置):...
gearman下载gearman下载gearman下载gearman下载gearman下载
该资源包括安装Gearman时可能涉及到的软件包 具体包括gearmand、gearman、php、gperf、libevent
java实现gearman的job实现的jar包,包括gearman server,client和work客户端API
Gearman安装相关资源 《gearmand-1.1.12.tar.gz》 《gearman-1.1.2.tgz》
Gearman中文手册,gearman手册chm,Gearman中文详解,分享gearman技术心得,主要是为了分享技术,所以不要大家的资源分。
安装gearman 如果没有mysql客户端,需要安装mysql客户端 yum install -y libevent-devel 上传gearman.zip,解压unzip gearman.zip rpm -ivh uuid-1.5.1-3.el5.x86_64.rpm rpm -ivh libgearman-1.1.8-2.el5.x86_64...
资源分类:Python库 所属语言:Python 资源全名:gearman-1.3.1.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
1. 首先,我们需要安装gearmand,在centos和rhel环境下,我们只需运行以下命令: yum install gearmand -y 注意:如果不希望通过yum的方式来安装gearmand,可以通过源码编译安装,具体安装方法可以参考://...
Gearman中文手册,gearman手册chm,Gearman中文详解,分享gearman技术心得,主要是为了分享技术,所以不要大家的资源分。
Laravel开发-laravel-gearman-rpc Laravel/Lumen Gearman RPC。基于https://github.com/mhlavc/gearman