德国 1.1.12 安装在 PHP5.4 on Amazon Linux AMI
Gearman 1.1.12 installation on PHP5.4 on Amazon Linux AMI
我试过几篇与 Amazon Linux AMI 上的 Gearman 安装相关的帖子。我遵循了以下步骤:
cd /var/tmp
wget https://launchpad.net/gearmand/1.2/1.1.12/+download/gearmand-1.1.12.tar.gz
tar xvzf gearmand-1.1.12.tar.gz
yum install libevent-devel gcc-c++ boost-devel libuuid-devel memcached-devel gperf
./configure
sudo make
sudo make install
sudo ldconfig
当我运行命令gearmand时,我可以看到它是运行ning。
Gearman PHP 图书馆
sudo yum -y install php-pear
sudo pecl install gearman
我收到以下消息
Build process completed successfully
Installing '/usr/lib64/php/modules/gearman.so'
install ok: channel://pecl.php.net/gearman-1.1.2
Extension gearman enabled in php.ini
当我运行php --ini
时,我得到了
Warning: PHP Startup: Unable to load dynamic library './gearman.so' - ./gearman.so: cannot open shared object file: No such file or directory in Unknown on line 0
所以,我编辑了 php.ini 文件并添加了
extension='/usr/lib64/php/modules/gearman.so'
现在,在重新启动 apache 后,我得到
Warning: PHP Startup: gearman: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
这与 PHP Gearman installation 相同,但是上述解决方案对我不起作用。
php -v 给出
PHP 5.4.13 (cli) (built: Mar 29 2013 20:29:42)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
我正在使用亚马逊 Linux。
gearmand -V
给出
gearmand 1.1.12 - https://bugs.launchpad.net/gearmand
pear -V 给出
PEAR Version: 1.9.5
PHP Version: 5.3.29
Zend Engine Version: 2.3.0
Running on: Linux ip-10-0-1-160 4.1.7-15.23.amzn1.x86_64 #1 SMP Mon Sep 14 23:20:33 UTC 2015 x86_64
pecl -V
给出
PEAR Version: 1.9.5
PHP Version: 5.3.29
Zend Engine Version: 2.3.0
Running on: Linux ip-10-0-1-160 4.1.7-15.23.amzn1.x86_64 #1 SMP Mon Sep 14 23:20:33 UTC 2015 x86_64
与 pear
一样的问题。我是用 yum 安装的。所以,首先删除那个。
sudo yum -y remove php-pear
然后我就这样安装了pear
wget http://pear.php.net/go-pear.phar
/usr/local/bin/php -q php-phar
现在pear -V
显示
PEAR Version: 1.10.1
PHP Version: 5.4.13
那么,就
pecl install gearman
然后复制 gearman.so 文件到 php.ini
我试过几篇与 Amazon Linux AMI 上的 Gearman 安装相关的帖子。我遵循了以下步骤:
cd /var/tmp
wget https://launchpad.net/gearmand/1.2/1.1.12/+download/gearmand-1.1.12.tar.gz
tar xvzf gearmand-1.1.12.tar.gz
yum install libevent-devel gcc-c++ boost-devel libuuid-devel memcached-devel gperf
./configure
sudo make
sudo make install
sudo ldconfig
当我运行命令gearmand时,我可以看到它是运行ning。
Gearman PHP 图书馆
sudo yum -y install php-pear
sudo pecl install gearman
我收到以下消息
Build process completed successfully
Installing '/usr/lib64/php/modules/gearman.so'
install ok: channel://pecl.php.net/gearman-1.1.2
Extension gearman enabled in php.ini
当我运行php --ini
时,我得到了
Warning: PHP Startup: Unable to load dynamic library './gearman.so' - ./gearman.so: cannot open shared object file: No such file or directory in Unknown on line 0
所以,我编辑了 php.ini 文件并添加了
extension='/usr/lib64/php/modules/gearman.so'
现在,在重新启动 apache 后,我得到
Warning: PHP Startup: gearman: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
这与 PHP Gearman installation 相同,但是上述解决方案对我不起作用。
php -v 给出
PHP 5.4.13 (cli) (built: Mar 29 2013 20:29:42)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
我正在使用亚马逊 Linux。
gearmand -V
给出
gearmand 1.1.12 - https://bugs.launchpad.net/gearmand
pear -V 给出
PEAR Version: 1.9.5
PHP Version: 5.3.29
Zend Engine Version: 2.3.0
Running on: Linux ip-10-0-1-160 4.1.7-15.23.amzn1.x86_64 #1 SMP Mon Sep 14 23:20:33 UTC 2015 x86_64
pecl -V
给出
PEAR Version: 1.9.5
PHP Version: 5.3.29
Zend Engine Version: 2.3.0
Running on: Linux ip-10-0-1-160 4.1.7-15.23.amzn1.x86_64 #1 SMP Mon Sep 14 23:20:33 UTC 2015 x86_64
与 pear
一样的问题。我是用 yum 安装的。所以,首先删除那个。
sudo yum -y remove php-pear
然后我就这样安装了pear
wget http://pear.php.net/go-pear.phar
/usr/local/bin/php -q php-phar
现在pear -V
显示
PEAR Version: 1.10.1
PHP Version: 5.4.13
那么,就
pecl install gearman
然后复制 gearman.so 文件到 php.ini