如何在Windows操作系统中配置或安装GEARMAN?
我想在项目中实现“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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
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/.
我认为“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.
如何安装GEAR MAN
参考
步骤
要安装 libuuid1-devel,搜索 uuid 选择以下内容
要安装 libboost-devel,搜索 libboost-devel 并选择以下内容
要安装 libmpfr4,请搜索 libmpfr4 并选择以下内容
要安装 gcc-g++,请搜索 g++ 并选择以下内容
单击下一步安装
在 Windows 上搜索 cygwin-terminal ->单击它,这应该不会出现任何错误
安装更多包
转到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
现在 cygwin 安装成功
11.1 现在下载 gearmand.. 和 libevent..。 * 来自 (https://gist.github.com/mnapoli/5270256) 并粘贴到 --> C:/cygwin64/tmp/
=============================================== ========================================
在 Windows 上搜索 cygwin-terminal -> ;单击它
输入-> cd C:
类型 --> cd cygwin64/tmp/libevent...*
类型 --> ./configure
类型 --> make
类型 --> make install
注意:
现在libevent应该安装在/usr/local/lib下,但是这个路径不在库路径中,GCC不会自动找到它。
您可以将生成的库复制到 /usr/lib :
cp /usr/local/lib/libevent* /usr/lib
(这不是最干净的解决方案,欢迎您提出替代方案)
现在安装 gearman
如果您现在位于 /usr/lib 中,请键入 /cygdrive/c 进入安装文件夹
Type -->; cd tmp
类型 --> cd cygwin64/tmp/gearman..
类型 --> ./configure
类型 --> make
类型 --> make install
注意:
************** 在此之前,您需要在 Windows 防火墙上启用端口 4730 转到步骤 24 ******
现在服务器已安装,您可以从cygwin 终端:
/usr/local/sbin/gearmand.exe
或者,如果您希望它非常详细:
/usr/local/sbin/gearmand.exe -vvv
您还可以启动该进程并将其与终端分离:
gearmand -d
==================================== =========================================
在入站规则
控制面板 上启用端口 4730 ->系统与安全-> Windows 防火墙 ->高级设置->入站规则
右键单击入站规则->新规则->端口->选择Tcp->输入端口号(4730)
点击下一步->将名称命名为“Gearman port”
完成
====================================== ==============================================
现在我们需要制作 gearman与 php PEAR
通信参考 -->这是适用于 Windows xampp -> https://julienliabeuf.com/installing-pear-windows/
按照以下步骤安装windows iis 服务器
C:\Program Files (x86)\PHP\v7.1
Enter -->系统范围
输入继续
继续更改 php.ini
确保 php.ini -> include_path引用pear路径如下
go to C:\Program Files (x86)\PHP\version.*
Double单击 PEAR_ENV.reg 添加到环境变量
复制 Net 文件夹并将其粘贴到 -- C:\Program Files (x86)\PHP\version.*\pear
在命令提示符下键入 ->; pear install Net_Gearman-alpha
Enter
打开 php.ini 将以下行粘贴到末尾(以启用套接字)
extension=php_sockets.dll
注意:确保 php_sockets.dll 存在于 php/version.*/ext
复制 php.ini 并将其重命名为 php-cli.ini(这是为了在命令提示符下运行)
万岁!就这样,完成了。
现在您应该尝试使用以下链接进行演示
https://github.com/brianlmoon/net_gearman
注意:不要忘记也包含库
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