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"?
How to configure or install GEARMAN in windows OS?
8.3k views Asked by Chandru AtThere are 3 answers
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.
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/.
How to install GEAR MAN
References
Steps
To install libuuid1-devel, Search for uuid select the followings
To install libboost-devel, Search libboost-devel and select the followings
To install libmpfr4, Search libmpfr4 and select the followings
To install gcc-g++ , Search g++ and select the followings
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
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