How do install glassfish on ubuntu server 12.x?

Does anyone know how to install Glassfish on ubuntu server? is there some kind of command line that does it seeing as ubuntu server has no UI so to speak?

For example, if I wish to install mysql I simply run this

sudo apt-get install php5-mysql

anything similar ie sudo apt-get install glassfish?

0

4 Answers

According to: it will be

sudo apt-get install glassfish-appserv

(all the other packages might be of interest too)


This will not be the latest version. If you want that you need to use the install script found here:

5

maybe this here helps:

the tutorial gives you a lot og details and it helped me a lot.

1

I just got all this working on Ubuntu Lucid 10.04, a headless system running on AWS:

  1. Install Oracle Java 7 if required:

    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java7-installer
    java –version
  2. Install Glassfish Enterprise v3 (in this case, it will be installed under /opt/glassfishv3)

    apt-get install xterm
    cd /opt
    wget
    apt-get install unzip
    unzip glassfish-v3.zip
    rm glassfish-v3.zip
  3. Install script to start/stop GlassFish (see #5 for contents of script)

    chmod +x /etc/init.d/glassfish
    update-rc.d glassfish defaults
    apt-get install chkconfig
    chkconfig –list GlassFish
  4. Start GlassFish

    /etc/init.d/glassfish start
  5. Contents of glassfish script:

    GLASSFISH_HOME=${GLASSFISH_HOME:-"/opt/glassfishv3/glassfish"}
    case "$1" in
    start)
    $GLASSFISH_HOME/bin/asadmin start-domain >/dev/null ;;
    stop) $GLASSFISH_HOME/bin/asadmin stop-domain >/dev/null ;;
    restart) $GLASSFISH_HOME/bin/asadmin restart-domain >/dev/null ;;
    \*) echo "usage: $0 (start|stop|restart|help)"
    esac

Download Netbeans Java EE from

That comes with Glassfish included.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like