diff --git a/bin/install_extension.sh b/bin/install_extension.sh index baf5429..bdeb673 100644 --- a/bin/install_extension.sh +++ b/bin/install_extension.sh @@ -30,10 +30,10 @@ fi extension=$1 case $extension in mcrypt) - libmcrypt_package=`get_config lib libmcrypt_package` - libmcrypt_package=`exists_download $libmcrypt_package` # 安装libmcrypt if [ ! -d '/usr/local/libmcrypt' ];then + libmcrypt_package=`get_config lib libmcrypt_package` + libmcrypt_package=`exists_download $libmcrypt_package` decompression $libmcrypt_package libmcrypt_dir=`get_file_dir $libmcrypt_package` cd $libmcrypt_dir diff --git a/bin/php.sh b/bin/php.sh index 9fefede..2afc2f4 100644 --- a/bin/php.sh +++ b/bin/php.sh @@ -54,7 +54,10 @@ case $server_type in mkdir -p '/var/www/html' fi rm -rf '/var/www/html/index.html' - echo -e ' '/var/www/html/index.php' + echo -e ' '/var/www/html/index.php' + + append_file '/etc/profile' 'export PATH='$path_dir'/bin:$PATH' + source '/etc/profile' else exit $error fi @@ -82,7 +85,10 @@ case $server_type in update_file '/usr/local/'$nginx_file_dir'/conf/vhost/default.conf' '# include enable-php.conf;' ' include enable-php.conf;' update_file '/usr/local/'$nginx_file_dir'/conf/vhost/default.conf' '# include rewrite.conf;' ' include rewrite.conf;' rm -rf '/var/www/html/index.html' - echo -e ' '/var/www/html/index.php' + echo -e ' '/var/www/html/index.php' + + append_file '/etc/profile' 'export PATH='$path_dir'/bin:$PATH' + source '/etc/profile' else exit $error fi