- 1.开始安装 pthreads,数组72表示我用的是7.2版本的PHP
- [root@localhost ~]# wget https://codeload.github.com/krakjoe/pthreads/zip/master
- [root@localhost ~]# unzip master
- [root@localhost ~]# cd pthreads-master/
- [root@localhost pthreads-master]# phpize
- [root@localhost pthreads-master]# /www/server/php/72/bin/phpize
- [root@localhost pthreads-master]#./configure --with-php-config=/www/server/php/72/bin/php-config
- [root@localhost pthreads-master]# make && make install
- [root@localhost pthreads-master]# echo "extension = oauth.so" >> /www/server/php/72/etc/php.ini
- [root@localhost pthreads-master]# /etc/init.d/php-fpm-72 reload
- [root@localhost pthreads-master]# cd .. && rm -rf pthreads-master* //清除下载的文件
- 1、确认扩展存在
- [root@localhost ~]# php -m| grep pthreads
- pthreads
复制代码
|
|