shell 腳本安裝PHP擴展的簡單方法
更新時間:2017年03月22日 09:16:18 投稿:jingxian
下面小編就為大家?guī)硪黄猻hell 腳本安裝PHP擴展的簡單方法。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
實例如下:
#!/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擴展的簡單方法就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關文章
Shell特殊變量(Shell $#、$*、$@、$?、$$)的使用
這篇文章主要介紹了Shell特殊變量(Shell $#、$*、$@、$?、$$)的使用,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2021-03-03使用shell腳本執(zhí)行hive、sqoop命令的方法
今天小編就為大家分享一篇使用shell腳本執(zhí)行hive、sqoop命令的方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2018-06-06