Install grpc using pecl

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.

  • grpc, install grpc on centos
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to upgrade PHP to 7.4 in centos 7?

Enter the following commands on the terminal to upgrade PHP:      1 . To install the latest...

Protocol Buffer Compiler Installation

How to install the protocol buffer compiler. While not mandatory, gRPC applications often...

How to Install Go on CentOS 7

Go, often referred to as golang is a modern open-source programming language created by Google....

Configure gRPC for go and protoc

Quick start This guide gets you started with gRPC in Go with a simple working example....