Home > Backend Development > PHP Tutorial > Installation of php-zmq

Installation of php-zmq

WBOY
Release: 2016-07-29 09:15:20
Original
1844 people have browsed it
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 (hereinafter ZeroMQ is referred to as ZMQ) is a simple and easy-to-use transport layer, a socket library like a framework. It makes Socket programming simpler, more concise and more performant. Is a message processing queue library that elastically scales across multiple threads, cores, and host boxes. The clear goal of ZMQ is to "become part of the standard network protocol stack and then enter the Linux kernel
Feature introduction:
ZMQ is not like a message queue server in the traditional sense. In fact, it is not a server at all, it is more like It is a low-level network communication library that encapsulates the Socket API to abstract network communication, process communication and thread communication into a unified API interface. Disadvantages: ZeroMq does not support message persistence and is prone to data loss.


Supports 3 modes:

1. hello world

single queue mode
2. Publish-subscribe
subscription mode
3. PipeLine model
If we need to count the logs of each machine, we need to distribute the statistical tasks to each node machine on, finally collect the statistical results and make a summary


Reference blog:

http://www.linuxde.net/2013/05/13647.html


ZMQ API reference manual: http://api.zeromq.org /
PHP user manual can be referred to: http://zguide.zeromq.org/php:all

ZeroMQ learning and research: http://www.searchtb.com/2012/08/zeromq-primer.html

ZMQ PHP Programming reference manual: http://php.zero.mq (unreachable)
ZeroMQ, the fastest message queue in history—ZMQ learning and research http://news.cnblogs.com/n/154000/
Here it is A large number of program examples are available for reference: https://github.com/imatix/zguide


The above has introduced the installation of php-zmq, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template