GlassFish allows developers to build and publish JAVA applications at scale with ease. It also includes a complete administration console, clustering support, and other developer and production-focused tools and features. The glassFish project which was developed by Sun Microsystem is now supported and owned by Oracle corporation. Oracle has licensing terms that you may want to read carefully before using GlassFish at your business or enterprise. Below we will show you how to install and configure GlassFish on Ubuntu Linux.
How to install the GlassFish JAVA application server on Ubuntu Linux
As mentioned above, GlassFish is a free, open-source server for deploying JAVA-based applications for developers to build and publish applications with ease. Below is how to install it on Ubuntu Linux. To install GlassFish, you must first install Java. The open-source Java should work great with GlassFish. Run the commands below to install OpenJDK on Ubuntu Linux. This will install the current stable version of OpenJDK for Ubuntu Linux. To check the version of Java installed, run the commands below: That should output similar lines as shown below: Once Java is installed, continue below to download GlassFish and install it. Now that JAVA is installed, run the commands below to download and extract GlassFish on Ubuntu Linux. Next, create the GlassFish systemd daemon file to manage the GlassFish service. to do that, run the commands below to create a file named glassfish.service. Then copy and paste the lines below into the file and save. Once the file is created, run the commands below to reload the systemd daemon by running the commands below. You should be able to start and enable the GlassFish service using the commands below. To see if GlassFish is running, run the commands below. After running the status command above, you should see similar lines like the ones below: By default, GlassFish administrative user has no password set up. You will probably want to create one for the admin user. Run the commands below to do that. You should be prompted to type and confirm a new password for the admin account. Once the password is created, you probably should run the commands below to secure the account. You should be prompted with the following prompts: After that, restart the GlassFish service. Now open your browser and browse to the server hostname or IP address followed by port 4848. You will be greeted with the GlassFish admin console. Type in the admin username and password created above to sign in. Once you have successfully signed in, you should see a screen similar to the one below. That should be it. If you want to run a reverse proxy server to use a domain name or more advanced settings, read the posts below to learn how to set up a reverse proxy server with either Nginx or Apache to use with GlassFish.
How to set up a reverse proxy server with Nginx How to set up a reverse proxy server with Apache
Conclusion: This post showed you how to install GlassFish on Ubuntu Linux. If you find any error above or have something to add, please use the comment form below.