In this article, we will have explained the necessary steps to install and configure GlassFish on Ubuntu 18.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.
GlassFish is an open-source application server project started by Sun Microsystems for the Java EE platform and now sponsored by Oracle Corporation. The supported version is called Oracle GlassFish Server.
Install GlassFish on Ubuntu
Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.
Step 2. Install Java.
Add the PPA for installing Java by running the following command:
Run the following command to install the oracle packages:
Once the installation is done, Set the environment variable:
Then reload the file:
Step 3. Install GlassFish on Ubuntu 18.04 LTS.
First download the glassfish server package:
To setup PATH variable for GlassFish, open and edit the ” ~/.profile” file as shown below:
Reload the file by using the following command:
Step 4. Run GlassFish.
You can easily start your GlassFish 5 by using the following command:
Now to set the password for the application by using the following command:
To access the administration panel remotely, use the following command:
After setting the administrative panel, restart the domain:
Open the browser and point the URL http://your-ip-address:4848 / to check the homepage of GlassFish Server.
That’s all you need to do to install GlassFish on Ubuntu 18.04. I hope you find this quick tip helpful. If you have questions or suggestions, feel free to leave a comment below.