您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

shell脚本实现安装PHP扩展的实例代码

2025/10/6 8:24:17发布12次查看
下面小编就为大家带来一篇shell 脚本安装php扩展的简单方法。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧
实例如下:
#!/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扩展的实例代码的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product