Thursday, 30 May 2013

How to install glassfish in rhel 6.x / Centos 6.x


-->

[root@vellore 3rdparty_packages]# rpm -ivh jdk-7u7-linux-x64.rpm


[root@vellore Downloads]# unzip glassfish-3.1.2.2.zip -d /usr/share/
[root@vellore Downloads]# vim /etc/init.d/glassfish
#!/bin/bash
# description: Glassfish Start Stop Restart
# processname: glassfish
# chkconfig: 234 20 80
JAVA_HOME=/usr/java/jdk1.7.0_07
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
GLASSFISH_HOME=/usr/share/glassfish3/glassfish/
case $1 in
start)
sh $GLASSFISH_HOME/bin/asadmin start-domain domain1
;;
stop)
sh $GLASSFISH_HOME/bin/asadmin stop-domain domain1
;;
restart)
sh $GLASSFISH_HOME/bin/asadmin stop-domain domain1
sh $GLASSFISH_HOME/bin/asadmin start-domain domain1
;;
esac
exit 0
[root@vellore Downloads]# chmod 755 /etc/init.d/glassfish
[root@vellore Downloads]# chkconfig --add glassfish
[root@vellore Downloads]# chkconfig --level 234 glassfish on
[root@vellore Downloads]# service glassfish start

check this URL in your browser http://localhost:8080/

Click Administration Console it will take you to http://localhost:4848
Change password and logout



2 comments:

  1. Nice ! procedure

    ReplyDelete
  2. Short and Clear! I fix my problem by this! Nice and very Clear and understandbale easly

    ReplyDelete