cd /opt
# swoole
yum install -y openssl
wget https://pecl.php.net/get/swoole-1.10.5.tgz
tar zxvf swoole-1.10.5.tgz
cd swoole-1.10.5
编译
/usr/local/php56/bin/phpize
编译
./configure --enable-openssl --with-php-config=/usr/local/php56/bin/php-config
安装
make clean
make && make install
成功显示:
Installing shared extensions: /usr/local/php56/lib/php/extensions/no-debug-non-zts-20131226/
Installing header files: /usr/local/php56/include/php/
修改php.ini 加载swoole扩展
[extension]
extension='/usr/local/php56/lib/php/extensions/no-debug-non-zts-20131226/swoole.so'
service nginx restart
service php-fpm restart
---查看模块是否有swoole
php -m | grep swoole
---查看swoole版本
php --ri swoole
# phpredis
wget http://pecl.php.net/get/redis-4.3.0.tgz
tar -zxvf redis-4.3.0.tgz
cd redis-4.3.0
/usr/local/php5.6/bin/phpize
./configure --with-php-config=/usr/local/php5.6/bin/php-config
make && make install
编辑php.ini 加入扩展
extension = /usr/local/php5.6/lib/php/extensions/debug-non-zts-20131226/redis.so
php -m | grep redis
# intl:
https://github.com/unicode-org/icu/releases
http://pecl.php.net/package/intl
#wget https://github.com/unicode-org/icu/releases/download/release-69-1/icu4c-69_1-src.tgz
wget https://github.com/unicode-org/icu/archive/refs/tags/release-52-2.zip
unzip release-52-2.zip
cd icu-release-52-2/icu4c/source
mkdir /usr/local/icu
./configure --prefix=/usr/local/icu
make && make install
wget http://pecl.php.net/get/intl-3.0.0.tgz
tar -zxvf intl-3.0.0.tgz
cd intl-3.0.0
/usr/local/php5.6/bin/phpize
./configure --enable-intl --with-icu-dir=/usr/local/icu/ --with-php-config=/usr/local/php/bin/php-config
make && make install
编辑php.ini 加入扩展
extension = /usr/local/php5.6/lib/php/extensions/debug-non-zts-20131226/intl.so
php -m | grep intl
# ssh2
http://pecl.php.net/package/ssh2
-由于ssh2 1.0 and above is PHP 7 only,所以下载0.13版本
wget http://pecl.php.net/get/ssh2-0.13.tgz
tar zxvf ssh2-0.13.tgz
yum install -y libssh2-devel
cd ssh2-0.13
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/ssh2.so
php -m | grep ssh2
# imagick
https://www.imagemagick.org/script/download.php
http://pecl.php.net/package/imagick
curl -L -o ImageMagick.tar.gz https://www.imagemagick.org/download/ImageMagick.tar.gz
tar xfz ImageMagick.tar.gz && rm -rf ImageMagick.tar.gz
cd ImageMagick-7.1.0-2 && ./configure --prefix=/usr/local/imagemagick
make && make install && ldconfig /usr/local/lib
cd ../
curl -L -o imagick.tgz https://pecl.php.net/get/imagick-3.5.0.tgz
tar zxvf imagick.tgz && rm -rf imagick.tgz
cd imagick-3.5.0
/opt/remi/php73/root/usr/bin/phpize
./configure --with-php-config=/opt/remi/php73/root/usr/bin//php-config --with-imagick=/usr/local/imagemagick
make && make install && cd ../