如何在Windows操作系统中配置或安装GEARMAN?

发布于 2024-10-31 03:31:17 字数 87 浏览 1 评论 0原文

我想在项目中实现“GEARMAN”,但我不知道如何在Windows操作系统中安装或配置“GEARMAN”。谁能给我提供任何可以与“GEARMAN”合作的链接吗?

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

国际总奸 2024-11-07 03:31:17

Gearman必须在cygwin环境下编译:
- 安装 cygwin 并打开 shell;
- 下载并安装 libevent;
- 下载并安装 gearman 服务器。

这是更详细的教程: http:// www.phpvs.net/2010/11/30/installing-gearman-and-gearmand-on-windows-with-cygwin/

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

忆梦 2024-11-07 03:31:17

我认为“Gearman”的官方网站是最好的。
您可以找到“文档”、“如何安装”和“本网站的“示例”:
http://gearman.org/

您还将在这里获得示例:
http://php.net/manual/en/gearman.examples-reverse -task.php

“Gearman”入门:
http://gearman.org/getting-started/

在 Windows 上:http://www.phpvs.net/2010/11 /30/installing-gearman-and-gearmand-on-windows-with-cygwin/

祝你好运。相信你一定会喜欢和全副武装的“Gearman”一起工作。

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.

风柔一江水 2024-11-07 03:31:17

如何安装GEAR MAN


参考

  1. http://www.cppblog. com/guojingjia2006/archive/2012/12/28/196743.html
  2. https://gist.github.com/mnapoli/5270256 (Gearman 和 libevent 文件夹下载并提取自此处 )
  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 文件夹)
  7. http://preshing.com/20141108/how-to -install-the-latest-gcc-on-windows/

步骤

  1. 下载 cygwin (setup-x86_64.exe)
  2. 双击安装文件
  3. 选择软件包更改查看->类别
  4. 要安装 libuuid1-devel,搜索 uuid 选择以下内容

    • 调试1.221-2
    • 库 2.25.2-2
    • Perl 1.221-2
  5. 要安装 libboost-devel,搜索 libboost-devel 并选择以下内容

    • 库 1.66.0-15。
  6. 要安装 libmpfr4,请搜索 libmpfr4 并选择以下内容

    • 库 3.1.6-1p1
    • 数学3.1.6-1p1
  7. 要安装 gcc-g++,请搜索 g++ 并选择以下内容

    • 库 7.3.0-2
  8. 单击下一步安装

  9. 在 Windows 上搜索 cygwin-terminal ->单击它,这应该不会出现任何错误

  10. 安装更多包

    转到CMD

    C:\cygwin64> setup-x86_64.exe -q -P make
    C:\cygwin64> setup-x86_64.exe -q -P 升压
    C:\cygwin64> setup-x86_64.exe -q -P libiconv

  11. 现在 cygwin 安装成功

11.1 现在下载 gearmand.. 和 libevent..。 * 来自 (https://gist.github.com/mnapoli/5270256) 并粘贴到 --> C:/cygwin64/tmp/

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

  1. 在 Windows 上搜索 cygwin-terminal -> ;单击它

  2. 输入-> cd C:

  3. 类型 --> cd cygwin64/tmp/libevent...*

  4. 类型 --> ./configure

  5. 类型 --> make

  6. 类型 --> make install

注意:

现在libevent应该安装在/usr/local/lib下,但是这个路径不在库路径中,GCC不会自动找到它。

您可以将生成的库复制到 /usr/lib :

cp /usr/local/lib/libevent* /usr/lib
(这不是最干净的解决方案,欢迎您提出替代方案)


现在安装 gearman

  1. 如果您现在位于 /usr/lib 中,请键入 /cygdrive/c 进入安装文件夹

  2. Type -->; cd tmp

  3. 类型 --> cd cygwin64/tmp/gearman..

  4. 类型 --> ./configure

  5. 类型 --> make

  6. 类型 --> make install

注意:

************** 在此之前,您需要在 Windows 防火墙上启用端口 4730 转到步骤 24 ******

现在服务器已安装,您可以从cygwin 终端:

/usr/local/sbin/gearmand.exe
或者,如果您希望它非常详细:

/usr/local/sbin/gearmand.exe -vvv
您还可以启动该进程并将其与终端分离:

gearmand -d

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

在入站规则

  1. 控制面板 上启用端口 4730 ->系统与安全-> Windows 防火墙 ->高级设置->入站规则

  2. 右键单击入站规则->新规则->端口->选择Tcp->输入端口号(4730)

  3. 点击下一步->将名称命名为“Gearman port”

  4. 完成

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

现在我们需要制作 gearman与 php PEAR

通信参考 -->这是适用于 Windows xampp -> https://julienliabeuf.com/installing-pear-windows/

按照以下步骤安装windows iis 服务器

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

  2. Enter -->系统范围

  3. 输入继续

  4. 继续更改 php.ini

  5. 确保 php.ini -> include_path引用pear路径如下

    ;***** 由 go-pear 添加
        include_path=".;C:\Program Files (x86)\PHP\version.*\pear"
    ;*****
    
  6. go to C:\Program Files (x86)\PHP\version.*

  7. Double单击 PEAR_ENV.reg 添加到环境变量

  8. 复制 Net 文件夹并将其粘贴到 -- C:\Program Files (x86)\PHP\version.*\pear

  9. 在命令提示符下键入 ->; pear install Net_Gearman-alpha

  10. Enter

  11. 打开 php.ini 将以下行粘贴到末尾(以启用套接字)

    extension=php_sockets.dll

注意:确保 php_sockets.dll 存在于 php/version.*/ext

  1. 复制 php.ini 并将其重命名为 php-cli.ini(这是为了在命令提示符下运行)

  2. 万岁!就这样,完成了。

现在您应该尝试使用以下链接进行演示
https://github.com/brianlmoon/net_gearman

注意:不要忘记也包含库

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文