We're here to assist with any of your needs, don't hestitate to reach out.
GlassFish is an open-source application server that is used to deploy and run JavaServer Pages (JSP) and Java Servlets. It provides features like load balancing, clustering, administration, and monitoring tools to support enterprise applications.
To install GlassFish on CentOS 7, follow the steps below:
Before proceeding with the installation, update your CentOS 7 system's packages to their latest versions by running the following command:
sudo yum update -y
GlassFish requires Java Development Kit (JDK) to be installed on the system. You can install OpenJDK, which is an open-source implementation of the Java Platform, by running the following command:
sudo yum install java-1.8.0-openjdk-devel -y
Verify the installation by checking the Java version:
java -version
Visit the official GlassFish website (https://javaee.github.io/glassfish/download) and download the desired version of GlassFish. Alternatively, you can use the following command to download GlassFish 5.1.0:
wget http://download.eclipse.org/ee4j/glassfish/glassfish-5.1.0.zip
Unzip the downloaded GlassFish zip file using the following command:
unzip glassfish-5.1.0.zip
This will extract the contents of the zip file into a directory named "glassfish5".
Add the following environment variables to the "bashrc" file using a text editor:
export GLASSFISH_HOME=/path/to/glassfish5 export PATH=$PATH:$GLASSFISH_HOME/bin
Replace "/path/to/glassfish5" with the actual path where you extracted GlassFish.
Save the file and exit the text editor.
Start GlassFish by running the following command:
asadmin start-domain
This will start the default domain "domain1" of GlassFish.
Open a web browser and access the GlassFish Admin Console using the following URL:
http://localhost:4848
This will open the GlassFish Admin Console, where you can manage and configure your GlassFish server.
Congratulations! You have successfully installed and configured GlassFish on CentOS 7. You can now deploy your Java applications and take advantage of GlassFish's features for enterprise application development.
What our customers say about us
Create your free account today.