<?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 - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/glassfish/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Mon, 28 Oct 2019 15:39:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How to Install GlassFish 5 on RHEL and CENTOS 8</title>
		<link>https://www.osradar.com/how-to-install-glassfish-5-on-rhel-and-centos-8/</link>
					<comments>https://www.osradar.com/how-to-install-glassfish-5-on-rhel-and-centos-8/#comments</comments>
		
		<dc:creator><![CDATA[Muhammad Nabeel]]></dc:creator>
		<pubDate>Fri, 30 Aug 2019 02:02:58 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Centos 8]]></category>
		<category><![CDATA[Glassfish]]></category>
		<category><![CDATA[glassfish server]]></category>
		<category><![CDATA[RHEL 8]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=13076</guid>

					<description><![CDATA[<p>GlassFish is an open-source application server project started by Sun Microsystems for the Java EE platform, then sponsored by Oracle Corporation, and now living at the Eclipse Foundation and supported by Payara, Oracle and Red Hat. The supported version under Oracle was called Oracle GlassFish Server. GlassFish is free software and was initially dual-licensed under [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-glassfish-5-on-rhel-and-centos-8/">How to Install GlassFish 5 on RHEL and CENTOS 8</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>GlassFish is an open-source application server project started by Sun Microsystems for the Java EE platform, then sponsored by Oracle Corporation, and now living at the Eclipse Foundation and supported by Payara, Oracle and Red Hat. The supported version under Oracle was called Oracle GlassFish Server. GlassFish is free software and was initially dual-licensed under two free software licenses. So, in this post I will show how to install Glassfish 5 on RHEL 8 and CentOS 8.</p>
<p>GlassFish is the reference implementation of Java EE and as such supports Enterprise JavaBeans, JPA, JavaServer Faces, JMS, RMI, JavaServer Pages, servlets, etc. This allows developers to create enterprise applications that are portable and scalable, and that integrate with legacy technologies. Optional components can also be installed for additional services.</p>
<h2>Step 1: Install Some necessary packages</h2>
<p>Install wget and unzip using below commands</p>
<pre>dnf install -y wget unzip</pre>
<p><img loading="lazy" class="alignnone wp-image-13082" src="https://www.osradar.com/wp-content/uploads/2019/08/1-300x180.png" alt="glassfish installation" width="668" height="401" srcset="https://www.osradar.com/wp-content/uploads/2019/08/1-300x180.png 300w, https://www.osradar.com/wp-content/uploads/2019/08/1-768x461.png 768w, https://www.osradar.com/wp-content/uploads/2019/08/1-1024x614.png 1024w, https://www.osradar.com/wp-content/uploads/2019/08/1-696x418.png 696w, https://www.osradar.com/wp-content/uploads/2019/08/1-1068x641.png 1068w, https://www.osradar.com/wp-content/uploads/2019/08/1-700x420.png 700w, https://www.osradar.com/wp-content/uploads/2019/08/1.png 1280w" sizes="(max-width: 668px) 100vw, 668px" /></p>
<h2>Step 2: Install and Configure OpenJDK</h2>
<pre>dnf install -y java-1.8.0-openjdk</pre>
<p><img loading="lazy" class="alignnone wp-image-13083" src="https://www.osradar.com/wp-content/uploads/2019/08/2-2-300x180.png" alt="Open JDK installation" width="668" height="401" srcset="https://www.osradar.com/wp-content/uploads/2019/08/2-2-300x180.png 300w, https://www.osradar.com/wp-content/uploads/2019/08/2-2-768x461.png 768w, https://www.osradar.com/wp-content/uploads/2019/08/2-2-1024x614.png 1024w, https://www.osradar.com/wp-content/uploads/2019/08/2-2-696x418.png 696w, https://www.osradar.com/wp-content/uploads/2019/08/2-2-1068x641.png 1068w, https://www.osradar.com/wp-content/uploads/2019/08/2-2-700x420.png 700w, https://www.osradar.com/wp-content/uploads/2019/08/2-2.png 1280w" sizes="(max-width: 668px) 100vw, 668px" /></p>
<p><strong>Set Java’s Home Environment</strong></p>
<p>Run below command to find java path</p>
<pre>update-alternatives --config java</pre>
<p><img loading="lazy" class="alignnone wp-image-13084" src="https://www.osradar.com/wp-content/uploads/2019/08/3-300x72.png" alt="" width="670" height="161" srcset="https://www.osradar.com/wp-content/uploads/2019/08/3-300x72.png 300w, https://www.osradar.com/wp-content/uploads/2019/08/3-768x184.png 768w, https://www.osradar.com/wp-content/uploads/2019/08/3-1024x245.png 1024w, https://www.osradar.com/wp-content/uploads/2019/08/3-696x166.png 696w, https://www.osradar.com/wp-content/uploads/2019/08/3-1068x255.png 1068w, https://www.osradar.com/wp-content/uploads/2019/08/3.png 1280w" sizes="(max-width: 670px) 100vw, 670px" /></p>
<p>Then copy that path and insert it into below file</p>
<p><strong>Now Set Java’s Path in Your Environment using below command</strong></p>
<pre>vi .bash_profile</pre>
<p>Now add below line in .bash_profile file</p>
<pre>export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el8_0.x86_64/jre/bin/java</pre>
<p><img loading="lazy" class="alignnone wp-image-13085" src="https://www.osradar.com/wp-content/uploads/2019/08/4-1-300x91.png" alt="" width="666" height="202" srcset="https://www.osradar.com/wp-content/uploads/2019/08/4-1-300x91.png 300w, https://www.osradar.com/wp-content/uploads/2019/08/4-1-768x233.png 768w, https://www.osradar.com/wp-content/uploads/2019/08/4-1-1024x311.png 1024w, https://www.osradar.com/wp-content/uploads/2019/08/4-1-696x212.png 696w, https://www.osradar.com/wp-content/uploads/2019/08/4-1-1068x325.png 1068w, https://www.osradar.com/wp-content/uploads/2019/08/4-1.png 1280w" sizes="(max-width: 666px) 100vw, 666px" /></p>
<p><strong>Refresh .bash_file to make changes using below command</strong></p>
<pre>source .bash_profile</pre>
<p><strong>Run below commands to see the Java path you set and the java version.</strong></p>
<pre>echo $JAVA_HOME
java -version</pre>
<p><img loading="lazy" class="alignnone wp-image-13086" src="https://www.osradar.com/wp-content/uploads/2019/08/5-4-300x63.png" alt="" width="667" height="140" srcset="https://www.osradar.com/wp-content/uploads/2019/08/5-4-300x63.png 300w, https://www.osradar.com/wp-content/uploads/2019/08/5-4-768x161.png 768w, https://www.osradar.com/wp-content/uploads/2019/08/5-4-1024x215.png 1024w, https://www.osradar.com/wp-content/uploads/2019/08/5-4-696x146.png 696w, https://www.osradar.com/wp-content/uploads/2019/08/5-4-1068x224.png 1068w, https://www.osradar.com/wp-content/uploads/2019/08/5-4.png 1280w" sizes="(max-width: 667px) 100vw, 667px" /></p>
<h2>Step 3: Installing Glassfish 5.0 on RHEL/CENTOS 8</h2>
<p>We will install Glassfish Full platform.</p>
<p><strong>Create a user for Glassfish.</strong></p>
<pre>useradd -s /sbin/nologin glassfish</pre>
<p><strong>Download Glassfish 5.0</strong></p>
<pre>wget http://download.oracle.com/glassfish/5.0/release/glassfish-5.0.zip</pre>
<p><img loading="lazy" class="alignnone wp-image-13087" src="https://www.osradar.com/wp-content/uploads/2019/08/6-4-300x101.png" alt="" width="668" height="225" srcset="https://www.osradar.com/wp-content/uploads/2019/08/6-4-300x101.png 300w, https://www.osradar.com/wp-content/uploads/2019/08/6-4-768x258.png 768w, https://www.osradar.com/wp-content/uploads/2019/08/6-4-1024x344.png 1024w, https://www.osradar.com/wp-content/uploads/2019/08/6-4-696x234.png 696w, https://www.osradar.com/wp-content/uploads/2019/08/6-4-1068x359.png 1068w, https://www.osradar.com/wp-content/uploads/2019/08/6-4-1250x420.png 1250w, https://www.osradar.com/wp-content/uploads/2019/08/6-4.png 1280w" sizes="(max-width: 668px) 100vw, 668px" /></p>
<p><strong>Unzip glassfish-5.0.zip file.</strong></p>
<pre>unzip -d /opt/ glassfish-5.0.zip</pre>
<p><strong>Assign the ownership of /opt/glassfish5 directory to glassfish user which we have created above.</strong></p>
<pre>chown -R glassfish:glassfish /opt/glassfish5/</pre>
<h2>Step 4: Create a Glassfish Service on CentOS 8 / RHEL 8</h2>
<p>Create systemd service (glassfish.service) for Glassfish server</p>
<pre>vi /usr/lib/systemd/system/glassfish.service</pre>
<p>Now add below script in this file</p>
<pre>[Unit]
Description = GlassFish Server v5.0
After = syslog.target network.target

[Service]
User = glassfish
ExecStart = /usr/bin/java -jar /opt/glassfish5/glassfish/lib/client/appserver-cli.jar start-domain
ExecStop = /usr/bin/java -jar /opt/glassfish5/glassfish/lib/client/appserver-cli.jar stop-domain
ExecReload = /usr/bin/java -jar /opt/glassfish5/glassfish/lib/client/appserver-cli.jar restart-domain
Type = forking

[Install]
WantedBy = multi-user.target

</pre>
<p>Save changes and exit the file.</p>
<p><img loading="lazy" class="alignnone wp-image-13088" src="https://www.osradar.com/wp-content/uploads/2019/08/7-4-300x91.png" alt="" width="666" height="202" srcset="https://www.osradar.com/wp-content/uploads/2019/08/7-4-300x91.png 300w, https://www.osradar.com/wp-content/uploads/2019/08/7-4-768x232.png 768w, https://www.osradar.com/wp-content/uploads/2019/08/7-4-1024x310.png 1024w, https://www.osradar.com/wp-content/uploads/2019/08/7-4-696x210.png 696w, https://www.osradar.com/wp-content/uploads/2019/08/7-4-1068x323.png 1068w, https://www.osradar.com/wp-content/uploads/2019/08/7-4.png 1280w" sizes="(max-width: 666px) 100vw, 666px" /></p>
<p><strong>Start and enable glassfish services.</strong></p>
<pre>systemctl start glassfish.service
systemctl enable glassfish.service</pre>
<p><img loading="lazy" class="alignnone wp-image-13089" src="https://www.osradar.com/wp-content/uploads/2019/08/8-5-300x52.png" alt="" width="663" height="115" srcset="https://www.osradar.com/wp-content/uploads/2019/08/8-5-300x52.png 300w, https://www.osradar.com/wp-content/uploads/2019/08/8-5-768x134.png 768w, https://www.osradar.com/wp-content/uploads/2019/08/8-5-1024x178.png 1024w, https://www.osradar.com/wp-content/uploads/2019/08/8-5-696x121.png 696w, https://www.osradar.com/wp-content/uploads/2019/08/8-5-1068x186.png 1068w, https://www.osradar.com/wp-content/uploads/2019/08/8-5.png 1280w" sizes="(max-width: 663px) 100vw, 663px" /></p>
<h2>Step 5: Add Glassfish ports in Firewall</h2>
<pre>firewall-cmd --add-port={4848,8080,8181}/tcp --permanent 
firewall-cmd --reload</pre>
<p><img loading="lazy" class="alignnone wp-image-13090" src="https://www.osradar.com/wp-content/uploads/2019/08/9-3-300x55.png" alt="" width="665" height="122" srcset="https://www.osradar.com/wp-content/uploads/2019/08/9-3-300x55.png 300w, https://www.osradar.com/wp-content/uploads/2019/08/9-3-768x140.png 768w, https://www.osradar.com/wp-content/uploads/2019/08/9-3-1024x187.png 1024w, https://www.osradar.com/wp-content/uploads/2019/08/9-3-696x127.png 696w, https://www.osradar.com/wp-content/uploads/2019/08/9-3-1068x195.png 1068w, https://www.osradar.com/wp-content/uploads/2019/08/9-3.png 1280w" sizes="(max-width: 665px) 100vw, 665px" /></p>
<h2>Step 6: Setting up Glassfish Path</h2>
<p>Now set Glassfish binaries PATH environment variable using below command</p>
<pre>sed -i 's/^PATH=*/PATH=\/opt\/glassfish5\/bin:/g' ~/.bash_profile</pre>
<h2>Step 7: Set password for Glassfish and enable secure login</h2>
<p>By default, Glassfish has no password using below command and set a password for the admin user, Press ENTER 2 times and then type new password</p>
<pre>/opt/glassfish5/bin/asadmin --port 4848 change-admin-password</pre>
<p><img loading="lazy" class="alignnone wp-image-13091" src="https://www.osradar.com/wp-content/uploads/2019/08/10-2-300x60.png" alt="" width="665" height="133" srcset="https://www.osradar.com/wp-content/uploads/2019/08/10-2-300x60.png 300w, https://www.osradar.com/wp-content/uploads/2019/08/10-2-768x154.png 768w, https://www.osradar.com/wp-content/uploads/2019/08/10-2-1024x205.png 1024w, https://www.osradar.com/wp-content/uploads/2019/08/10-2-696x139.png 696w, https://www.osradar.com/wp-content/uploads/2019/08/10-2-1068x214.png 1068w, https://www.osradar.com/wp-content/uploads/2019/08/10-2.png 1280w" sizes="(max-width: 665px) 100vw, 665px" /></p>
<p>Glassfish Admin Console is running as a clear text HTTP service. Run the following command to enable secure administration console.</p>
<pre>/opt/glassfish5/bin/asadmin --port 4848 enable-secure-admin</pre>
<p>Now restart Glassfish</p>
<pre>systemctl restart glassfish.service</pre>
<p><img loading="lazy" class="alignnone wp-image-13093" src="https://www.osradar.com/wp-content/uploads/2019/08/11-3-300x63.png" alt="" width="667" height="140" srcset="https://www.osradar.com/wp-content/uploads/2019/08/11-3-300x63.png 300w, https://www.osradar.com/wp-content/uploads/2019/08/11-3-768x162.png 768w, https://www.osradar.com/wp-content/uploads/2019/08/11-3-1024x216.png 1024w, https://www.osradar.com/wp-content/uploads/2019/08/11-3-696x147.png 696w, https://www.osradar.com/wp-content/uploads/2019/08/11-3-1068x225.png 1068w, https://www.osradar.com/wp-content/uploads/2019/08/11-3.png 1280w" sizes="(max-width: 667px) 100vw, 667px" /></p>
<p><span class="td_text_highlight_marker_red td_text_highlight_marker"><strong>Note:</strong></span> we&nbsp;may unable&nbsp;to access the Glassfish Admin Console after enabling the secure login due to older version of Grizzly module so we will update Grizzly using below commands to access Glassfish admin console.</p>
<pre>cd /opt/glassfish5/glassfish/modules/endorsed

mv grizzly-npn-bootstrap.jar grizzly-npn-bootstrap.jar.1

wget https://search.maven.org/remotecontent?filepath=org/glassfish/grizzly/grizzly-npn-bootstrap/1.9/grizzly-npn-bootstrap-1.9.jar -O grizzly-npn-bootstrap.jar

chown glassfish:glassfish grizzly-npn-bootstrap.jar

systemctl restart glassfish.service</pre>
<p><img loading="lazy" class="alignnone wp-image-13094" src="https://www.osradar.com/wp-content/uploads/2019/08/12-300x114.png" alt="" width="666" height="253" srcset="https://www.osradar.com/wp-content/uploads/2019/08/12-300x114.png 300w, https://www.osradar.com/wp-content/uploads/2019/08/12-768x292.png 768w, https://www.osradar.com/wp-content/uploads/2019/08/12-1024x390.png 1024w, https://www.osradar.com/wp-content/uploads/2019/08/12-696x265.png 696w, https://www.osradar.com/wp-content/uploads/2019/08/12-1068x406.png 1068w, https://www.osradar.com/wp-content/uploads/2019/08/12-1104x420.png 1104w, https://www.osradar.com/wp-content/uploads/2019/08/12.png 1280w" sizes="(max-width: 666px) 100vw, 666px" /></p>
<h2>Step 8: Accessing Glassfish Server on CentOS / RHEL 8</h2>
<p>Finally browse below URL to access Glassfish Admin Console, ignore the certificate warning or install it.</p>
<p><strong>https://SERVER-IP-OR-DOMAIN-NAME:4848/</strong></p>
<p>Then, type your login credentials to log in it.</p>
<p><img loading="lazy" class="wp-image-13096 aligncenter" src="https://www.osradar.com/wp-content/uploads/2019/08/13-300x167.png" alt="" width="632" height="352" srcset="https://www.osradar.com/wp-content/uploads/2019/08/13-300x167.png 300w, https://www.osradar.com/wp-content/uploads/2019/08/13-768x429.png 768w, https://www.osradar.com/wp-content/uploads/2019/08/13-696x389.png 696w, https://www.osradar.com/wp-content/uploads/2019/08/13-752x420.png 752w, https://www.osradar.com/wp-content/uploads/2019/08/13.png 910w" sizes="(max-width: 632px) 100vw, 632px" /></p>
<p>So, this is the Glassfish Admin Console</p>
<p><img loading="lazy" class="wp-image-13097 aligncenter" src="https://www.osradar.com/wp-content/uploads/2019/08/14-1-300x193.png" alt="" width="631" height="406" srcset="https://www.osradar.com/wp-content/uploads/2019/08/14-1-300x193.png 300w, https://www.osradar.com/wp-content/uploads/2019/08/14-1-768x494.png 768w, https://www.osradar.com/wp-content/uploads/2019/08/14-1-696x447.png 696w, https://www.osradar.com/wp-content/uploads/2019/08/14-1-653x420.png 653w, https://www.osradar.com/wp-content/uploads/2019/08/14-1.png 907w" sizes="(max-width: 631px) 100vw, 631px" /></p>
<p>So, you can read <a href="https://www.osradar.com/install-payara-server-debian-10/" target="_blank" rel="noopener noreferrer">our post about Payara server</a> which is another server.</p>
<p>Finally, share this post with your friends and join<a href="https://t.me/osradar" target="_blank" rel="noopener noreferrer"> our Telegram Channel</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-glassfish-5-on-rhel-and-centos-8/">How to Install GlassFish 5 on RHEL and CENTOS 8</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-glassfish-5-on-rhel-and-centos-8/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
