<?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>Wildfly Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/wildfly/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Tue, 13 Jul 2021 16:24:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.13</generator>
	<item>
		<title>Install Wildfly (JBoss) on Debian 10</title>
		<link>https://www.osradar.com/install-wildfly-jboss-on-debian-10/</link>
					<comments>https://www.osradar.com/install-wildfly-jboss-on-debian-10/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Fri, 16 Jul 2021 23:23:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Buster]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Wildfly]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=31236</guid>

					<description><![CDATA[<p>Hello, friends. This post will be really useful if you consider yourself a JavaEE developer. In this post, you will learn how to install Wildfly (JBoss) on Debian 10. This way you will have an application server that you can use for deploying Java applications. According to the Wildfly website: WildFly is a flexible, lightweight, [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-wildfly-jboss-on-debian-10/">Install Wildfly (JBoss) on Debian 10</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="has-line-data">Hello, friends. This post will be really useful if you consider yourself a JavaEE developer. In this post, you will learn how to install Wildfly (JBoss) on Debian 10. This way you will have an application server that you can use for deploying Java applications.</p>



<p class="has-line-data">According to the <a href="https://www.wildfly.org/about/">Wildfly website</a>:</p>



<blockquote class="wp-block-quote"><p class="has-line-data" data-line-start="4" data-line-end="5">WildFly is a flexible, lightweight, managed application runtime that helps you build amazing applications.</p></blockquote>



<p class="has-line-data">Being Java-based, it is compatible with many operating systems such as Linux, macOS, and Windows. In addition to this, it is open source which can help us with licensing issues.</p>



<p class="has-line-data">So, now you will learn how to install it on a Debian 10 server or your computer for development.</p>



<h2 class="code-line"><a id="Install_Wildfly_on_Debian_10_10"></a>Install Wildfly on Debian 10</h2>



<p class="has-line-data">Before we start, open a terminal and update Debian 10. In this post, we will use <code>sudo</code> if you don’t know how to enable it in Debian, we tell you in this post.</p>



<pre class="wp-block-preformatted">sudo apt update
sudo apt upgrade</pre>



<p class="has-line-data">Now it is time to install Java if you don’t have it on your system.</p>



<pre class="wp-block-preformatted">sudo apt install default-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  ca-certificates-java default-jdk-headless default-jre default-jre-headless fontconfig-config fonts-dejavu-core java-common libasound2 libasound2-data
  libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libfontconfig1
  libgif7 libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libgraphite2-3 libharfbuzz0b libjpeg62-turbo liblcms2-2 libllvm7 libnspr4 libnss3
  libpciaccess0 libpcsclite1 libsensors-config libsensors5 libx11-6 libx11-data libx11-xcb1 libxau6 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0
  libxcb-sync1 libxcb1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxi6 libxrender1 libxshmfence1 libxtst6 libxxf86vm1 openjdk-11-jdk openjdk-11-jdk-headless
  openjdk-11-jre openjdk-11-jre-headless x11-common
Suggested packages:
  libasound2-plugins alsa-utils cups-common liblcms2-utils pciutils pcscd lm-sensors openjdk-11-demo openjdk-11-source visualvm libnss-mdns fonts-dejavu-extra
  fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei | fonts-wqy-zenhei fonts-indic
Recommended packages:
  libxt-dev libatk-wrapper-java-jni fonts-dejavu-extra
The following NEW packages will be installed:
  ca-certificates-java default-jdk default-jdk-headless default-jre default-jre-headless fontconfig-config fonts-dejavu-core java-common libasound2 libasound2-data
  libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libfontconfig1
  libgif7 libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libgraphite2-3 libharfbuzz0b libjpeg62-turbo liblcms2-2 libllvm7 libnspr4 libnss3
  libpciaccess0 libpcsclite1 libsensors-config libsensors5 libx11-6 libx11-data libx11-xcb1 libxau6 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0
  libxcb-sync1 libxcb1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxi6 libxrender1 libxshmfence1 libxtst6 libxxf86vm1 openjdk-11-jdk openjdk-11-jdk-headless
  openjdk-11-jre openjdk-11-jre-headless x11-common
0 upgraded, 63 newly installed, 0 to remove and 26 not upgraded.
Need to get 289 MB of archives.
After this operation, 637 MB of additional disk space will be used.
Do you want to continue? [Y/n]</pre>



<p class="has-line-data">It is recommended to create a new user and group for Wildfly so that it does not interfere with the others. First, create a group like this</p>



<pre class="wp-block-preformatted">sudo groupadd -r wildfly</pre>



<p class="has-line-data">Now create the user:</p>



<pre class="wp-block-preformatted">sudo useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly</pre>



<p class="has-line-data">From the previous command, we can deduce that you will not be able to log in but you will have permission over the directory <code>/opt/wildfly</code>.</p>



<p class="has-line-data">Now yes, from the <code>/tmp</code> folder, you can download Wildlfly</p>



<pre class="wp-block-preformatted">cd /tmp/
wget -c https://download.jboss.org/wildfly/24.0.0.Final/wildfly-24.0.0.Final.tar.gz
--2021-07-13 16:47:17--  https://download.jboss.org/wildfly/24.0.0.Final/wildfly-24.0.0.Final.tar.gz
Resolving download.jboss.org (download.jboss.org)... 2a02:26f0:6c00::210:bb8b, 2a02:26f0:6c00::210:bb58, 104.126.36.121, ...
Connecting to download.jboss.org (download.jboss.org)|2a02:26f0:6c00::210:bb8b|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 210418338 (201M) [application/x-gzip]
Saving to: ‘wildfly-24.0.0.Final.tar.gz’

wildfly-24.0.0.Final.tar.gz               100%[=====================================================================================>] 200.67M  40.7MB/s    in 4.8s

2021-07-13 16:47:22 (42.0 MB/s) - ‘wildfly-24.0.0.Final.tar.gz’ saved [210418338/210418338]</pre>



<p class="has-line-data">At the time of writing this post, the latest stable version of Wildfly is <code>24.0.0</code> so this command will change when a new version is released.</p>



<p class="has-line-data">Then, decompress it</p>



<pre class="wp-block-preformatted">sudo tar xfv wildfly-24.0.0.Final.tar.gz -C /opt/</pre>



<p class="has-line-data">Make a symbolic link from the folder to another folder with an easier-to-remember name.</p>



<pre class="wp-block-preformatted">sudo ln -s /opt/wildfly-24.0.0.Final/ /opt/wildfly</pre>



<p class="has-line-data">Make the user <code>wildfly</code> the owner of the folder.</p>



<pre class="wp-block-preformatted">sudo chown -RH wildfly: /opt/wildfly</pre>



<h3 class="code-line"><a id="Configuring_WildFly_on_Debian_10_50"></a>Configuring WildFly on Debian 10</h3>



<p class="has-line-data">By default, the package we have downloaded includes a configuration file that we have to enable. To do this, create a folder called <code>wildfly</code> in the <code>/etc/</code> path.</p>



<pre class="wp-block-preformatted">sudo mkdir -p /etc/wildfly</pre>



<p class="has-line-data">And to enable the default Wildfly configuration, copy the example file to this directory.</p>



<pre class="wp-block-preformatted">sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.conf /etc/wildfly/</pre>



<p class="has-line-data">Also, copy the startup script into the <code>bin</code> folder of the dedicated Wildfly folder.</p>



<pre class="wp-block-preformatted">sudo cp /opt/wildfly/docs/contrib/scripts/systemd/systemd/launch.sh /opt/wildfly/bin/</pre>



<p class="has-line-data">After this, assign run permissions to the script.</p>



<pre class="wp-block-preformatted">sudo sh -c 'chmod +x /opt/wildfly/bin/*.sh'</pre>



<p class="has-line-data">To start, restart and stop running Wildfly then it is best to do it via <code>systemd</code>, and then we have to create a new service for it. Fortunately, the downloaded package includes one so we have to copy it to the directory where the service configurations are hosted.</p>



<pre class="wp-block-preformatted">sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.service /etc/systemd/system/</pre>



<p class="has-line-data">Now, refresh the list of services</p>



<pre class="wp-block-preformatted">sudo systemctl daemon-reload</pre>



<p class="has-line-data">And start the service</p>



<pre class="wp-block-preformatted">sudo systemctl start wildfly</pre>



<p class="has-line-data">Also, you can check the service for any errors.</p>



<pre class="wp-block-preformatted">sudo systemctl status wildfly
● wildfly.service - The WildFly Application Server
   Loaded: loaded (/etc/systemd/system/wildfly.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2021-07-13 16:52:28 CEST; 2s ago
 Main PID: 4978 (launch.sh)
    Tasks: 69 (limit: 4915)
   Memory: 196.4M
   CGroup: /system.slice/wildfly.service
           ├─4978 /bin/bash /opt/wildfly/bin/launch.sh standalone standalone.xml 0.0.0.0
           ├─4979 /bin/sh /opt/wildfly/bin/standalone.sh -c standalone.xml -b 0.0.0.0
           └─5074 java -D[Standalone] -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkJul 13 16:52:28 osradar systemd[1]: Started The WildFly Application Server.</pre>



<p class="has-line-data">All that remains is to create the user with administrative permissions. To do this, run a script called <code>add-user.sh</code>.</p>



<p class="has-line-data">After entering the username, and answering a few more questions, you will be assigned a password.</p>



<pre class="wp-block-preformatted">To represent the user add the following to the server-identities definition &lt;secret value="YW5nZWxv" /></pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="410" src="https://www.osradar.com/wp-content/uploads/2021/07/1-5-1024x410.png" alt="1.- Creating a new user for Wildfly" class="wp-image-31252" srcset="https://www.osradar.com/wp-content/uploads/2021/07/1-5-1024x410.png 1024w, https://www.osradar.com/wp-content/uploads/2021/07/1-5-300x120.png 300w, https://www.osradar.com/wp-content/uploads/2021/07/1-5-768x308.png 768w, https://www.osradar.com/wp-content/uploads/2021/07/1-5-696x279.png 696w, https://www.osradar.com/wp-content/uploads/2021/07/1-5-1068x428.png 1068w, https://www.osradar.com/wp-content/uploads/2021/07/1-5.png 1230w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>1.- Creating a new user for Wildfly</figcaption></figure>



<p class="has-line-data">This way, you can open your web browser and visit <code>http://localhost:8080</code> or if you installed on a server <code>http://your-server:8080</code> and see this screen.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="511" src="https://www.osradar.com/wp-content/uploads/2021/07/2-4-1024x511.png" alt="2.- Wildfly running on Debian 10" class="wp-image-31253" srcset="https://www.osradar.com/wp-content/uploads/2021/07/2-4-1024x511.png 1024w, https://www.osradar.com/wp-content/uploads/2021/07/2-4-300x150.png 300w, https://www.osradar.com/wp-content/uploads/2021/07/2-4-768x383.png 768w, https://www.osradar.com/wp-content/uploads/2021/07/2-4-696x347.png 696w, https://www.osradar.com/wp-content/uploads/2021/07/2-4-1068x533.png 1068w, https://www.osradar.com/wp-content/uploads/2021/07/2-4.png 1366w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>2.- Wildfly running on Debian 10</figcaption></figure>



<p class="has-line-data">So, Wildfly is correctly installed.</p>



<h3 class="code-line"><a id="Optional_Enable_the_administrative_panel_remotely_94"></a>Optional: Enable the administrative panel remotely</h3>



<p class="has-line-data">The administrative panel can be accessed from <code>http://localhost:9990/console</code> but if you installed Wildfly on a remote server, this will not work because, by default, this feature is disabled remotely.</p>



<p class="has-line-data">So, you can enable it. To do this, edit the Wildfly configuration file</p>



<pre class="wp-block-preformatted">sudo nano /etc/wildfly/wildfly.conf</pre>



<p class="has-line-data">And add the following line at the end.</p>



<pre class="wp-block-preformatted">WILDFLY_CONSOLE_BIND=0.0.0.0.0</pre>



<p class="has-line-data">Save the changes and close the editor.</p>



<p class="has-line-data">Now edit the WildFly startup script</p>



<pre class="wp-block-preformatted">sudo nano /opt/wildfly/bin/launch.sh</pre>



<p class="has-line-data">And replace the lines inside the second <code>if</code> that start with <code>$WILDFLY_HOME</code> with the following lines</p>



<pre class="wp-block-preformatted">$WILDFLY_HOME/bin/domain.sh -c $2 -b $3 -bmanagement $4
else
$WILDFLY_HOME/bin/standalone.sh -c $2 -b $3 -bmanagement $4</pre>



<p class="has-line-data">Save the changes and close the editor.</p>



<p class="has-line-data">After this, you need to modify something in the file that manages the Wildfly service.</p>



<pre class="wp-block-preformatted">sudo nano /etc/systemd/system/wildfly.service</pre>



<p class="has-line-data">Change the <code>ExecStart</code> line to this one</p>



<pre class="wp-block-preformatted">ExecStart=/opt/wildfly/bin/launch.sh $WILDFLY_MODE $WILDFLY_CONFIG $WILDFLY_BIND $WILDFLY_CONSOLE_BIND $WILDFLY_CONSOLE_BIND</pre>



<p class="has-line-data">Refresh all daemons and restart the service.</p>



<pre class="wp-block-preformatted">sudo systemctl daemon-reload
sudo systemctl restart wildfly</pre>



<p class="has-line-data">You will now be able to remotely access your configuration panel.</p>



<h2 class="code-line"><a id="Conclusion_133"></a>Conclusion</h2>



<p class="has-line-data">Developing Java applications requires tools to help with the process. In this case, we have presented you with one that allows you to set up a JavaEE application server, and with Wildfly’s extensive experience we will have mature and production-ready software.</p>



<p class="has-line-data">Enjoy it.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-wildfly-jboss-on-debian-10/">Install Wildfly (JBoss) on Debian 10</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/install-wildfly-jboss-on-debian-10/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
