Browse Source

add version argument to PHP installation

Hamilton Turner 10 years ago
parent
commit
fea1246c7c
1 changed files with 14 additions and 9 deletions
  1. 14 9
      toolset/setup/linux/languages/php.sh

+ 14 - 9
toolset/setup/linux/languages/php.sh

@@ -11,20 +11,25 @@ RETCODE=$(fw_exists ${IROOT}/php.installed)
   sudo cp $FWROOT/config/php-fpm.conf /usr/local/lib/php-fpm.conf
   sudo cp $FWROOT/config/php-fpm.conf /usr/local/lib/php-fpm.conf
   return 0; }
   return 0; }
 
 
-fw_get http://php.net/distributions/php-5.5.17.tar.gz -O php-5.5.17.tar.gz
-fw_untar php-5.5.17.tar.gz
+VERSION="5.5.17"
+
+fw_get http://php.net/distributions/php-${VERSION}.tar.gz -O php-${VERSION}.tar.gz
+fw_untar php-${VERSION}.tar.gz
 ls
 ls
-mv php-5.5.17 php
+mv php-${VERSION} php
 ls
 ls
 cd php
 cd php
 
 
-./configure --prefix=$IROOT/php-5.5.17 --with-pdo-mysql --with-mysql --with-mcrypt --enable-intl --enable-mbstring --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --with-openssl --enable-opcache
+./configure --prefix=$IROOT/php-${VERSION} --with-pdo-mysql \
+  --with-mysql --with-mcrypt --enable-intl --enable-mbstring \
+  --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data \
+  --with-openssl --enable-opcache
 make
 make
 make install
 make install
 cd ..
 cd ..
 
 
-cp $FWROOT/config/php.ini $IROOT/php-5.5.17/lib/php.ini
-cp $FWROOT/config/php-fpm.conf $IROOT/php-5.5.17/lib/php-fpm.conf
+cp $FWROOT/config/php.ini $IROOT/php-${VERSION}/lib/php.ini
+cp $FWROOT/config/php-fpm.conf $IROOT/php-${VERSION}/lib/php-fpm.conf
 
 
 # =======================
 # =======================
 #
 #
@@ -35,12 +40,12 @@ cp $FWROOT/config/php-fpm.conf $IROOT/php-5.5.17/lib/php-fpm.conf
 echo PHP compilation finished, building modules
 echo PHP compilation finished, building modules
 
 
 # Apc.so
 # Apc.so
-$IROOT/php-5.5.17/bin/pecl config-set php_ini $IROOT/php-5.5.17/lib/php.ini
+$IROOT/php-${VERSION}/bin/pecl config-set php_ini $IROOT/php-${VERSION}/lib/php.ini
 #printf "\n" | $IROOT/php-5.5.17/bin/pecl install -f apc-beta
 #printf "\n" | $IROOT/php-5.5.17/bin/pecl install -f apc-beta
-printf "\n" | $IROOT/php-5.5.17/bin/pecl install -f redis
+printf "\n" | $IROOT/php-${VERSION}/bin/pecl install -f redis
 
 
 # yaf.so
 # yaf.so
-printf "\n" | $IROOT/php-5.5.17/bin/pecl install -f yaf
+printf "\n" | $IROOT/php-${VERSION}/bin/pecl install -f yaf
 
 
 # phalcon.so
 # phalcon.so
 #   The configure seems broken, does not respect prefix. If you 
 #   The configure seems broken, does not respect prefix. If you