Download and install

Installing as a Linux package
Building from the sources

Installing as a Linux package

For Linux, njs modules packages can be used:

Building from the sources

The repository with njs sources can be cloned with the following command: (requires Mercurial client):

hg clone http://hg.nginx.org/njs

Then the modules should be compiled using the --add-module configuration parameter:

./configure --add-module=path-to-njs/nginx

The modules can also be built as dynamic:

./configure --add-dynamic-module=path-to-njs/nginx

To build only njs command-line utility, run ./configure and make njs commands from njs root directory. The utility is available as ./build/njs.