Skip to content

Instantly share code, notes, and snippets.

@jaxtheking
Last active January 7, 2022 11:27
Show Gist options
  • Save jaxtheking/4a122e417db180585e38b912efb96129 to your computer and use it in GitHub Desktop.
Save jaxtheking/4a122e417db180585e38b912efb96129 to your computer and use it in GitHub Desktop.
Install gRPC on Centos 6.x (cPanel + EA4)
$ cd ~
## Update gcc compiler
$ sudo yum install centos-release-scl
$ sudo yum install devtoolset-8
$ scl enable devtoolset-8 bash
## Get latest stable gRPC repo
$ git clone -b v1.23.0 https://github.com/grpc/grpc
## Disable PERL threads
Open file /usr/share/automake-1.11/Automake/Config.pm
Find line: our $perl_threads = 1;
Change 1 to 0 so it looks like: our $perl_threads = 0;
## Build gRPC
$ cd ~/grpc
$ git submodule update --init
$ CFLAGS="-Wno-cast-function-type" make
$ sudo make install
## Build gRPC PHP extension for a specific version
$ cd ~/grpc/src/php/ext/grpc
$ /opt/cpanel/ea-php72/root/usr/bin/phpize
$ ./configure --enable-shared --with-php-config=/opt/cpanel/ea-php72/root/usr/bin/php-config
$ make
$ sudo make install
## Install Protobuf with PECL
$ sudo pecl install protobuf
## Build gRPC PHP plugin
$ cd ~/grpc
& make grpc_php_plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment