DEV Community

Bryan
Bryan

Posted on • Originally published at devlogbook.com

1 1

Installing GRPC and Protobuf using Laravel Forge

Installing GPRC and Protobuf with Laravel Forge is easy. Just follow these steps.

Adding the script to recipes

  1. Go to Recipes
  2. Put any name
  3. Keep user as root
  4. 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"
Enter fullscreen mode Exit fullscreen mode

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
Your Recipes Area

  1. Click the green button with the triangle to run the script
  2. Choose the server you want to have it run in and have it notify you when it's done
  3. Once it's done, go to Laravel Forge, for the server go to PHP on the left
  4. Edit the php.ini for both FPM and CLI Editing php.ini
  5. Add the following to the bottom of php.ini then restart PHP
extension=grpc.so
extension=protobuf.so
Enter fullscreen mode Exit fullscreen mode

Running the script during server setup

  1. Choose the Post-Provision Recipe to install GRPC and Protobuf Post-Provision Recipe
  2. Wait for the server to finish setting up
  3. Edit the php.ini for both FPM and CLI Editing php.ini
  4. Add the following to the bottom of php.ini then restart PHP
extension=grpc.so
extension=protobuf.so
Enter fullscreen mode Exit fullscreen mode

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay