If you're unfamiliar with Enterprise Java, or are
unsure where to get started, this video is where you want to start.
I'm creating another series on more advanced enterprise Java topics
and many of those lessons will involve running Java in JEE container. One of the
easiest containers to use is the Wildfly
application server from Redhat, so that's what we're using.
There are 4 things you need to do to get started with Wildfly
before you can take advantage of future Java Enterprise
videos on DeegeU. So let's go!
The first thing to do is show you how to get Wildfly. You can download Wildfly
from
Wildfly.org. There should be a big banner that says
"Download it now" and that's what you want to click on.
If they don't have a big banner like they did here, go to the download button on the
menu
at the top of the page. There should be many versions listed. Some will have
alpha or beta at the end. You want to avoid those, unless you like
living on the edge or think that the next version of Wildfly will be
released by the time the you need to get to production.
There are some listed as CR.
Those are releases, and you should be ok to develop with those.
They usually move quickly to final when they are in CR.
The last is the ones that say final.
Those are definitely OK to use in production. For these lessons pulling down
Wildfly 9.
Each lesson on DeegeU that uses an application server
will specify the actual version used, but
I'll also be clear if we're using something that isn't in an earlier version. There are several
versions of the application server as well.
There's the regular distribution, the servlet only distribution, and
the source code distribution. We're using the regular distribution.
It says "Application server distribution". So step 1:
download the zip file by clicking download.
OK we've downloaded the file. You now need to know how to install it.
Once you download the file you'll need, to unzip it.
Unless you're on a Mac, then its already a unpackaged for you.
Create a directory where you want Wildfly to reside.
I usually create a directory called Wildfly, then I create specific version
directories under it.
This way we can switch between versions if necessary. Create your directory
and move the unzipped directory to your destination directory.
That's pretty much it. You now have Wildfly installed.
Now we can start the application server up at this point, but to be able to do
anything meaningful,
we need to create a user first. So the next thing you need to do you
know is how to create a user. Open a command prompt and navigate to the Wildfly
directory. This should be where you copied the folder.
The directory for Wildfly should be named something like wildfly-9.0.0.CR1.
Inside that directory
is a directory called /bin. Go into that directory. We'll discuss the rest the
application server directories in another lesson.
This is just to get up and running. So we need to run the script add-user.
We type ./add-user.sh
on Linux or a Mac. On Windows you run add-user.bat.
It will prompt us to enter the type of user we need to create.
We need an administrator, so we'll select "a) management user".
Leave the realm alone. Use whatever username and password you like.
I'll use 8 asterisks for the password. :) We don't need to assign
our user to any groups yet. Say yes we want to add a user.
Say no, we don't want this user to be a slave host,
and we're done.
The final thing you need to know is how to test everything. In the same directory
where we ran add-user,
you need to run ./standalone.sh or dot bat if you're on Windows.
This will start the Wildfly server. Everything should look similar to what
you see here.
we're looking for the final message that says everything has started up.
That should be similar to this.
OK now open up an Internet browser window. It doesn't matter which one.
go to this address. (http://localhost:9990/console) Use the same username and password you just created.
And you should be in the management console. Feel free to look around. There's
not too much damage you can do.
If you think you're in a state you can't get out of, delete everything and
reinstall.
It shouldn't take more than a few minutes. So that's it!
I showed you where to get Wildfly, how to install Wildfly,
how to create a user in Wildfly and finally
how to run Wildfly. To close Wildfly
just Command-C the process. That's it. Your computer should be good to go,
and ready to tackle the Java Enterprise lessons. See you
then!