<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>GlassFish Archives - LinuxTuto</title>
	<atom:link href="https://www.linuxtuto.com/tag/glassfish/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.linuxtuto.com/tag/glassfish/</link>
	<description>Linux Sysadmin and DevOps blog</description>
	<lastBuildDate>Mon, 31 Jul 2023 12:30:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://www.linuxtuto.com/wp-content/uploads/2022/01/cropped-LT_faveicon-32x32.png</url>
	<title>GlassFish Archives - LinuxTuto</title>
	<link>https://www.linuxtuto.com/tag/glassfish/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">201456972</site>	<item>
		<title>How to Install GlassFish on Debian 12</title>
		<link>https://www.linuxtuto.com/how-to-install-glassfish-on-debian-12/</link>
					<comments>https://www.linuxtuto.com/how-to-install-glassfish-on-debian-12/#respond</comments>
		
		<dc:creator><![CDATA[LinuxTuto]]></dc:creator>
		<pubDate>Mon, 31 Jul 2023 12:30:05 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[GlassFish]]></category>
		<category><![CDATA[Java]]></category>
		<guid isPermaLink="false">https://www.linuxtuto.com/?p=1488</guid>

					<description><![CDATA[<p>Glassfish is a free, open-source Java application server that simplifies the process of deploying Java applications to a scalable platform. Originally developed by Sun Microsystems,...</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-glassfish-on-debian-12/">How to Install GlassFish on Debian 12</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Glassfish is a free, open-source Java application server that simplifies the process of deploying Java applications to a scalable platform. Originally developed by Sun Microsystems, GlassFish is now maintained by Oracle and is released under both the Common Development and Distribution License as well as the GPL.</p>
<p>In this tutorial, we will show you the complete steps to install GlassFish on Debian 12 OS.</p>
<h2><span class="has-inline-color has-vivid-purple-color">Step 1: Update Operating System</span></h2>
<p>Update your <strong>Debian 12</strong> operating system to make sure all existing packages are up to date:</p>
<pre><code># apt update &amp;&amp; apt upgrade</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 2: Install Java (OpenJDK) on Debian 12</span></h2>
<p>Java packages are available on Debian 12 repositories and you can install it with the following command:</p>
<pre><code># apt install default-jdk</code></pre>
<p>Check Java version after installation:</p>
<pre><code># java -version
openjdk version "17.0.7" 2023-04-18
OpenJDK Runtime Environment (build 17.0.7+7-Debian-1deb12u1)
OpenJDK 64-Bit Server VM (build 17.0.7+7-Debian-1deb12u1, mixed mode, sharing)</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 3: Download GlassFish</span></h2>
<p>Check the official <a href="https://projects.eclipse.org/projects/ee4j.glassfish/downloads">GlassFish Download page</a> to locate the latest version of the software.</p>
<p>The latest version at the moment is 7.0.6. You can download it with the following command:</p>
<pre><code># wget https://download.eclipse.org/ee4j/glassfish/glassfish-7.0.6.zip</code></pre>
<p>Once that downloads, unpack it into /opt with:</p>
<pre><code># unzip glassfish-7.0.6.zip -d /opt</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 4: Create a systemd file for GlassFish</span></h2>
<p>You need to create a systemd file so you can control the GlassFish service. Create the file with the following command:</p>
<pre><code># nano /usr/lib/systemd/system/glassfish.service</code></pre>
<p>In that file, paste the following content:</p>
<pre><code>[Unit]
Description = GlassFish Server v7.0.6
After = syslog.target network.target

[Service]
User = root
ExecStart = /usr/bin/java -jar /opt/glassfish7/glassfish/lib/client/appserver-cli.jar start-domain
ExecStop = /usr/bin/java -jar /opt/glassfish7/glassfish/lib/client/appserver-cli.jar stop-domain
ExecReload = /usr/bin/java -jar /opt/glassfish7/glassfish/lib/client/appserver-cli.jar restart-domain
Type = forking

[Install]
WantedBy = multi-user.target
</code></pre>
<p>Reload system daemon and start the service:</p>
<pre><code># systemctl daemon-reload
# systemctl start glassfish
# systemctl enable glassfish</code></pre>
<p>To confirm everything is working normally, check the status of service:</p>
<pre><code># systemctl status glassfish</code></pre>
<p>Output:</p>
<pre><code>● glassfish.service - GlassFish Server v7.0.6
     Loaded: loaded (/lib/systemd/system/glassfish.service; enabled; preset: enabled)
     Active: active (running)
    Process: 1355 ExecStart=/usr/bin/java -jar /opt/glassfish7/glassfish/lib/client/appserver-cli.jar start-domain (code=exited, status=0/SUCCESS)
   Main PID: 1370 (java)
      Tasks: 89 (limit: 2273)
     Memory: 314.9M
        CPU: 22.599s
     CGroup: /system.slice/glassfish.service</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 5: Access GlassFish console on web browser</span></h2>
<p>To test your installation, open your web browser and type <code>https://your-IP-address:8080</code>. You will see the default <code>GlassFish</code> page.</p>
<p><img fetchpriority="high" decoding="async" class="aligncenter size-large wp-image-1489" src="https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_home-900x366.webp" alt="GlassFish Home Page" width="900" height="366" srcset="https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_home-900x366.webp 900w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_home-300x122.webp 300w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_home-768x313.webp 768w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_home-1536x625.webp 1536w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_home-1222x498.webp 1222w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_home-897x365.webp 897w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_home-684x279.webp 684w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_home.webp 1913w" sizes="(max-width: 900px) 100vw, 900px" /></p>
<h2><span class="has-inline-color has-vivid-purple-color">Step 6: Configure GlassFish</span></h2>
<p>With GlassFish installed, you now must configure it with an admin password. The default password is blank, so you’ll want to create one with the command:</p>
<pre><code># /opt/glassfish7/bin/asadmin --port 4848 change-admin-password</code></pre>
<p>When you run this command, you will be prompted to supply the admin password and details as shown below.</p>
<pre><code>Enter admin user name [default: admin]&gt; <strong>admin</strong>
Enter the admin password&gt; )&gt; <strong>Just press the Enter key</strong>
Enter the new admin password&gt; 
Enter the new admin password again&gt;</code></pre>
<p>Once that’s taken care of, to access the administration panel remotely, run the following command.</p>
<pre><code># /opt/glassfish7/bin/asadmin --port 4848 enable-secure-admin</code></pre>
<pre><code>Enter admin user name&gt; <strong>admin</strong>
Enter admin password for user " admin" &gt;  
You must restart all running servers for the change in secure admin to take effect.
Command enable-secure-admin executed successfully.</code></pre>
<p>After setting the administrative panel, restart the domain.</p>
<pre><code># /opt/glassfish7/bin/asadmin --port 4848 restart-domain</code></pre>
<p>You can now access the <code>GlassFish</code> admin panel at <strong>http://your-IP-address:4848.</strong></p>
<p><img decoding="async" class="aligncenter size-large wp-image-1490" src="https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_login-900x378.webp" alt="GlassFish Login Page" width="900" height="378" srcset="https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_login-900x378.webp 900w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_login-300x126.webp 300w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_login-768x323.webp 768w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_login-1536x645.webp 1536w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_login-1222x514.webp 1222w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_login-897x377.webp 897w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_login-684x287.webp 684w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_login.webp 1918w" sizes="(max-width: 900px) 100vw, 900px" /></p>
<p>Provide your admin username and password and click on <strong>Login.</strong> You should see the <code>GlassFish</code> dashboard:</p>
<p><img decoding="async" class="aligncenter size-large wp-image-1491" src="https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_console-900x513.webp" alt="GlassFish Console" width="900" height="513" srcset="https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_console-900x513.webp 900w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_console-300x171.webp 300w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_console-768x438.webp 768w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_console-1536x876.webp 1536w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_console-1222x697.webp 1222w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_console-897x512.webp 897w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_console-684x390.webp 684w, https://www.linuxtuto.com/wp-content/uploads/2023/07/glassfish_console.webp 1893w" sizes="(max-width: 900px) 100vw, 900px" /></p>
<h2><span class="has-inline-color has-vivid-purple-color">Comments and Conclusion</span></h2>
<p>That&#8217;s it! You have now installed and started <code>GlassFish</code> on your Debian system. Remember that this guide assumes you have administrative privileges on your system. Always check the <a href="https://glassfish.org/docs/">official GlassFish documentation</a> for the most up-to-date installation instructions and any specific considerations related to your system configuration.</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-glassfish-on-debian-12/">How to Install GlassFish on Debian 12</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.linuxtuto.com/how-to-install-glassfish-on-debian-12/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1488</post-id>	</item>
	</channel>
</rss>
