Install PHP zookeeper on CentOS Server
Install PHP zookeeper on CentOS
The latest version of Apache Zookeeper (in .tgz format) can be downloaded from the below URL :
Before installing check whether the version you are downloading is beta, alpha or stable.
Follow the below steps to install PHP zookeeper extension using pecl.
1. First you must log into your CentOS server as ‘root’ user
2. Check whether gcc and make package is installed on the Linux server.
You might get errors if these packages are not installed. Run the below command if gcc and make is not installed.
# yum install gcc make
3. Download and install libzookeeper and libzookeeper-devel rpm
rpm -Ivh libzookeeper-xxxxxx.el7.x86_64.rpm
rpm -Ivh libzookeeper-devel-xxxxxx.el7.x86_64.rpm
4. Run the command ‘pecl install pecl/zookeeper’ to install zookeeper PHP extension
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading zookeeper-0.5.0.tgz ...
Starting to download zookeeper-0.5.0.tgz (26,780 bytes)
.........done: 26,780 bytes
12 source files, building
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
Build process completed successfully
install ok: channel://pecl.php.net/zookeeper-0.5.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=zookeeper.so" to php.ini
Run the command php --ini to find the PHP configuration file path.
6. Add “extension=zookeeper.so” to PHP configuration file /etc/php.ini
echo “extension=zookeeper.so” >> /etc/php.ini
On my server, the PHP configuration file is in /etc/php.ini. Configuration file path might be different on your server.
7. Run the below command to make sure zookeeper PHP extension is enabled
php -m | grep zookeeper
How to uninstall PHP zookeeper extension
2. Run the command ‘pecl uninstall pecl/zookeeper’ to remove zookeeper extension.
Unable to remove "extension=zookeeper.so" from php.ini
uninstall ok: channel://pecl.php.net/zookeeper-0.5.0