I want to implement "GEARMAN" in project but I don't know how to install or configure "GEARMAN" in windows OS. Can anyone provide me any link from where I can work with "GEARMAN"?
-
It looks as though Gearman only runs on Linux at the moment. – Lazarus Apr 07 '11 at 12:27
-
Windows through the Perl Gearman server is somewhat supported, but really only for developing purposes. – Htbaa Apr 07 '11 at 12:54
3 Answers
Gearman has to be compiled under the cygwin environment :
- install cygwin and open the shell;
- download and install libevent;
- download and install gearman server.
Here is a more detailed tutorial : http://www.phpvs.net/2010/11/30/installing-gearman-and-gearmand-on-windows-with-cygwin/.
Official website for "Gearman" is best I believe. You can find out "Documentation", "How to install" & "Examples" in this site : http://gearman.org/
And also you will get examples here : http://php.net/manual/en/gearman.examples-reverse-task.php
Getting Started with "Gearman" : http://gearman.org/getting-started/
On Windows: http://www.phpvs.net/2010/11/30/installing-gearman-and-gearmand-on-windows-with-cygwin/
Best of luck. I believe you will love to work with "Gearman" with full gear.

- 1,949
- 1
- 13
- 24
-
please tell me how to install gearman on windows 7 with xampp. For OS link mentioned here is not working. – Raheel Feb 17 '15 at 07:14
How to install GEAR MAN
References
- http://www.cppblog.com/guojingjia2006/archive/2012/12/28/196743.html
- https://gist.github.com/mnapoli/5270256 ( Gearman and libevent folder downloaded and extracted from here )
- https://julienliabeuf.com/installing-pear-windows/
- http://www.smorgasbork.com/2010/06/16/building-a-distributed-app-with-netgearman-part-1/
- https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx
- https://github.com/brianlmoon/net_gearman ( Net folder downloaded from here )
- http://preshing.com/20141108/how-to-install-the-latest-gcc-on-windows/
Steps
- Download cygwin (setup-x86_64.exe)
- Double click setup file
- On select packages change view to -> Category
To install libuuid1-devel, Search for uuid select the followings
- Debug 1.221-2
- Libs 2.25.2-2
- Perl 1.221-2
To install libboost-devel, Search libboost-devel and select the followings
- Libs 1.66.0-15.
To install libmpfr4, Search libmpfr4 and select the followings
- Libs 3.1.6-1p1
- Math 3.1.6-1p1
To install gcc-g++ , Search g++ and select the followings
- Libs 7.3.0-2
Click next to install
Search on windows for cygwin-terminal -> click on it, This should be coming without any errors
Install more packages
Goto CMD
C:\cygwin64> setup-x86_64.exe -q -P make C:\cygwin64> setup-x86_64.exe -q -P boost C:\cygwin64> setup-x86_64.exe -q -P libiconv
Now cygwin installed successfully
11.1 Now download gearmand.. and libevent...* from (https://gist.github.com/mnapoli/5270256) and paste into --> C:/cygwin64/tmp/
=================================================================================
Search on windows for cygwin-terminal -> click on it
type -> cd C:
Type --> cd cygwin64/tmp/libevent...*
Type --> ./configure
Type --> make
Type --> make install
Note:
Now libevent should be installed on /usr/local/lib, but this path is not in the library path and GCC will not find it automatically.
You can copy the generated libraries to /usr/lib:
cp /usr/local/lib/libevent* /usr/lib (this is not the cleanest solution, you are welcome to propose an alternative)
Now install gearman
If you are in /usr/lib right now, type /cygdrive/c to come to installation folder
Type --> cd tmp
Type --> cd cygwin64/tmp/gearman..
Type --> ./configure
Type --> make
Type --> make install
Note:
************** Before this you need to enable port 4730 on windows firewall Goto step 24 ******
Now the server is installed and you can launch it from a cygwin terminal:
/usr/local/sbin/gearmand.exe Or if you want it to be ultra verbose:
/usr/local/sbin/gearmand.exe -vvv You can also start the process and detach it from the terminal:
gearmand -d
=========================================================================
Enabling port 4730 on inbound rules
control panel -> System and security -> windows firewall -> Advance settings -> inbound rules
right click inbound rules -> new rule -> Port -> Select Tcp -> Enter port number (4730)
click next -> Give name as "Gearman port"
Finish
==============================================================================
Now we need to make gearman communicate with php PEAR
Reference --> this is for windows xampp -> https://julienliabeuf.com/installing-pear-windows/
Following steps to install on windows iis server
C:\Program Files (x86)\PHP\v7.1
Enter --> system wide
Enter to continue
Proceed to change php.ini
Make sure php.ini -> include_path referst to pear path as follows
;***** Added by go-pear include_path=".;C:\Program Files (x86)\PHP\version.*\pear" ;*****
go to C:\Program Files (x86)\PHP\version.*
Double click PEAR_ENV.reg to add to environment variables
Copy Net folder and paste it inside -- C:\Program Files (x86)\PHP\version.*\pear
On command prompt type -> pear install Net_Gearman-alpha
Enter
Open php.ini paste following line on end ( To enable socket )
extension=php_sockets.dll
Note: Make sure php_sockets.dll exists under php/version.*/ext
Make copy of php.ini and rename it as php-cli.ini ( This is to run on command prompt )
Hooray! that's it, done.
Now you should try demo with following links https://github.com/brianlmoon/net_gearman
Note: Don't forget to include libraries also

- 850
- 1
- 10
- 25
-
-
@Shwet For me I took a whole day, As i was not familiar with windows server. – phpnerd Dec 19 '18 at 13:21