1. 安装 libzip
wget https://libzip.org/download/libzip-1.5.2.tar.gz
tar -zxf libzip-1.5.2.tar.gz
cd libzip-1.5.2
mkdir build
cd build
apt-get install cmake
cmake .. (#注意:cmake后面有两个小数点)
make -j4
make test
make install
2. 安装 zip
wget http://pecl.php.net/get/zip-1.12.4.tgz
tar zxvf zip-1.12.4.tgz
cd zip-1.12.4
usr/local/php/bin/phpize
./configure -with-php-config=/usr/local/php/bin/php-config
make
make install
3. 上传 composer.zip
解压到 /data/soft/composer
php代码里加上: require_once '/data/soft/composer/vendor/autoload.php'