Browse Source

Update addons.sh

lj2007331@gmail.com 7 years ago
parent
commit
575db2e452
2 changed files with 4 additions and 4 deletions
  1. 1 1
      README.md
  2. 3 3
      addons.sh

+ 1 - 1
README.md

@@ -12,7 +12,7 @@ Script properties:
 - Providing a plurality of Tomcat version (Tomcat-8, Tomcat-7, Tomcat-6)
 - Providing a plurality of JDK version (JDK-1.8, JDK-1.7, JDK-1.6)
 - Providing a plurality of Apache version (Apache-2.4, Apache-2.2)
-- According to their needs to install PHP Cache Accelerator provides ZendOPcache, xcache, apcu, eAccelerator. And php encryption and decryption tool ionCube, ZendGuardLoader, swoole, xdebug
+- According to their needs to install PHP Cache Accelerator provides ZendOPcache, xcache, apcu, eAccelerator. And php encryption and decryption tool ionCube, ZendGuardLoader, swoole, xdebug, Composer
 - Installation Pureftpd, phpMyAdmin according to their needs
 - Install memcached, redis according to their needs
 - Jemalloc optimize MySQL, Nginx

+ 3 - 3
addons.sh

@@ -538,14 +538,14 @@ EOF
       10)
         ACTION_FUN
         if [ "${ACTION}" = '1' ]; then
+          [ -e "/usr/local/bin/composer" ] && { echo "${CWARNING}PHP Composer already installed! ${CEND}"; exit 1; }
           if [ "$IPADDR_COUNTRY"x == "CN"x ]; then
             wget -c https://dl.laravel-china.org/composer.phar -O /usr/local/bin/composer > /dev/null 2>&1
-            chmod +x /usr/local/bin/composer
-            composer config -g repo.packagist composer https://packagist.phpcomposer.com
+            ${php_install_dir}/bin/php /usr/local/bin/composer config -g repo.packagist composer https://packagist.phpcomposer.com
           else
             wget -c https://getcomposer.org/composer.phar -O /usr/local/bin/composer > /dev/null 2>&1
-            chmod +x /usr/local/bin/composer
           fi
+          chmod +x /usr/local/bin/composer
           if [ -e "/usr/local/bin/composer" ]; then
             echo; echo "${CSUCCESS}Composer installed successfully! ${CEND}"
           else