1.安装php zookeeper扩展
1、https://archive.apache.org/dist/zookeeper/zookeeper-3.4.12/
2、tar -xzvf zookeeper-3.4.12.tar.gz,将conf下的conf复制并改为zoo.cfg
3、cd zookeeper-3.4.12/src/c
4、./configure -prefix=/usr/local/zookeeper-3.4.12/
5、make && make install
6、下载扩展https://github.com/php-zookeeper/php-zookeeper
7、phpize
8、./configure --with-libzookeeper-dir=/usr/local/zookeeper-3.4.12/
9、make && make install
第8步如果提示 not find php_session.sh,加上--with-php-config=/usr/local/php5/bin/php-config
./configure --with-libzookeeper-dir=/Users/johnnyzhang/zookeeper3.4.12 --with-php-config=/usr/local/php5/bin/php-config
第1〜4步,一定要用zookeeper-3.4.12,其他版本都没有成功。原因是自zookeeper-3.5. 版本后安装方式有改变*
不要使用https://github.com/apache/zookeeper 下载
在appche 官网下载的是编译后的
2.安装命令
apt-get install php7.2
115 apt-get install php7.2-swoole
116 apt-get install php-swoole
118 apt install php-pear
148 pecl install swoole #需要安装 php7.2-dev
150 sudo apt-get install php7.2-dev
153 sudo apt-get install php7.2-mysql
155 sudo apt-get install php7.2-curl
157 sudo apt-get install php7.2-fpm
160 pecl install swoole
- name: 编译安装扩展模块 librdkafka-master.zip
shell: cd /tmp/librdkafka-master;./configure && make && make install
- name: 编译安装扩展模块 php-rdkafka-3.0.1.tar.gz
shell: cd /tmp/php-rdkafka-3.0.1;/usr/local/php/bin/phpize && ./configure --with-php-config=/usr/local/php/bin/php-config && make && make install
name: 编译安装扩展模块 swoole-2.1.3.tgz
shell: cd /tmp/swoole-2.1.3;/usr/local/php/bin/phpize && ./configure --with-php-config=/usr/local/php/bin/php-config && make && make install
- name: 编译安装扩展模块 zookeeper-3.4.12.tar.gz
shell: cd /tmp/zookeeper-3.4.12/src/c;./configure --prefix=/usr/local/zookeeper/zookeeper-3.4.12/ && make && make install
- name: 编译安装扩展模块 zookeeper-0.5.0.tgz
-
shell: cd /tmp/zookeeper-0.5.0;/usr/local/php/bin/phpize && ./configure --with-php-config=/usr/local/php/bin/php-config --with-libzookeeper-dir=/usr/local/zookeeper/zookeeper-3.4.12/ && make && make install
name: 编译安装扩展模块 mongodb-1.3.4.tgz
shell: cd /tmp/mongodb-1.3.4;/usr/local/php/bin/phpize && ./configure --with-php-config=/usr/local/php/bin/php-config && make && make install
name: 编译安装扩展模块 redis-3.1.6.tgz
shell: cd /tmp/redis-3.1.6;/usr/local/php/bin/phpize && ./configure --with-php-config=/usr/local/php/bin/php-config && make && make install
history |grep install 查看安装命令
apt =apt-get +apt-cache+ apt-config
apt show install
3.安装reids扩展
sudo apt update && sudo apt install libzstd-dev
pecl install igbinary
pecl install zstd
pecl install lzf
#缺少组件执行上面
pecl install redis