• linux安装php拓展大全


    原文作者: xingguang
    原文链接:https://www.tiance.club/post/784803616.html

    centos7安装php拓展大全
       有一个小想法,整理一篇linux下安装php拓展大全文章,方便自己或其它人开箱即用,目前就自己遇到哪些需要安装的拓展安装后就顺便更新到这篇博客文章。

    1、Yaconf

    git clone https://github.com/laruence/yaconf
    cd yaconf/
    phpize
    ./configure --with-php-config=/usr/local/php/bin/php-config
    make && make install
    
    vim /usr/local/php/etc/php.ini
    [Yaconf]
    extension=yaconf.so #扩展引用
    yaconf.directory=/home/www/conf #conf文件所在目录
    yaconf.check_delay=0 #心跳检查时间,若为0则不检查,但如果有修改,需重启PHP
    
    读取值:
    echo Yaconf::get("web_env.MYSQL_ETC1_MASTER_HOST"); //test是配置文件名字
    
    判断是否有该项设置
    echo Yaconf::has("web_env.MYSQL_ETC1_MASTER_HOST"); //test是配置文件名字
    

    2、xdebug

    wget http://xdebug.org/files/xdebug-2.8.1.tgz
    tar zxvf xdebug-2.8.1.tgz
    cd xdebug-2.8.1
    phpize
    ./configure --enable-xdebug --with-php-config=/usr/local/php/bin/php-config
    make && make install
    
    [Xdebug]
    zend_extension=xdebug.so 
    xdebug.idekey = PHPSTROM
    xdebug.default_enable = 1 
    xdebug.remote_connect_back = 1 
    xdebug.remote_port = 9000 
    xdebug.remote_enable = 1 
    xdebug.remote_autostart = 1 
    xdebug.remote_handler="dbgp"
    xdebug.remote_host=192.168.33.10
    

    3、protobuf

    wget https://github.com/allegro/php-protobuf/archive/master.zip
    unzip master.zip
    cd php-protobuf-master/
    phpize
    ./configure --with-php-config=/usr/local/php/bin/php-config
    make && make install
    
    然后在php.ini里面加一下extension = protobuf.so,再重启php
    

    4、mongodb

    wget http://pecl.php.net/get/mongodb-1.7.4.tgz
    tar -zxvf mongodb-1.7.4.tgz
    cd mongodb-1.7.4/
    phpize
    ./configure --with-php-config=/usr/local/php/bin/php-config && make && make install
    
    然后在php.ini里面加一下extension = mongodb.so,再重启php
    

    5、swoole

    wget https://github.com/swoole/swoole-src/archive/v4.4.16.tar.gz
    tar zxvf v4.4.16.tar.gz 
    cd swoole-src-4.4.16
    phpize
    ./configure --enable-openssl --enable-http2 --with-php-config=/usr/local/php/bin/php-config
    make && make install
    
    
    [swoole]
    extension=swoole
    swoole.use_shortname = Off
    

    原文作者: xingguang
    原文链接:https://www.tiance.club/post/784803616.html

  • 相关阅读:
    算法——基础
    递归函数
    docker常用命令
    vue——计算属性和侦听器
    vue——指令系统
    vue——介绍和使用
    webpack、babel模块、模块化
    Nodejs介绍及npm工具使用
    ECMAScript 6简介
    easyui(入门)
  • 原文地址:https://www.cnblogs.com/yizhidaozuihou/p/12830016.html
Copyright © 2020-2023  润新知