PHP Installation Swoole Extensions

Source: Internet
Author: User

Compiling the installation

The swoole extension was built in accordance with the PHP standard Extension. Use Phpize to generate a PHP compilation configuration,./configure to do the compile configuration detection, make to compile, make install Installation.

    • Please download the releases version of Swoole and pull the latest code directly from the GitHub trunk may compile but
    • If the current user is not root, there may be no write permission for the PHP directory, or the installation requires sudosu
    • If you are updating your code directly on a git branch git pull , be sure to do so before recompilingmake clean
Installation Preparation

Before installing swoole, you must ensure that the following software has been installed

php-5.3.10 或更高版本gcc-4.4 或更高版本makeautoconfpcre (centos系统可以执行命令:yum install pcre-devel)
    • Https://github.com/swoole/swoole-src/releases
    • Http://pecl.php.net/package/swoole
    • Http://git.oschina.net/swoole/swoole

After downloading the source code package, enter the source directory at the terminal, execute the following command to compile and install

CD Swoolephpize./configuremake sudo make install

PECL

Swoole project has been included in the official PHP extension library, in addition to manual download compilation, but also through the official PHP pecl command, one-click Download Installation Swoole

PECL Install Swoole

If there is a version problem with php5.3.3 (cli), http://www.cnblogs.com/cxscode/p/7368131.html

Configure PHP.ini

After compiling and installing successfully, modify php.ini to join

Extension=swoole.so

php -m phpinfo() php.ini You can use php -i |grep php.ini to navigate to the absolute path by or to see if the Swoole has been successfully loaded, if there is no path that is not possible php.ini .

You can also locate the location of the swoole.so and paste the swoole.so copy into the php.ini corresponding Extension_dir path

cp/usr/lib64/php/modules/swoole.so/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226

Excerpted from official Documents: https://wiki.swoole.com/wiki/page/6.html

PHP Installation Swoole Extensions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.