読者です 読者をやめる 読者になる 読者になる

めもぶろぐ

お勉強したこと、趣味なんかを適当に書いてます。。。

glassfish auto start domain

 

vim  /usr/lib/systemd/system/glassfish.service

[Unit]
Description=GlassFish Server
After=network.target

[Service]
Type=forking
PIDFile=/opt/glassfish4/glassfish/domains/domain1/config/pid
ExecStart=/opt/glassfish4/bin/asadmin start-domain
ExecReload=/opt/glassfish4/bin/asadmin restart-domain
ExecStop=/opt/glassfish4/bin/asadmin stop-domain
TimeoutStartSec=300
TimeoutStopSec=30
User=root

[Install]
WantedBy=multi-user.target

 

systemctl enable glassfish.service --now

init 6

 

asadmin list-domains

journalctl -u glassfish.service

 

 vim ~/.bash_profile

adding env var

export JAVA_HOME=/opt/jdk1.8.0_92

export PATH=$PATH:/opt/glassfish4/glassfish/bin
export PATH=/opt/jdk1.8.0_92/bin:$PATH

 

 

java -version

 

 

広告を非表示にする