好久没记录点东西了,发现自己比以前懒惰了,可能是因为环境,没有人逼你做事。
glassfish安装
1:wget http://download.java.net/glassfish/v3-prelude/release/glassfish-v3-prelude.zip
2: unzip glassfish-v3-prelude.zip
3:sudo mv glassfishv3-prelude /opt
4:sudo useradd --system glassfish -d /opt/glassfishv3-prelude 添加glassfish用户
5:设置目录权限 sudo chgrp -R admin /opt/glassfishv3-prelude sudo chown -R glassfish glassfishv3-prelude
6:sudo chmod -R +x bin/ sudo chmod -R +x glassfish/bin/ 添加脚本执行权限
7:编写启动脚本
sudo vim /etc/init.d/glassfish
#! /bin/sh
GLASSFISHPATH=/opt/glassfishv3-prelude/bin case "$1" in start) echo "starting glassfish from $GLASSFISHPATH" sudo -u glassfish $GLASSFISHPATH/asadmin start-domain domain1 ;; restart) $0 stop $0 start ;; stop) echo "stopping glassfish from $GLASSFISHPATH" sudo -u glassfish $GLASSFISHPATH/asadmin stop-domain domain1 ;; *) echo $"usage: $0 {start|stop|restart}" exit 3 ;; esac :
8:开机运行 sudo update-rc.d glassfish defaults
可以启动下试试看 http://localhost:4848/