Google's gRPC is a remote procedure call (RPC) system that communicates over HTTP/2, uses Protocol Buffers to serialize data, works across programming languages, and provides many other features such as pluggable authentication.
To install this extension, run the following commands as your server's root user:
sudo apt-get -y install gcc g++ make autoconf libc-dev pkg-config sudo apt-get -y install zlib1g-dev sudo peclX.Y-sp install grpc
Once installed, create a configuration file for the extension and restart PHP by running the following commands as root:
sudo bash -c "echo extension=grpc.so > /etc/phpX.Y-sp/conf.d/grpc.ini" sudo service phpX.Y-fpm-sp restart
The gRPC extension does not support PHP 5.4.
You can verify the gRPC extension is installed correctly by running this command:
phpX.Y-sp -i | grep -i grpc
You should see output like the following:
grpc grpc support => enabled grpc module version => 1.9.0
To uninstall this extension, as root run the commands:
sudo rm /etc/phpX.Y-sp/conf.d/grpc.ini sudo peclX.Y-sp uninstall grpc
Next, restart PHP-FPM with the command:
sudo service phpX.Y-fpm-sp restart