setup_hhvm.sh 963 B

12345678910111213141516171819
  1. #!/bin/bash
  2. export PHP_HOME=${IROOT}/php-5.5.17
  3. export COMPOSER_HOME=${IROOT}/php-composer
  4. export PHP_FPM=${PHP_HOME}/sbin/php-fpm
  5. export NGINX_HOME=${IROOT}/nginx
  6. sed -i 's|127.0.0.1|'"${DBHOST}"'|g' app/config/database.php
  7. sed -i 's|SourceRoot = .*/FrameworkBenchmarks/php-laravel|SourceRoot = '"${TROOT}"'|g' deploy/config.hdf
  8. sed -i 's|Path = .*/.hhvm.hhbc|Path = '"${TROOT}"'/.hhvm.bbhc|g' deploy/config.hdf
  9. sed -i 's|PidFile = .*/hhvm.pid|PidFile = '"${TROOT}"'/hhvm.pid|g' deploy/config.hdf
  10. sed -i 's|File = .*/error.log|File = '"${TROOT}"'/error.log|g' deploy/config.hdf
  11. sed -i 's|root .*/FrameworkBenchmarks/frameworks/PHP/php-laravel|root '"${TROOT}"'|g' deploy/nginx.conf
  12. sed -i 's|/home/vagrant/FrameworkBenchmarks/installs/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
  13. export PATH="${PHP_HOME}/bin:${PHP_HOME}/sbin:$PATH"
  14. hhvm -m daemon --config $TROOT/deploy/config.hdf --user $(whoami)
  15. ${NGINX_HOME}/sbin/nginx -c ${TROOT}/deploy/nginx.conf