2

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?

anonymous2
  • 4,325
Jono
  • 541
  • 3
  • 11
  • 19

4 Answers4

1

According to: http://packages.ubuntu.com/search?suite=quantal&keywords=glassfish 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: http://glassfish.java.net/downloads/3.1.2.2-final.html

Adeeb
  • 113
Rinzwind
  • 309,379
1

maybe this here helps: http://www.nabisoft.com/tutorials/glassfish/installing-glassfish-311-on-ubuntu

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

secret
  • 11
  • 1
0

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  http://download.java.net/glassfish/v3/release/glassfish-v3.zip
    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
    
Ashok
  • 1
0

Download Netbeans Java EE from https://netbeans.org/downloads/

That comes with Glassfish included.