This guide will help get the Titon Framework up and running by installing any required dependencies.
The following system dependencies are required.
We suggest using Nexus, an all-in-one Vagrant development environment. It's an official Titon project that provides up-to-date support for Hack and HHVM development.
If you prefer not to use Nexus, continue reading, else jump down to the installation chapter.
You can install Vagrant by downloading one of their official installers.
To install HHVM, run the following commands on Ubuntu 14.04.
wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -
echo deb http://dl.hhvm.com/ubuntu trusty main | sudo tee /etc/apt/sources.list.d/hhvm.list
sudo apt-get update
sudo apt-get install hhvm
If you need to install HHVM on another distro, or are encountering installation errors, please refer to the official docs.
Titon utilizes Composer for managing its dependencies. Depending on your operating system, installation may differ.
Download and run the official Composer installer.
We suggest using Homebrew for installation. If this does not work correctly, skip to the next section.
brew install composer
If using Linux, or the previous suggestions didn't work, download Composer manually via cURL.
curl -sS https://getcomposer.org/installer | php
If you are still having issues, please refer to the official docs.
Once the requirements are in place, we can proceed with installing Titon. The preferred way of using Titon is by installing it as a vendor through Composer.
composer require titon/framework:*
composer update
If you prefer to not use the entire framework, Titon also comes bundled as individual packages. Check out Packagist for a list of supported packages.
composer require titon/event:*