Heim >Backend-Entwicklung >PHP-Tutorial >Gearman-PHP扩展源码编译

Gearman-PHP扩展源码编译

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 13:17:081090Durchsuche

PS:Gearman-PHP扩展源码编译过程

#当前服务器环境操作系统:CentOS release 6.2PHP版本 PHP 5.4.42

gearmand源码编译,Gearman-PHP扩展依赖该库

由于扩展依赖libgearman库,并且libgearman库在gearmand源码编译中产生,所以先源码装gearmand

#gearmand依赖包安装yum install -y gcc gcc-c++ libevent libevent-devel boost boost-devel gperf uuid libuuid libuuid-devel;#gearmand源码编译wget https://launchpad.net/gearmand/1.2/1.1.12/+download/gearmand-1.1.12.tar.gz;tar -zxvf gearmand-1.1.12.tar.gz;cd gearmand-1.1.12;./configure --prefix=/usr/local/gearmand;make && make install;

Gearman-PHP扩展安装

PHP Gearman扩展主页

wget  http://pecl.php.net/get/gearman-1.1.2.tgz;tar zxvf gearman-1.1.2.tgz;cd gearman-1.1.2;/usr/local/php/bin/phpize;./configure --with-php-config=/usr/local/php/bin/php-config   --with-gearman=/usr/local/gearmand;make && make install;#命令汇总:wget http://pecl.php.net/get/gearman-1.1.2.tgz;tar zxvf gearman-1.1.2.tgz;cd gearman-1.1.2;/usr/local/php/bin/phpize;./configure --with-php-config=/usr/local/php/bin/php-config   --with-gearman=/usr/local/gearmand;make && make install;

将gearman.so模块信息加入php.ini

vi /usr/local/php/etc/php.ini#增加extension_dir = './' -> extension_dir = '/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/'extension=gearman.so

重启php,通过命令:php -m | grep ‘gearman’ 查询扩展是否已经安装

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn