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

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

Installing 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-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: info-contact@alibabacloud.com 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.