GlassFish QuickStart for Mac OS X 10.11+
The Mac Tutorial Shows You Step-by-Step How-to Install and Getting-Started with GlassFish 4.X Server and Quick-Start with Java EE 7 on Mac OS X 10.11 El Capitan.
The Oracle GlassFish 4 Setup on Mac OS X Require an Oracle JDK 7+ Installation (Best with a JDK 8.)
GlassFish App Server Benefits:

-
Open a Command Line Terminal Window
(Press “Enter” to Execute Commands) -
Download Glassfish 4 JEE 7 App Server for Mac OS X:
Get the “Web Profile” or the “Full” Bundle.
-
To Extract Double-Click on Zip Archive
Or from Command Line:cd $HOME/Downloads
unzip glassfish*.zip
-
Relocating GlassFish 4 App Server
System Wide Installation:
sudo chown -R root:wheel glassfish4
sudo mv glassfish4 /opt/
Local Installation:
mv glassfish4 $HOME
Modify Correspondently also the Server Start/Stop Command…
-
How-to Install Required Oracle JDK 7+ on MacOS X:
-
Starting GlassFish 4 Default Domain
sudo /opt/glassfish4/bin/asadmin start-domain
-
Access GlassFish 4 Admin Console on Browser
http://localhost:4848
-
Stopping GlassFish 4 Default Domain
sudo /opt/glassfish4/bin/asadmin stop-domain