最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
shell 脚本安装PHP扩展的简单方法
时间:2022-06-25 14:19:57 编辑:袖梨 来源:一聚教程网
#!/bin/bash
#This script is to install PHP extensions
#Author=steven
#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`
相关文章
- 《赛博朋克2077》属性加点推荐介绍 12-04
- 《赛博朋克2077》酒吧超梦体验馆位置介绍 12-04
- 《赛博朋克2077》平行线黑客bd攻略 12-04
- 《赛博朋克2077》黑客流派义体实战攻略 12-04
- 《赛博朋克2077》往日之影免费武器推荐 12-04
- 《赛博朋克2077》热门流派分享 12-04