ann
冰是没有未来的,因为它的永恒
posts - 107,comments - 34,trackbacks - 0
1.下载- ref : https://glassfish.dev.java.net/downloads/v2.1-b60e.html


2.解压下载的jar # java -Xmx256m -jar glassxxx.jar
3.复制到安装的路径下 copy th glassfish to /opt/glasfish2.1

# cd glassfish2.1
如果系统没安装ant # chmod -R +x lib/ant/bin

make sure tomcat is not running on 8080, I changed to run on 18080



4. 安装 # lib/ant/bin/ant -f setup.xml

cannot move the dir after the above step. 


ends results:

create.domain:
     [exec] Using port 4848 for Admin.
     [exec] Using port 8080 for HTTP Instance.
     [exec] Using port 7676 for JMS.
     [exec] Using port 3700 for IIOP.
     [exec] Using port 8181 for HTTP_SSL.
     [exec] Using default port 3820 for IIOP_SSL.
     [exec] Using default port 3920 for IIOP_MUTUALAUTH.
     [exec] Using default port 8686 for JMX_ADMIN.
     [exec] Domain being created with profile:developer, as specified by variable AS_ADMIN_PROFILE in configuration file
.
     [exec] ------ Using Profile [developer] to create the domain ------
     [exec] XML processing for profile: Base document [/data/downloads/glassfish/lib/install/templates/default-domain.xm
l.template]. Profile name [developer]. Processing property [domain.xml.style-sheets].

     [exec] Security Store uses: JKS
     [exec] Domain domain1 created.
     [exec] Login information relevant to admin user name [admin] for this domain [domain1] stored at [/root/.asadminpas
s] successfully.
     [exec] Make sure that this file remains protected. Information stored in this file will be used by asadmin commands
 to manage this domain.
5.编写自动启动脚本放在/etc/init.d/
#!/bin/sh


USER
=glassfish

export GLASSFISH_HOME
=/opt/glassfish2.1
export AS_HOME
=/opt/glassfish2.1
export JAVAEE_HOME
=$AS_HOME
export DERBY_HOME
=$AS_HOME/javadb
export PATH
=$PATH:$AS_HOME/bin:$DERBY_HOME/bin:$JAVA_HOME/bin

glassfish_stop() {
  
$GLASSFISH_HOME/bin/asadmin stop-domain domain1
}

glassfish_start() {
  
$GLASSFISH_HOME/bin/asadmin start-domain domain1
}

db_start() {
  su 
- $USER -"$GLASSFISH_HOME/bin/asadmin start-database"
}

db_stop() {
  su 
- $USER -"$GLASSFISH_HOME/bin/asadmin stop-database"
}

case 
"$1" in
  start)
#    db_start
    glassfish_start
    ;;
  stop)
    glassfish_stop
#    db_stop
    ;;
  restart)
    glassfish_stop
    glassfish_start
    ;;
  
*)
    echo 
"Usage: $0 {start|stop|restart}"
    
exit 1
esac
6.设置脚本为自动运行command to set up running the script: 

# sudo update-rc.d glassfish2.1 defaults


 

 logout and login
posted on 2009-06-13 12:11 冰是没有未来的,因为它的永恒 阅读(998) 评论(0)  编辑  收藏 所属分类: web 服务器

当下,把心放下 放下如果是可能的,那一定是在当下,
不在过去,也不在未来。
当下放下。唯有活在当下,你的问题才能放下。