How to Install Gearman on Windows 11

Gearman is a popular job server that is used in various web applications to distribute tasks to multiple workers. In this tutorial, we will guide you through the steps to install Gearman on Windows 11.

Prerequisites

To complete this tutorial, you need:

Step 1: Download the Gearman Binary

To download the Gearman binary, go to the Gearman website's download section and select the appropriate binary for Window 11. For instance, select the gearman-1.1.19-1-VC14-x86_64.zip file.

Step 2: Extract the Binary

Extract the downloaded binary to a folder of your choice. For instance, create a folder "gearman" in the "C:" drive and extract the binary to this folder.

Step 3: Add Gearman Path to System Environment Variables

To enable the system to use the Gearman binary, add the Gearman path to the system environment variables as follows:

  1. Press the Windows + R key to open the Run dialog box.
  2. Enter sysdm.cpl in the text box and click OK.
  3. Click on the "Advanced" tab.
  4. Click on the "Environment Variables" button.
  5. Under "System Variables", click on the "New" button.
  6. Enter GEARMAN_ROOT as the variable name and the path to the Gearman binary as the variable value. For instance, C:\gearman.
  7. Click on the "OK" button to save.

Step 4: Install the Gearman PHP Extension (Optional)

If you are using PHP with Gearman, you may want to install the Gearman PHP extension. To install the Gearman PHP extension:

  1. Open PowerShell with administrative privileges.
  2. Enter the following command: pecl install gearman-1.1.2
  3. If prompted, enter the Gearman path that you added to the system environment variables in step 3.
  4. Restart your Apache or Nginx server.

Step 5: Verify the Gearman Installation

To verify that Gearman is properly installed, open PowerShell and enter the following command:

gearadmin --version

If Gearman is properly installed, it should display the version number.

Conclusion

Congratulations! You have successfully installed Gearman on Windows 11. Now you can use Gearman to distribute tasks to multiple workers in your web applications.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!