CentOS 6 安裝 gearman 和它的 php 擴展

0. PHP 中的 gearman 擴展

個人服務器使用的是 ius 的 php5.5 ,若是你使用其餘源和版本,請自行替換部分包名php

1. 安裝 epel 和 ius 源

yum install http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64/epel-release-6-5.noarch.rpm
yum install http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64/ius-release-1.0-11.ius.centos6.noarch.rpm

2. 安裝 gearman ,用於運行 gearman 服務

yum install gearmand

3. 安裝 libgearman 和 libgearman-devel ,用於編譯 php 擴展

yum install libgearman libgearman-devel

4. 安裝 pecl 和其餘依賴

yum install php-pear php55u-devel

5. 安裝 php 擴展

pecl install gearman

6. 修改配置文件 /etc/php.ini 增長 extension=gearman.so

You should add "extension=gearman.so" to php.ini

7.驗證安裝結果

# php -m | grep gearman
gearman
相關文章
相關標籤/搜索