zoukankan      html  css  js  c++  java
  • swoole4.4安装使用

    swoole文档:https://wiki.swoole.com/#/environment

    官方github源码包的下载地址,根据自己的需要下载,https://github.com/swoole/swoole-src/releases

    1.先下载官方扩展包,解压

    [root@iz8vbjfugmkid4cknmtq8bz ~]#wget https://codeload.github.com/swoole/swoole-src/zip/master
    [root@iz8vbjfugmkid4cknmtq8bz ~]# unzip master
    [root@iz8vbjfugmkid4cknmtq8bz ~]# cd swoole-src-master/
    

      

    2.使用phpize安装

    [root@iz8vbjfugmkid4cknmtq8bz swoole-src-master]# whereis phpize  #查看phpize路径,如果没有需要先安装phpize
    phpize: /usr/bin/phpize
    [root@iz8vbjfugmkid4cknmtq8bz swoole-src-master]# /usr/bin/phpize  #在源码包目录下执行phpize
    Configuring for:
    PHP Api Version:         20160303
    Zend Module Api No:      20160303
    Zend Extension Api No:   320160303
    [root@iz8vbjfugmkid4cknmtq8bz swoole-src-master]# ./configure --with-php-config=/usr/local/php/bin/php-config #执行编译检查
    [root@iz8vbjfugmkid4cknmtq8bz swoole-src-master]# make
    [root@iz8vbjfugmkid4cknmtq8bz swoole-src-master]# make install 
    Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20160303/
    Installing header files:          /usr/local/php/include/php/

    编译安装成功后,会显示出扩展的安装路径

    修改PHP配置文件加入swoole扩展

    vim /usr/local/php/etc/php.ini
    extension=swoole.so

    重启php-fpm生效
    输入php --ri swoole 查看swoole版本

  • 相关阅读:
    TCP/IP协议学习-1.概述
    Gitlab与Sonarqube整合-代码提交自动检测
    Kubernetes-4.Pods
    Kubernetes-3.安装
    Kubernetes-2.组件
    Kubernetes-1.概述
    第200题 数列极限积分
    English
    亮总语录
    RadioButton Control
  • 原文地址:https://www.cnblogs.com/cxscode/p/13158213.html
Copyright © 2011-2022 走看看