1.java -Xmx256m -jar glassfish-installer-v2.1-b60e-windows.jar
2.如果配了ant的环境变量直接在glassfish目录执行:ant -f setup.xml。否则,进去ant的bin目录下执行ant -f /usr/myService/glassfish/glassfish/setup.xml
3.启动:./asadmin start-domain domain1
4.关闭:./asadmin stop-domain domain1
备注:安装glassfish不必先安装ant。因为glassfish自带ant,可以先把glassfish安装,然后使用glassfish的ant来执行setup.xml生成domain1