Installation of zeromq --- php-zmq, zeromq --- php-zmq_PHP tutorial

Source: Internet
Author: User
Zeromq installation --- php-zmq, zeromq --- php-zmq. Zookeeper cdzeromq-4.0.5cdforeignopenpgmtar-zx zeromq installation --- php-zmq, zeromq --- php-zmq

Install zeromq

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 install

Install php-zmq extension
Git clone git: //
Cd php-zmq
./Configure -- with-php-config =/data/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
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
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

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:

Zmq api Reference Manual:
PHP user manual reference:
Learning and research of ZeroMQ:
Zmq php Programming Reference Manual: (inaccessible)
ZeroMQ, the fastest message queue in history-ZMQ learning and research
There are a lot of examples for reference:

Installing zeromq wget tar-zxvf zeromq-4.0.5.tar.gz cd zeromq-4.0.5 cd foreign/openpgm/tar-zx...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.