-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Getting Started
This is intended to be a quick high-level overview of how to get started from scratch with HHVM, and not full documentation for any of the individual pieces mentioned. Refer to the rest of this wiki and docs.hhvm.com for full information on HHVM, and the documentation pages for other tools for their full details.
The pieces you need to run code with HHVM are:
- HHVM itself
- A webserver such as nginx
- Some code to actually run
When a user makes a request for a PHP script on your server, nginx will terminate the HTTP request, see that it's referring to a PHP script, and then make a fastcgi request to HHVM. HHVM will process the request and send a response to nginx, which will then send the response to the original client.
For this process, the most recent Ubuntu LTS and the most recent Ubuntu stable release are likely to be the best supported and easiest to get working.
Running sudo apt-get install nginx will get a working-enough nginx install on your system. At this point, you should be able to load http://localhost/ and get a page that says "nginx is running" or something to that effect.
Refer to our directions on installing a prebuilt package. You can build from source if you really want, but doing that doesn't include nice things like our init script or automatic updates via apt-get, and so isn't recommended until you get a basic install working and have a better feel for what you're doing.