: This article describes how to install php-zmq. For more information about PHP tutorials, see. Zeromq installation --- php-zmq
Install zeromq
Wget http://download.zeromq.org/zeromq-4.0.5.tar.gz
Tar-zxvf zeromq-4.0.5.tar.gz
Cd zeromq-4.0.5
Cd foreign/openpgm/
Tar-zxvf libpgm-5.2.122 ~ Dfsg.tar.gz
./Configure -- prefix =/data/klj/zeromq -- with-pgm = libpgm-5.2.122 ~ Dfsg
Make
Make install
Install php-zmq extension
Git clone git: // github.com/mkoppanen/php-zmq.git
Cd php-zmq
/Data/klj/php/bin/phpize
./Configure -- with-php-c/klj/php/bin/php-config -- with-zmq =/data/klj/zeromq
Make & make install
Modify php. ini and restart
Error configure: error: Please reinstall the pkg-config distribution
Wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz
Tar-zxvf pkg-config-0.28.tar.gz
Cd pkg-config-0.28
./Configure -- with-internal-glib
Make & make install
ZMQ (ZMQ for short) is a simple and easy-to-use transmission layer. like a socket library like a framework, ZMQ makes Socket programming simpler, more concise, and more efficient. Is a message processing queue library that can be elastically scaled between multiple threads, kernels, and host boxes. ZMQ's clear goal is to "become part of the standard network protocol stack and then enter the Linux kernel
Features:
ZMQ is not like a message queue server in the traditional sense. In fact, ZMQ is not a server at all. it is more like a underlying network communication Library and is encapsulated on the Socket API, abstract network communication, process communication, and thread communication as a unified API interface
Disadvantages:
ZeroMq does not support message persistence and is prone to data loss.
The following three modes are supported:
1. hello world
Single queue mode
2. Publish-subscribe
Subscription mode
3. PipeLine model
To collect the logs of each machine, we need to distribute the statistical tasks to each node machine, collect the statistical results, and make a summary.
Refer to blog:
Http://www.linuxde.net/2013/05/13647.html
Zmq api Reference Manual: http://api.zeromq.org/
PHP user manual reference: http://zguide.zeromq.org/php:all
Learning and research of ZeroMQ: http://www.searchtb.com/2012/08/zeromq-primer.html
Zmq php Programming Reference Manual: http://php.zero.mq (inaccessible)
ZeroMQ, the fastest message queue in history-ZMQ learning and research http://news.cnblogs.com/n/154000/
There are a lot of examples for reference: https://github.com/imatix/zguide
The above introduces the installation of php-zmq, including some content. I hope my friends who are interested in the PHP Tutorial can help me.