Skip to content

Getting Started

jwatzman edited this page Dec 4, 2014 · 23 revisions

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.

= Overview

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.

= Install nginx

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.

= Install HHVM

Refer to our directions on installing a prebuilt package.

Clone this wiki locally