php安装grpc扩展的方法:首先在php.ini文件中添加grpc扩展配置;然后安装protobuf及其php扩展;最后重启php-fpm即可。
本文操作环境:CentOS Linux release 7.6.1810系统、PHP7.1版,Dell G3电脑
php怎么安装grpc扩展?
PHP71 安装Google gRPC扩展
“打开” gRPC 的步骤
立即学习“PHP免费学习笔记(深入)”;
安装 gRPC 及其 php 扩展
git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc cd grpc git submodule update --init make make install cd src/php/ext/grpc phpize ./configure --with-php-config=/usr/local/php/bin/php-config make make install vi /usr/local/php/etc/php.ini
在 php.ini 文件中添加 grpc 扩展配置:extension=grpc.so
安装 protobuf 及其 php 扩展
cd ../../../../third_party/protobuf ./autogen.sh ./configure make make install cd php/ext/google/protobuf phpize ./configure --with-php-config=/usr/local/php/bin/php-config make make install vi /usr/local/php/etc/php.ini
在 php.ini 文件中添加 protobuf 扩展配置:extension=protobuf.so
重启 php-fpm
推荐学习:《PHP视频教程》
以上就是php怎么安装grpc扩展的详细内容,更多请关注php中文网其它相关文章!
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号