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,268
  • 7
  • 33
  • 61
Jono
  • 505
  • 3
  • 7
  • 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
  • 3
Rinzwind
  • 293,910
  • 41
  • 570
  • 710
  • How do u install using an install script? i just downloaded the zip version of the glassfish for linux in that link. im quite new to using ubuntu/linux servers. im a windows man at heart – Jono Apr 12 '13 at 12:42
  • 1
    You might consider asking that in a new question ;) This is one way: http://www.lyonlabs.org/howto/howdoi-glassfish.html (it also includes all the permssions settings and apache config settings etc). – Rinzwind Apr 12 '13 at 12:44
  • Cheers ok will give it a try – Jono Apr 12 '13 at 12:46
  • The correct answer is that Ubuntu does not support Glassfish, apparently. This fact is communicated by only providing a version which is nearly a decade old. – le3th4x0rbot Nov 07 '13 at 15:25
  • No, the correct answer is that the creator of the package did not provide the package for any other release older than quantal :) The OP explicitly asked for 12.04/12.10 though so the answer is still valid. The difficult method would be to follow this: https://glassfish.java.net/download.html or you need to use the quantal version ;) – Rinzwind Nov 07 '13 at 15:31
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
  • 3
    Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Eric Carvalho Jun 06 '13 at 11:38
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
  • 1
0

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

That comes with Glassfish included.