This document provides instructions on installing nodewatch either from a release tarball or from sources. It is highly recommended that you install a binary release rather than building from sources, as the process is far less complicated.
TBC
You will need to fetch any missing dependencies in order to build from sources.
You can do this by running the bootstrap
script in the top directory.
Running this script will install all dependencies locally (into the ./lib
directory) and create a Makefile
that will compile against them, without
affecting your code:lib_dir
and/or ERL_LIBS
directories.
If you prefer to install dependencies locally (into your ERL_LIBS
environment,
for example), then you can skip the bootstrap
script and instead run configure
manually.
Nodewatch has a simple build system, based on rebar. To make it easier to package, and more familiar to those of us accustomed to working with standard unix tools, there are scripts included with the source code distribution that allow you to go through the usual configure && make dance.
auser@ahost:nodewatch $ ./configure
auser@ahost:nodewatch $ make
Executing these commands in a typical unix shell environment, will compile the
Nodewatch sources and generate a release. At this stage, you can install Nodewatch
locally using the install
rule in the (generated) Makefile.
auser@ahost:nodewatch $ make install
This will install into the directories specified during the configure
stage, which
can be overriden by the user. See ./configure --help
for details.
A Nodewatch distribution can be generated by running the appropriate make rule:
auser@ahost:nodewatch $ make dist
The distribution will be packaged as a zip archive by default. In order to produce
a tarball instead, you will need to alter dist
configuration element in the the
project's top level rebar.config
, by removing the {format, zip}
element.
Support for changing the packaging via the configure
script will be provided in
a future release.
Providing rebar can resolve all the required dependencies, you may compile all the project's sources manually. It is highly recommended that you take advantage of the supplied build system instead, but if you do decide to compile by hand then you will almost certainly need to use the bundled version of rebar, which contains some custom patches not yet present in the main rebar repository.
Nodewatch requires some setup to run, prior to first use. You are only required to perform this activity once - trying to subsequently re-run the setup activity may have unexpected results.
To perform the setup, you should change to the Nodewatch install directory, and run the setup script, which is located in the root directory:
[email protected]:nodewatch $ sudo ./setup.sh
Once the script has completed, you are ready to start using Nodewatch.