Install zeromq Message Queue Software in linux

Source: Internet
Author: User
In the previous section about technology selection of message-oriented middleware-RabbitMQ, ActiveMQ, and ZeroMQ, we introduced some related message queue software.

In the previous section about technology selection of message-oriented middleware-RabbitMQ, ActiveMQ, and ZeroMQ, we introduced some related message queue software. here we will introduce how to install zeromqq and how to use php.

Install zeromq Message Queue Software in centos.

1. install the server

123456 Cd ~ Wget http://download.zeromq.org/zeromq-3.2.3.tar.gztarzxvf zeromq-3.2.3.tar.gzcdzeromq-3.2.3./configure # -- prefix =/usr/local/zeromqmake & makeinstall

2. install php extension

12345 Git clone git: // register

After the execution, a message is displayed:

Installing shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/

The dynamic link library file zmq. so is generated. you can check whether zmq. so is in the directory.

If the prompt is displayed during make

Checking for pkg-config.../usr/bin/pkg-config
Checking libzmq installation... configure: error: Unable to find libzmq installation

You only need to cancel the-prefix of zeromq installation.

3. configure PHP. INI

Modify the/usr/loal/php/etc/php. ini file and add a line in the extension block.

1 Extension = zmq. so

And then restart php-fpm. use phpinfo () to check whether zmq's php extension has been installed successfully.

IV. instances

12 Cdphp-zmqmvexamples // usr/local/nginx/html/

Access http: // localhost/examples/client. php and you will see string (7) "Got it! "Indicates that the queue is successfully written.

Now you can check whether Port 5555 is listened on.

1 Netstat-anp | grep5555

Php user manual reference: http://zguide.zeromq.org/php:all

Related Article

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.