张大佬张大佬

kangel-easypanel安装fileinfo扩展

1.检查当前环境

php -i|grep fileinfo
若出现

fileinfo
fileinfo support => enabled
则代表fileinfo扩展可用,否则不可用。

2.安装

2.1:下载(版本号,可以换成自己对应的版本)
wget -O php-5.6.39.tar.gz http://cn2.php.net/get/php-5.6.39.tar.gz/from/this/mirror
tar -zxvf php-5.6.39.tar.gz

2.2:解压

tar -zxvf php-5.6.26.tar.gz
2.3:修改php-config使的能够编译安装fileinfo扩展

注意:这里是你服务器安装的PHP文件

进入 vhs/kangle/ext/php56/bin 修改php-config 将--disable-fileinfo'修改成--enable-fileinfo'
2.4:进入对应php版本扩展目录(我这是5.6.26版本)

注意:这个是你刚刚下载的PHP文件目录

cd /root/php-5.6.39/ext/fileinfo
2.5:编译&&安装

在之前已经编译安装的的php的bin目录中找到命令phpize执行生成.configure文件

本人已安装php的目录命令:
/vhs/kangle/ext/tpl_php5639/bin/phpize
配置:
./configure -with-php-config=/vhs/kangle/ext/tpl_php5639/bin/php-config
安装
make && make install
3、修改php.ini文件

vim /vhs/kangle/ext/php56/php-templete.ini/php-templete.ini
加入:extension = "/vhs/kangle/ext/tpl_php5633/lib/php/extensions/no-debug-non-zts-20131226/fileinfo.so"
然后重启php即可。
5.6.40

wget -O php-5.4.45.tar.gz http://cn2.php.net/get/php-5.4.45.tar.gz/from/this/mirror
tar -zxvf php-5.4.45.tar.gz
cd /root/php-5.4.45/ext/fileinfo
/vhs/kangle/ext/tpl_php5445/bin/phpize
./configure -with-php-config=/vhs/kangle/ext/tpl_php5445/bin/php-config
make && make install



wget -O php-5.4.45.tar.gz http://cn2.php.net/get/php-5.4.45.tar.gz/from/this/mirror
tar -zxvf php-5.4.45.tar.gz
cd /root/php-5.4.45/ext/fileinfo
/vhs/kangle/ext/php54/bin/phpize
./configure -with-php-config=/vhs/kangle/ext/php54/bin/php-config
make && make install



wget -O php-5.5.38.tar.gz http://cn2.php.net/get/php-5.5.38.tar.gz/from/this/mirror
tar -zxvf php-5.5.38.tar.gz
cd /root/php-5.5.38/ext/fileinfo
/vhs/kangle/ext/tpl_php5538/bin/phpize
./configure -with-php-config=/vhs/kangle/ext/tpl_php5538/bin/php-config
make && make install

wget -O php-5.5.38.tar.gz http://cn2.php.net/get/php-5.5.38.tar.gz/from/this/mirror
tar -zxvf php-5.5.38.tar.gz
cd /root/php-5.5.38/ext/fileinfo
/vhs/kangle/ext/php55/bin/phpize
./configure -with-php-config=/vhs/kangle/ext/php55/bin/php-config
make && make install


wget -O php-5.6.40.tar.gz http://cn2.php.net/get/php-5.6.40.tar.gz/from/this/mirror
tar -zxvf php-5.6.40.tar.gz
cd /root/php-5.6.40/ext/fileinfo
/vhs/kangle/ext/tpl_php5640/bin/phpize
./configure -with-php-config=/vhs/kangle/ext/tpl_php5640/bin/php-config
make && make install

wget -O php-7.0.33.tar.gz http://cn2.php.net/get/php-7.0.33.tar.gz/from/this/mirror
tar -zxvf php-7.0.33.tar.gz
cd /root/php-7.0.33/ext/fileinfo
/vhs/kangle/ext/tpl_php7033/bin/phpize
./configure -with-php-config=/vhs/kangle/ext/tpl_php7033/bin/php-config
make && make install

wget -O php-7.1.30.tar.gz http://cn2.php.net/get/php-7.1.30.tar.gz/from/this/mirror
tar -zxvf php-7.1.30.tar.gz
cd /root/php-7.1.30/ext/fileinfo
/vhs/kangle/ext/tpl_php7130/bin/phpize
./configure -with-php-config=/vhs/kangle/ext/tpl_php7130/bin/php-config
make && make install

wget -O php-7.2.20.tar.gz http://cn2.php.net/get/php-7.2.20.tar.gz/from/this/mirror
tar -zxvf php-7.2.20.tar.gz
cd /root/php-7.2.20/ext/fileinfo
/vhs/kangle/ext/tpl_php7220/bin/phpize
./configure -with-php-config=/vhs/kangle/ext/tpl_php7220/bin/php-config
make && make install

wget -O php-7.3.7.tar.gz http://cn2.php.net/get/php-7.3.7.tar.gz/from/this/mirror

tar -zxvf php-7.3.7.tar.gz

cd /root/php-7.3.7/ext/fileinfo

/vhs/kangle/ext/tpl_php737/bin/phpize

./configure -with-php-config=/vhs/kangle/ext/tpl_php737/bin/php-config

make && make install


extension = "/vhs/kangle/ext/tpl_php5445/lib/php/extensions/no-debug-non-zts-20100525/fileinfo.so"


extension = "/vhs/kangle/ext/tpl_php5538/lib/php/extensions/no-debug-non-zts-20131226/fileinfo.so"

extension = "/vhs/kangle/ext/tpl_php5640/lib/php/extensions/no-debug-non-zts-20131226/fileinfo.so"
extension="/vhs/kangle/ext/tpl_php5640/sg11/ixed.5.6.lin"

extension = "/vhs/kangle/ext/tpl_php7033/lib/php/extensions/no-debug-non-zts-20151012/fileinfo.so"
extension="/vhs/kangle/ext/tpl_php5640/sg11/ixed.7.0.lin"

extension = "/vhs/kangle/ext/tpl_php7130/lib/php/extensions/no-debug-non-zts-20160303/fileinfo.so"

extension="/vhs/kangle/ext/tpl_php5640/sg11/ixed.7.1.lin"

extension = "/vhs/kangle/ext/tpl_php7220/lib/php/extensions/no-debug-non-zts-20170718/fileinfo.so"
extension="/vhs/kangle/ext/tpl_php5640/sg11/ixed.7.2.lin"




exif插件

wget -O php-7.2.20.tar.gz http://cn2.php.net/get/php-7.2.20.tar.gz/from/this/mirror

cd /root/php-7.2.20/ext/exif

/vhs/kangle/ext/tpl_php7220/bin/phpize

./configure -with-php-config=/vhs/kangle/ext/tpl_php7220/bin/php-config

make && make install


本原创文章未经允许不得转载 | 当前页面:张大佬 » kangel-easypanel安装fileinfo扩展

评论