Skip to content

Instantly share code, notes, and snippets.

@SyntaxC4
Last active December 28, 2015 04:48
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SyntaxC4/7444662 to your computer and use it in GitHub Desktop.
Save SyntaxC4/7444662 to your computer and use it in GitHub Desktop.
Upstart script for hhVM on Ubuntu 13.04
Server {
SourceRoot = /var/www
}
# Upstart HipHopVM
description "Automatically Start HipHopVM on Server Start"
author "Cory Fowler <cfowler@microsoft.com>"
# Start
start on runlevel [2345]
# Stop
stop on runlevel [016]
# Restart on unexpected failure
respawn
# Run in it's own process
expect fork
expect deamon
exec hhvm -m server -c /etc/hhvm/config.hdf
@SyntaxC4
Copy link
Author

Setup

  1. Set up a Ubuntu 13.04 Virtual Machine

    I followed the instructions on how to create a Linux virtual machine on Windows Azure

  2. Install hhVM on Ubuntu

    I followed the instructions on the HipHopVM wiki, specifically Installing Pre-built packages

  3. create configuration file

    mkdir /etc/hhvm
    touch /etc/hhvm/config.hdf
    
  4. create SourceRoot

    mkdir /var/www
    
  5. Copy web files into SourceRoot

  6. Copy Upstart conf file into /etc/init

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment