首先 安装ZipArchive得有cmake跟libzip
安装cmake
cmake --version
卸载原来的:
remove cmake
yum install gcc g++ make -y
wget https://cmake.org/files/v3.9/cmake-3.9.2.tar.gz
tar -zxvf cmake-3.9.2.tar.gz
cd cmake-3.9.2
./configure
make
make install
cmake --version
如果不显示,特么谁写的make文件
把cmake-3.9.2/bin的 cmake文件复制到 /usr/bin下
cd bin
cp cmake /usr/bin
接下来安装libzip 1.7.3
wget https://libzip.org/download/libzip-1.7.3.tar.gz
tar -zxvf libzip-1.7.3.tar.gz
cd libzip-1.7.3
mkdir build && cd build && cmake .. && make && make install
上面不得就这个
mkdir build
cd build
cmake ..
make
make test
make install
然后呢安装ZipArchive **
自己看着改路径了要不装不上
**
cd ~
wget http://pecl.php.net/get/zip
tar -zxvf zip
cd zip-*
/vhs/kangle/ext/tpl_php5640/bin/phpize
./configure --with-php-config=/vhs/kangle/ext/tpl_php5640/bin/php-config
make
make instal
最后输出
Installing shared extensions: /vhs/kangle/ext/tpl_php5640/lib/php/extensions/no-debug-non-zts-20131226/
修改
/vhs/kangle/ext/tpl_php5640/php-templete.ini
加入本玩意
extension = "/vhs/kangle/ext/tpl_php5640/lib/php/extensions/no-debug-non-zts-20131226/zip.so"