It's often useful for testing purposes to start multiple JBoss AS or EAP instances on the same box. Here's a script that starts multiple instances, each listening on a different loopback IP address (127.0.0.2, 127.0.0.3, etc.):
An alternative approach would be to use the JBoss AS service binding manager to start each instance with a different set of ports.
The spawn script currently does not provide a way to stop AS instances previously started via the script. Here are some commands that can be used to kill AS instances on Linux:
If you are starting more than a couple instances, you'll need to increase some OS user limits, since collectively they'll consume quite a few threads and a good chunk of memory. Here's the changes I had to make in order to start 5 EAP instances on my Fedora dev box (in addition to running RHQ, Oracle, IntelliJ, etc. on the box):
Note after editing the above files, you'll need to reboot your box.
You'll also need to increase the max heap and permgen of your Agent and Server, since they will have a large number of Resources in inventory. For example, to manage 5 EAP servers, I used: