Install grpc using pecl Print

  • grpc, install grpc on centos
  • 0

gRPC is a cross-platform open source high performance Remote Procedure Call framework. gRPC was initially created by Google, which has used a single general-purpose RPC infrastructure called Stubby to connect the large number of microservices running within and across its data centers for over a decade.

Prerequisites

  • php: version 7.0 or above (PHP 5.x support is deprecated from Sep 2020).
  • pecl
  • composer
  • phpunit (optional)
  • zlib-devel (sudo dnf -y install zlib-devel)

Install the grpc extension

There are two ways to install the grpc extension.

  • Via pecl
  • Build from source

Install from PECL

# [sudo] pecl install grpc

or specific version

# [sudo] pecl install grpc-1.51.3


Note: You should add "extension=grpc.so" to php.ini

# echo "extension=grpc.so" >> /etc/php.ini

Please make sure your gcc version satisfies the minimum requirement as specified here.


Was this answer helpful?

« Back