Skip to content

Instantly share code, notes, and snippets.

@rraallvv
Created December 2, 2018 15:55
Show Gist options
  • Save rraallvv/6e1edda3eeb9de85cd9b90e53b0f126f to your computer and use it in GitHub Desktop.
Save rraallvv/6e1edda3eeb9de85cd9b90e53b0f126f to your computer and use it in GitHub Desktop.
Build Unit-PHP on Ubuntu
$ sudo apt-get install build-essential
$ sudo apt-get install golang
$ curl -sL https://deb.nodesource.com/setup_<Node.js version>.x | bash -; apt-get install nodejs
$ sudo apt-get install php-dev libphp-embed
$ sudo apt-get install libperl-dev
$ sudo apt-get install python-dev
$ sudo apt-get install ruby-dev
$ sudo apt-get install libssl-dev
$ git clone https://github.com/nginx/unit
$ cd unit
$ ./configure \
--state=/var/lib/unit \
--log=/var/log/unit.log \
--control=unix:/run/control.unit.sock \
--prefix=/usr/
$ ./configure php
$ sudo service unit restart
$ sudo curl -X PUT --data-binary @/usr/share/doc/unit-php/examples/unit.config --unix-socket /run/control.unit.sock http://localhost/config
$ curl http://localhost:8300/
More info: https://unit.nginx.org/installation/#installing-required-software
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment