How to easily install gRPC extention in OpenLiteSpeed
The gRPC service is an open-source software framework made by Google that allows developers to create high-performance, highly scalable network services. It is based on the lightweight protocol called Protocol Buffers. In case you are wondering what is gRPC (Google Remote Procedure Call) and how does it work, it can be summed up in one phrase: to communicate between two programs located on remote machines. This blog will describe how to setup and install the gRPC extension on OpenLiteSpeed server installed via RunCloud panel (a Light-Weight Cloud platform). As shown below, we can easily install the gRPC extension in OpenLiteSpeed server.For installing gRPC in RunCloud Nginx server refer : How to install gRPC extension on RunCloud | Nginx (linuxtutorialz.co.uk)
Please have a check and let us know how it goes.
Step 1
Normally, the installation will rely on 'php-dev,' which will assist you in installing; however, the PHP-CLI or installation version may not be specified. To begin, we must build a symlink for the 'php-config' and 'phpize' folders. I'm using PHP version 74 in this example.
ln -s /usr/local/lsws/lsphp74/bin/php-config /usr/bin/php-config
ln -s /usr/local/lsws/lsphp74/bin/phpize /usr/bin/phpize
Step 2
Once done that, we can run following command.
/usr/local/lsws/lsphp74/bin/pecl install grpc
Please note, it may take some time to finish this step.
Once the installation steps successfully completed, you need to run below command.
sudo echo "extension=grpc.so" >> /usr/local/lsws/lsphp74/etc/php.d/grpc.ini
If grpc.ini file is not existing then you need to create them before executing above step. Step 3
Next, to reflect this changes, we just need to restart lsws service.
service lsws-rc restart
Comments
Post a Comment