It's been years that I'm posting something on this space.
Well, let me tell you how we can configure JBoss Server 5.x for multiple instances on a single machine.
1. Make a copy of the "default" directory and rename it to "node1"
The path of the "default" directory is /home/user/JBoss/jboss-5.1.0.GA/server
2. Update the default port number 8080 to any other unused port like 8092 in server.xml for the server "node1".
The port number needs to be updated in the Connector protocol as shown below:
Connector protocol="HTTP/1.1" port="8092" address="${jboss.bind.address}"
connectionTimeout="20000" redirectPort="8443"
(Please put the Connector protocol inside xml tags).
The server.xml file can be found at:
/home/user/JBoss/jboss-5.1.0.GA/server/node1/deploy/jbossweb.sar/server.xml
3. Start the first instance of the JBoss server from the terminal by executing ./run.sh
(The server starts with the default port 8080)
4. Now start the second instance of the JBoss server from the terminal by executing the following command:
./run.sh -c node1 -Djboss.service.binding.set=ports-02 -b 0.0.0.0
(The second instance starts with port number 8092)
NB: The commands and paths used here are for Linux Operating Systems. For Windows, you need to use run.bat
I didn't explain anything about the commands. If you want to know more, please refer the JBoss reference.
No comments:
Post a Comment