Installing GRPC and Protobuf using Laravel Forge
Bryan
Posted on September 21, 2022
Installing GPRC and Protobuf with Laravel Forge is easy. Just follow these steps.
Adding the script to recipes
- Go to Recipes
- Put any name
- Keep user as root
- Add the following script to the script input and click Create button
sudo pecl install grpc
sudo pecl install protobuf
echo "Add 'extension=grpc.so' to the php.ini file."
echo "Run 'php -i | grep grpc' in a terminal: it is well installed and configured if it returns something"
echo "Add 'extension=protobuf.so' to the php.ini file."
echo "Run 'php -i | grep protobuf' in a terminal: it is well installed and configured if it returns something"
Running the script after the server has been setup
In the Your Recipes, when you scroll down, your GRPC/Protobuf recipe will be shown like below
- Click the green button with the triangle to run the script
- Choose the server you want to have it run in and have it notify you when it's done
- Once it's done, go to Laravel Forge, for the server go to PHP on the left
- Edit the php.ini for both FPM and CLI
- Add the following to the bottom of php.ini then restart PHP
extension=grpc.so
extension=protobuf.so
Running the script during server setup
- Choose the Post-Provision Recipe to install GRPC and Protobuf
- Wait for the server to finish setting up
- Edit the php.ini for both FPM and CLI
- Add the following to the bottom of php.ini then restart PHP
extension=grpc.so
extension=protobuf.so
💖 💪 🙅 🚩
Bryan
Posted on September 21, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.