1

How do I install Glassfish 4.x and run it on port 80? While it's easy enough to download Glassfish and unzip it, should it go in a particular directory? Which user should start and stop the server?

see also:

https://glassfish.java.net/documentation.html

How do install glassfish on ubuntu server 12.x?

https://www.digitalocean.com/community/tutorials/how-to-install-glassfish-4-0-on-ubuntu-12-04-3

Thufir
  • 4,631

1 Answers1

3

see http://www.nabisoft.com/tutorials/glassfish/installing-glassfish-41-on-ubuntu

This tutorial tells you in detail how to install Glassfish 4.1 on Ubuntu 14.04 LTS server and it should also work for 14.10 and newer versions of Ubuntu. It also cover some security concerns. Basically, to answer you questions:

  1. you can't run it on port 80 unless you run it as root

  2. however running it as root is a really bad practice (security!!)

  3. there are a few other options to use port 80 and 443, I prefer simply port forwarding via iptables (no apache in front of it, described in my tutorial...)

  4. directories: well, choose what ever you like. in my tutorial I create a user glassfish with an own home at /home/glassfish/ (everything goes in here). But you could choose anything else as well...

  5. Never ever use toot to start the server. in my tutorial I have created a dedicated user "glassfish" which is used to run glassfish.

Nabi
  • 191