How to configure or install GEARMAN in windows OS?

ぃ、小莉子 提交于 2020-01-20 05:26:00

问题


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"?


回答1:


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/.




回答2:


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.




回答3:


How to install GEAR MAN


References

  1. http://www.cppblog.com/guojingjia2006/archive/2012/12/28/196743.html
  2. https://gist.github.com/mnapoli/5270256 ( Gearman and libevent folder downloaded and extracted from here )
  3. https://julienliabeuf.com/installing-pear-windows/
  4. http://www.smorgasbork.com/2010/06/16/building-a-distributed-app-with-netgearman-part-1/
  5. https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx
  6. https://github.com/brianlmoon/net_gearman ( Net folder downloaded from here )
  7. http://preshing.com/20141108/how-to-install-the-latest-gcc-on-windows/

Steps

  1. Download cygwin (setup-x86_64.exe)
  2. Double click setup file
  3. On select packages change view to -> Category
  4. To install libuuid1-devel, Search for uuid select the followings

    • Debug 1.221-2
    • Libs 2.25.2-2
    • Perl 1.221-2
  5. To install libboost-devel, Search libboost-devel and select the followings

    • Libs 1.66.0-15.
  6. To install libmpfr4, Search libmpfr4 and select the followings

    • Libs 3.1.6-1p1
    • Math 3.1.6-1p1
  7. To install gcc-g++ , Search g++ and select the followings

    • Libs 7.3.0-2
  8. Click next to install

  9. Search on windows for cygwin-terminal -> click on it, This should be coming without any errors

  10. 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

  11. Now cygwin installed successfully

11.1 Now download gearmand.. and libevent...* from (https://gist.github.com/mnapoli/5270256) and paste into --> C:/cygwin64/tmp/

=================================================================================

  1. Search on windows for cygwin-terminal -> click on it

  2. type -> cd C:

  3. Type --> cd cygwin64/tmp/libevent...*

  4. Type --> ./configure

  5. Type --> make

  6. 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

  1. If you are in /usr/lib right now, type /cygdrive/c to come to installation folder

  2. Type --> cd tmp

  3. Type --> cd cygwin64/tmp/gearman..

  4. Type --> ./configure

  5. Type --> make

  6. 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

  1. control panel -> System and security -> windows firewall -> Advance settings -> inbound rules

  2. right click inbound rules -> new rule -> Port -> Select Tcp -> Enter port number (4730)

  3. click next -> Give name as "Gearman port"

  4. 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

  1. C:\Program Files (x86)\PHP\v7.1

  2. Enter --> system wide

  3. Enter to continue

  4. Proceed to change php.ini

  5. 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"
    ;*****
    
  6. go to C:\Program Files (x86)\PHP\version.*

  7. Double click PEAR_ENV.reg to add to environment variables

  8. Copy Net folder and paste it inside -- C:\Program Files (x86)\PHP\version.*\pear

  9. On command prompt type -> pear install Net_Gearman-alpha

  10. Enter

  11. 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

  1. Make copy of php.ini and rename it as php-cli.ini ( This is to run on command prompt )

  2. 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



来源:https://stackoverflow.com/questions/5580956/how-to-configure-or-install-gearman-in-windows-os

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!