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扩展的简单方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持积木网。
SVN限制message字符个数及格式的实例
一、编写pre-commit脚本------------------------------------#/bin/bashREPOS="$1"TXN="$2"#Makesurethatthelogmessagecontainssometext.SVNLOOK=/usr/bin/svnlookLOGMSG=`$SVNLOOKlog-t"$TXN""$REPOS"|grep"
shell脚本连接并重启远程服务器的方法
shell重启远程服务器#connServer.sh登陆服务器脚本本地文件#!/usr/bin/expectexpect-c"spawnsshali@192.168.1.1expect{"*assword"{settimeout30;send"123456r";}"yes/no"{send"yesr";ex
linux压缩常用命令小结
tar-c:建立压缩档案-x:解压-t:查看内容-r:向压缩归档文件末尾追加文件-u:更新原压缩包中的文件这五个是独立的命令,压缩解压都要用到其中一个,
标签:脚本,给大家,服务器,文件,重启