Glassfish安装与配置

汇总了一下Glassfish的安装配置方法

安装glasshfish

下载glasshfish

glasshfish下载地址
cd /usr/local/src
wget http://download.oracle.com/glassfish/4.0/release/glassfish-4.0.zip

安装glasshfish

cd /usr/local/src
unzip  glassfish-4.0.zip
mkdir /data
mv glassfish-4 /data/

部署服务

创建domain

创建一个名为gw的domain,业务端口8080,管理端口4801
/data/glassfish4/glassfish/bin/asadmin create-domain -p 8080 --adminport 4801 gw

/data/glassfish4/glassfish/bin/asadmin -h
Usage: asadmin [-H|--host <host(default:localhost)>]
         [-p|--port <port(default:4848)>] [-u|--user <user(default:admin)>]
         [-W|--passwordfile <passwordfile>]
         [-t|--terse[=<terse(default:false)>]]
         [-s|--secure[=<secure(default:false)>]]
         [-e|--echo[=<echo(default:false)>]]
         [-I|--interactive[=<interactive(default:true)>]]
         [-?|--help[=<help(default:false)>] 
         [--detach(default:false)] 
         [--notify(default:false)] [subcommand [options] [operands]]

查看部署好的doamin

/data/glassfish4/bin/asadmin list-domains

在doamin中部署一个服务

/data/glassfish4/glassfish/bin/asadmin --port 4801 deploy --contextroot / /data/td/gm/gw-server-platform-2019-11-28_16-44.war

卸载服务

/data/glassfish4/glassfish/bin/asadmin --port 4801 undeploy gw-server-platform-2019-11-28_16-44

启动GM服务

/data/glassfish4/glassfish/bin/asadmin start-domain gm

关闭GM服务

/data/glassfish4/glassfish/bin/asadmin stop-domain gm

删除domain

/data/glassfish4/glassfish/bin/asadmin delete-domain gm

本文链接:目录"--EOF--