Gearman-PHP擴充源碼編譯

來源:互聯網
上載者:User
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’ 查詢擴充是否已經安裝

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.