php怎么安装grpc扩展
2022-12-02 09:01:16
217
{{single.collect_count}}

php安装grpc扩展的方法:首先在php.ini文件中添加grpc扩展配置;然后安装protobuf及其php扩展;最后重启php-fpm即可。

php入门到就业线上直播课:进入学习
Apipost = Postman + Swagger + Mock + Jmeter 超好用的API调试工具:点击使用

本文操作环境:CentOS Linux release 7.6.1810系统、PHP7.1版,Dell G3电脑

php怎么安装grpc扩展?

PHP71 安装Google gRPC扩展

“打开” gRPC 的步骤

安装 gRPC 及其 php 扩展

git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpccd grpcgit submodule update --initmakemake installcd src/php/ext/grpcphpize./configure --with-php-config=/usr/local/php/bin/php-configmakemake installvi /usr/local/php/etc/php.ini
登录后复制

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

安装 protobuf 及其 php 扩展

cd ../../../../third_party/protobuf./autogen.sh./configuremakemake installcd php/ext/google/protobufphpize./configure --with-php-config=/usr/local/php/bin/php-configmakemake installvi /usr/local/php/etc/php.ini
登录后复制

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

重启 php-fpm

推荐学习:《PHP视频教程

以上就是php怎么安装grpc扩展的详细内容,更多请关注php中文网其它相关文章!

回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}