标签:font link pre config apache ati 依赖包 扩展 star
1、进入PHP安装源码包,找到ext下的ftp,进入
cd /usr/local/mysql/support-files/php-7.0.12/ext/ftp
2、/usr/local/php/bin/phpize
3、./configure --with-php-config=/usr/local/php/bin/php-config --enable-ftp
4、make && make install
5、vim /etc/php.ini 添加 : extension=ftp.so
6、重启apache,/usr/local/apache/bin/apachectl restart
7、查看是否安装成功:/usr/local/php/bin/php -m
找到ftp说明成功
1:安装gd的依赖包
yum -y install gd gd2 gd-devel gd2-devel zlib freetype
安装jpeg:
wget http://www.ijg.org/files/jpegsrc.v9b.tar.gz
tar -xvf jpegsrc.v9b.tar.gz
./configure --prefix=/usr/local/jpeg --enable-shared --enable-static
make && make install
2:进入php扩展目录编译扩展
cd /usr/local/php/include/php/ext/gd
/usr/local/php/bin/phpize
编译GD扩展:
./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
make install
这是会提示:Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20121212(这个路径就是扩展的路径)
cd /usr/local/php/lib/php/extensions/no-debug-non-zts-20121212
就能看到扩展了:gd.so 扩展已经编译成功了
标签:font link pre config apache ati 依赖包 扩展 star
原文地址:http://www.cnblogs.com/mengor/p/7487805.html