shell 脚本安装PHP扩展的简单方法
发布时间:2021-03-16 00:33 所属栏目:53 来源:网络整理
导读:实例如下: #!/bin/bash#This script is to install PHP extensions#Author=steven#Email=775189187@qq.com#WriteTime=Sun Aug 14 23:32:18 CST 2016#The environment variableExtension_HOME=/usr/local/src/php-5.6.16/ext/mysqlPHP_HOME=/usr/local/webse
实例如下: #!/bin/bash #This script is to install PHP extensions #Author=steven #Email=775189187@qq.com #WriteTime=Sun Aug 14 23:32:18 CST 2016 #The environment variable Extension_HOME=/usr/local/src/php-5.6.16/ext/mysql PHP_HOME=/usr/local/webserver/php Extension_Install=mysql.so #Enter the extension directory cd $Extension_HOME #Some of the set about PHP plugin modules $PHP_HOME/bin/phpize #Target characteristics of the test installation platform $Extension_HOME/configure --with-php-config=$PHP_HOME/bin/php-config #compile make #install make install #php.ini file insert the extension=$Extension_Install if grep -Fxq "extension=$Extension_Install" $PHP_HOME/etc/php.ini then echo "extension=$Extension_Install exist " else echo -e "\n[mysql]\nextension=$Extension_Install" >> $PHP_HOME/etc/php.ini fi #restart php-fpm process kill -SIGUSR2 `cat $PHP_HOME/var/run/php-fpm.pid` 以上这篇shell 脚本安装PHP扩展的简单方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持编程小技巧。 (编辑:ASP站长网) |
相关内容
网友评论
推荐文章
热点阅读