Hey, welcome back.
So let's go ahead and get our hands dirty with setting up our development environment.
In this video, I'm going to show you how to install Tomcat on the Mac operating system.
All right.
So what we need to do is open up a web browser and visit the Tomcat website.
So I need to go to Tomcat dot Apache dot org.
So this will bring me to the main Apache Tomcat website.
This is where we can actually download the software.
So over on the left hand side there is a download section and it has the different versions of Tomcat
that we can download at the time of this video recording.
The current version is Tomcat eight.
However, there may be a new version and you can simply download the appropriate version.
So I'll go ahead and select Tomcat eight for this video and this will show me the Tomcat eight downloads.
I'll just scroll down a bit.
And I'll move down to the binary distributions that mean this is the binary code or whatever.
Since I'm doing this for a mac, I'll go ahead and choose Target Z.
So it's simply a zip file that preserves the file permissions and I'll select the link here.
My browser is going to prompt me for the actual file and I'll say Save the file and I'll hit, okay?
And so this will actually download the Tomcat file to my local computer.
All right, great.
So we've actually downloaded the file to our file system.
So let me go over and open up my finder.
Let me move into the downloads directory and this is where I'll find the actual file that was just downloaded.
So here, Apache Tomcat eight.
Now what I need to do is actually unzip the file so I can just unzip it by double clicking it.
So I'll go ahead and do that now.
And now I have this file or this folder here for Apache Tomcat eight.
So this is the unzip version of the file.
All right, so what I normally like to do is actually move this into another directory so I can make
use of it.
So we'll actually make use of a directory for this training class, and I'll call it JSF for Beginners.
So let me go ahead and open up a new window here.
I'll move down to the bottom and I'll say, New folder.
And I'll call it JSF for Beginners.
So this is really just like a little empty scratch temp folder that we're going to use for this training
class.
I'll put all of our apps in here, all of our servers and so forth.
So just one central location JSF for beginners.
So it's empty now.
I'll just double click, move into it.
And what I'd like to do is that folder I just expanded up top Tomcat eight.
I'll just grab it, drag and drop it into this new folder.
JSF for Beginners.
So all it did was just copy that expanded directory to this new folder.
JSF for beginners.
Okay, so this looks pretty good.
All right, so now that I have the file extracted, I actually want to verify the Tomcat installation.
I'm actually running the server.
So what I'll do is I'll open up a terminal window here.
And what I'd like to do is actually move into that Tomcat installation directory.
So I'll just do a CD.
I'm moving to that JSF for Beginners that we just created, and then the Apache Tomcat Directory that
we just copied over.
All right, great.
So I'm in the directory now.
Just do an LS just to see the contents of this file.
Sorry, the contents of this directory.
And you'll see that this directory has a startup.
S-H All right, so this is in the bin directory startup at S-H.
This is what I'll use to actually start the Tomcat server.
So in my command line here, I'll type in bin slash startup S-H and this will actually start the Tomcat
server for me so we can see some logs and then we'll see in the bottom left Tomcat started.
So this is really good.
So our server is installed and we've also started the server.
So at this point Tomcat is up and running and it's listening for a request.
All right, great.
So now that I serve as running, then we can we can actually access our server.
So in my browser, I can simply type local host 8080 and this will connect to my Tomcat server by default.
Tomcat is listing on Port 8080 and that's how we connect to it.
So here we make it to a page Tomcat with a version number, and then they'll even tell you, Hey, if
you're seeing this page, you successfully install Tomcat, so in a really good shape here.
So we downloaded the server, we installed it, and we also started the server and then we accessed
it via our web browser.
So we know that things are looking really good for us.
So good job so far.
And one final thing we want to do is actually stop the server or shut down the server because later
on we're going to use it via Eclipse.
So when I've been directory we can say just been slash shutdown S-H and that'll actually stop the Tomcat
server.
But don't worry.
Once we install Eclipse, then we'll actually run Tomcat from the Eclipse server.
All right.
So we did a lot of good things in this video.
So I showed you how to install the Tomcat, serve on the Mac operating system.
We went through the process to actually start the server and also access the server and then finally,
how to stop the server.
So we're in good books now that we have successfully installed Tomcat.