Saturday, February 16, 2013

Mac: How to start any JavaEE servers on MAC

Here I will explain how you can start any JavaEE server on MAC OS X. The example here applies on any server like (IBM websphere, Oracle Weblogic, Tomcat, TomEE and Glassfish …. Etc.) The same steps on MAC, but the difference is that you should be familiar with the starting up files location for each server.

Lets take for the sake of demonstration the glassfish server for our example here, Oh! Let’s starts.
  1. First if you don’t have Glassfish (the .zip version), then go to download it first from here.
  2. Unzip it at your favorite location.
  3. Open new terminal window.
  4. Navigate to your installation folder manually using CD command with TAB for ease of navigation, or jump to step 5.
  5. Open new finder window (Command + N), and navigate to you server location that you have unzipped it at before.
  6. On terminal write cd, then drag and drop the bin folder from finder window into the terminal window, as the following Figure 1.

    Figure 1

  7. Hit enter and you should see the following as Figure 2.

    Figure 2

  8. At the terminal type the following “./asadmin” and hit return, you should notice that the prompt has changed as in Figure 3.
    Don’t forget the “./”, as if you just have typed “asadmin” you will prompted from bash shell that this command is not recognized, because the asadmin is not a bash command.

    Figure 3

  9. At the terminal type the following command “start-domain domain1” and the terminal should output the following if everything goes correct in Figure 4.

    Figure 4

  10. To test your progress, open your favorite browser and type the following in the address bar http://localhost:4848/ and you should see the admin page of glassfish server as Figure 5.

    Figure 5

  11. Finally to stop the server, from the terminal type “stop-domain domain1

No comments :

Post a Comment