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.

Revisions

  1. rraallvv created this gist Dec 2, 2018.
    22 changes: 22 additions & 0 deletions build-unit-php.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    $ 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