php安装grpc扩展的方法

1、在php.ini文件中添加grpc扩展配置:extension=grpc.so

gitclone-b$(curl-Lhttps://grpc.io/release)https://github.com/grpc/grpc
cdgrpc
gitsubmoduleupdate--init
make
makeinstall
cdsrc/php/ext/grpc
phpize
./configure--with-php-config=/usr/local/php/bin/php-config
make
makeinstall
vi/usr/local/php/etc/php.ini

2、安装 protobuf及其php扩展

cd../../../../third_party/protobuf
./autogen.sh
./configure
make
makeinstall
cdphp/ext/google/protobuf
phpize
./configure--with-php-config=/usr/local/php/bin/php-config
make
makeinstall
vi/usr/local/php/etc/php.ini

3、重启php-fpm。

原文来自:https://www.py.cn
© 版权声明
THE END
喜欢就支持一下吧
点赞10 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片快捷回复

    暂无评论内容