From: http://www.blogjava.net/ann/articles/260260.html
1. Download and decompress glassfish
1 .:
Https://glassfish.dev.java.net/public/downloadsindex.html
2. Unzip glassfish:
Java-xmx256m-jar glassfish-installer-v2.1-b57-windows.jar (can be executed as long as the Java environment is configured)
Note: You must drag the Protocol scroll bar from top to bottom and click the accept button.
There will be a glassfish directory under your directory.
3. Install glassfish.
1 ). modify the configuration :.......... /glassfish/setup. XML (in the extracted glassfish directory, there is setup. XML.
2) execute the command: ant-F setup. xml
4. Start glassfish Server
Asadmin start-domain domain1, which is the default domain
5. test whether the instance is started properly: Enter http: // localhost: 8080 in the browser.
Check whether the display is normal.
6. Create a domain
Run asadmin create-Domain -- adminport 4849 mermercenter
2. Deployment
1. Directly place the war or ear file under glassfish/domain/domain1/autodeploy, and the system will automatically deploy the file.
2. Deploy the application by running asadmin deploy. In addition, asadmin updeploy uninstalls the application.
Use asadmin deploy -- help and asadmin undeploy -- help to get more help
3. Use the glassfish Console
Http: // localhost: 4848
4. Directory subordinates: directly copy the web application directory to glassfish/domains/domain1/applications /.
Run the command: glassfish/bin/asadmin deploydir full_path/applications/your_app