centos6.5安装swoole-1.7.6

php版本:5.3.3

两种安装方式

 1:计较简单

        pecl install swoole 需要安装pecl工具,我虚拟机上没有安装成功

 2:编译安装

    先执行:yum install php-devel php-pear

   swoole下载地址:https://github.com/swoole/swoole-src/releases

   wget https://github.com/swoole/swoole-src/archive/swoole-1.7.6-stable.tar.gz
   tar -zxvf swoole-1.7.6-stable.tar.gz
   cd swoole-src-swoole-1.7.6-stable 
   phpize 
   ./configure 
   make  && make install 

   如果出现:Build complete.就表示安装成功

下来修改php.ini添加swoole扩展

   extension_dir = "/usr/lib64/php/modules/"这个centos里边如果是yum安装的php,扩展默认就在这个目录,可以不配置
   添加extension=swoole.so

重启php-fpm:  /etc/init.d/php-fpm  restart

在phpinfo里能到swoole就表示成功了,下边就开始愉快地使用swoole吧


猜你喜欢

转载自blog.csdn.net/xueshao110/article/details/80286840