Revision 9a6a850d323c357f9dde95f4029b39afd48e3f97 authored by Francois Trahay on 13 June 2008, 12:12:37 UTC, committed by Francois Trahay on 13 June 2008, 12:12:37 UTC
1 parent f5c630e
Raw File
README
0 . Requirement +++++++++++++++++++++++++++++++++++++++++++++++++++++++

To be compiled, pm2 software needs:

* make (GNU version >= 3.81)
* gcc (version >= 3.3)
* a shell that understand substitutions like ${var/find/replace}, for
    instance bash, zsh, ksh, ...
* a recent version of the m4 compiler (how recent???)

TO BE COMPLETED

I . Configuring PM2 +++++++++++++++++++++++++++++++++++++++++++++++++++

Before starting to build PM2, you must at least set the PM2_ROOT
environment variable to reflect the location of your PM2 source tree
root. It is _strongly_ advised to set this variable within your
~/.bashrc (or .cshrc) file.

There are also several other variables that may be set for
commodity. In particular, a number of files will automatically be
generated within the ${HOME}/.pm2 directory by default (preferences,
default compile options, etc.) It is possible to change this default
setting by using the PM2_HOME variable: this is very useful if you
wish to access to your preference files via a NFS (or SAMBA) mount
point. By default, this variable is set to ${HOME}.

Finally, it is also strongly advised to include the ${PM2_ROOT}/bin
directory in your default PATH.

To sum up, you may place the following lines in your ~/.bashrc file:

	export PM2_HOME=${HOME}
	export PM2_ROOT=${PM2_HOME}/pm2
	PATH=${PATH}:${PM2_ROOT}/bin 

II . Compiling a PM2 application +++++++++++++++++++++++++++++++++++++

Before you can compile a PM2 module (or application), you have to
define a "compile flavor" that will fix the list of libraries to use
and various options for each of these libraries. Putting all these
definitions within multiple files allows to switch easily between
different "flavors" of the same application for instance (optimized
version/debug version, etc.)

For a quick start, you can install a set of default flavors which will
allow to compile a lot of (if not all) modules and examples with
standard default options. These flavors are generated by typing the
following command:

	make init

You may specify the current flavor (i.e. the one 'make' should use) by
setting the PM2_FLAVOR variable. For instance:

	export PM2_FLAVOR=pm2

To compile an application, just go to the right directory and type
'make':

	cd ${PM2_ROOT}/pm2/examples/simple
	make simple

For configuring flavors, just run

	ezflavor

III . Running a PM2 application ++++++++++++++++++++++++++++++++++++++

To run a PM2 application, you first have give the list of machines
that will belong to your "configuration". For instance, if you want to
use three machines named riri, fifi and loulou, just type:

	pm2-conf riri fifi loulou

Please refer to the help (pm2-conf -h) for a list of possible inputs.

Note: this configuration is per-flavor. If you set PM2_FLAVOR to
another flavor, remember to re-run pm2-conf.

Once your configuration is set, make sure to set PM2_RSH to your remote
shell tool:

	export PM2_RSH=ssh
	
Then you're able to run a PM2 application simply by invoking the pm2-load
loader:

	pm2-load simple

You can run all processes under the gdb debugger by simply typing:

	pm2-load -d simple

V . Miscellaneous ++++++++++++++++++++++++++++++++++++++++++++++++++++

For any problem, please first run

make sos

To perform a few checks, and then send an email pm2-users@listes.ens-lyon.fr.
back to top