ftp拓展php
cd /usr/local/src/php-7.0.32/ext/ftpgit
#進入PHP安裝源碼包,找到ext下的ftp,進入 find \ -name ftpgithub
/usr/local/php/bin/phpize
#whereis phpize 獲得路徑 或者 find / -name phpize 獲得路徑redis
./configure --with-php-config=/usr/local/php/bin/php-config
#whereis php-config查看路徑 或者 find / -name php-config 獲得路徑apache
make && make installswoole
gd拓展
post
1:安裝gd的依賴包 spa
yum -y install gd gd2 gd-devel gd2-devel zlib freetypedebug
安裝jpeg:rest
wget http://www.ijg.org/files/jpegsrc.v9b.tar.gz
tar -xvf jpegsrc.v9b.tar.gz
#進入jpeg-9b
./configure --prefix=/usr/local/jpeg --enable-shared --enable-static
make && make install
2.安裝gd
cd /usr/local/src/php-7.0.32/ext/gd
#進入PHP安裝源碼包,找到ext下的ftp,進入 find \ -name gd
/usr/local/php/bin/phpize
#whereis phpize 獲得路徑 或者 find / -name phpize 獲得路徑
./configure --with-php-config=/usr/local/php/bin/php-config -with-png-dir --with-freetype-dir --with-jpeg-dir=/usr/local/jpeg -with-zlib-dir --with-gd make install
redis拓展
git clone https://github.com/nicolasff/phpredis
#進入 phpreids目錄中去
/usr/local/php/bin/phpize
#whereis phpize 獲得路徑 或者 find / -name phpize 獲得路徑
./configure --with-php-config=/usr/local/php/bin/php-config
#whereis php-config查看路徑 或者 find / -name php-config 獲得路徑
make && make install
swoole拓展
wget -c https://github.com/swoole/swoole-src/archive/v2.0.6.tar.gz
解壓: tar -zxvf v2.0.6.tar.gz
#進入swoole-src-2.0.6目錄中去
/usr/local/php/bin/phpize
#whereis phpize 獲得路徑 或者 find / -name phpize 獲得路徑
./configure --with-php-config=/usr/local/php/bin/php-config
#whereis php-config查看路徑 或者 find / -name php-config 獲得路徑
make && make install
/usr/local/php/bin/php -m
#查看是否安裝成功:
/usr/local/php/lib/php/extensions/no-debug-zts-20151012/
#編譯成功查看拓展存放位置
php.ini中增長
extension=redis.so
extension=swoole.so
extension=ftp.so
extension=gd.so
systemctl restart httpd
#重啓apache