README 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. HHVM is an open-source virtual machine designed for executing programs
  2. written in Hack and PHP. HHVM uses a just-in-time (JIT) compilation
  3. approach to achieve superior performance while maintaining the
  4. development flexibility that PHP provides.
  5. Hack is a programming language for HHVM. Hack reconciles the fast
  6. development cycle of a dynamically typed language with the discipline
  7. provided by static typing, while adding many features commonly found
  8. in other modern programming languages.
  9. Please note that HHVM is unsupported on 32-bit OSes and there are no
  10. current plans to ever add support.
  11. In order to start HHVM at boot and stop it properly at shutdown,
  12. make sure rc.hhvm is executable and add the following lines to
  13. your rc.d scripts:
  14. /etc/rc.d/rc.local
  15. ==================
  16. # Startup HHVM
  17. if [ -x /etc/rc.d/rc.hhvm ]; then
  18. /etc/rc.d/rc.hhvm start
  19. fi
  20. /etc/rc.d/rc.local_shutdown
  21. ===========================
  22. # Stop HHVM
  23. if [ -x /etc/rc.d/rc.hhvm ]; then
  24. /etc/rc.d/rc.hhvm stop
  25. fi
  26. HHVM ships an integrated web server, proxygen, which listens on port
  27. 9000 (though you can configure proxygen to make use of a different
  28. port): https://docs.hhvm.com/hhvm/basic-usage/proxygen.
  29. Alternatively to reverse proxy, FastCGI is available, which uses Unix
  30. sockets by default. If your web server isn't Apache make sure it has
  31. write access to the socket file. You can create a new group and add
  32. your web server user to this group or just use the main group of your
  33. web server and start HHVM as following:
  34. hhvm_GROUP=apache /etc/rc.d/rc.hhvm start
  35. See https://docs.hhvm.com/hhvm/advanced-usage/fastCGI.
  36. To start a project you have to configure the type checker as well.
  37. See the official documentation:
  38. https://docs.hhvm.com/hack/getting-started/getting-started
  39. Basically you create an empty .hhconfig file in the root dir of your
  40. project:
  41. touch .hhconfig
  42. and run:
  43. hh_client
  44. Happy Hacking!