How to install PHP extension libzookeeper

Source: Internet
Author: User
How to install PHP extension libzookeeper (https://github.com/Timandes/libzookeeper) is mainly used to connect to the Zookeeper cluster using PHP code.

The expansion simplifies the functionality of the original Zookeeper C Client (https://zookeeper.apache.org/), emphasizing simplicity and ease of use.

At the same time, in the spirit of openness, more people are allowed to participate in the development and use of Zookeeper.

The libzookeeper extension depends on the Zookeeper C Client, which is included in the Zookeeper installation package. for the installation method, see https://zookeeper.apache.org/doc/r3.5.0-alpha/zookeeperprogrammers.html.

The following describes how to install libzookeeper (v0.3.1 is used as an example ):

1) Download and decompress the installation package:

Wget https://github.com/Timandes/libzookeeper/archive/v0.3.1.tar.gz libzookeeper-0.3.1.tar.gz

Tar xvf libzookeeper-0.3.1.tar.gz

2) compile and install extensions:

Cd libzookeeper-0.3.1

Phpize

./Configure -- with-libzookeeper =/path/to/zookeeper_c_client

Make

Make install

Here,/path/to/zookeeper_c_client represents the path of the Zookeeper C Client that has been installed.

3) edit php. ini and insert the following code line:

Extension = libzookeeper. so

4) If you are using a PHP-FPM, you need to restart the service:

Service php-fpm restart

5) Check the scaling load:

Php-m | grep libzookeeper

If you encounter any problems during the installation, go to https://github.com/timandes/libzookeeperto ask.

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.