Sometimes it might be necessary
that we like to build software from the source code.
After all, most Linux software is open source.
So the software that's packaged in the .rpm and the .deb,
those are pre-compiled.
But as in the previous lesson
when we downloaded the Nmap files,
we're going to actually compile it ourselves.
Now we're not going to go through
and actually make any of the configuration settings,
but we're just going to walk through the steps
of how to compile the source code.
Now let's first just ensure that the Nmap isn't installed.
This'll be the command.
Okay.
All right, next we'll go ahead
and install this GNU Collection Compiler for C++.
Again, we're going to need this compiler
in order to compile the information
that we downloaded for Nmap.
All right, looks like that went through successfully.
The next thing we're going to do, we're going to go
to the Nmap folder that we downloaded previously.
So if we list this out, we see the nmap-7.0.
All right, next, we're going to use the ./configure command,
and what that's going to do, it's going to allow us
to gather system information needed
about the application to be compiled,
and it stores it in the make file.
All right, looks like that went through successfully.
We have Nmap.
All right, next we need to do, actually compile the system
with the make command.
All right, that went through successfully.
Now once we have this system compiled,
we still must install it.
So the last step is we use the make install command.
And voila, Nmap successfully installed.
Now let's test this bad boy out.
So let's see what we got going on here.
All right, looks like it's good to go.
It gave us the information there,
letting us specify different options, host discovery,
scanning techniques, port specification,
service/version detection.
We get this help information once we type out a command
without any options or arguments presented.
So looks like we're good to go there.
Okay, we installed the compiler for this system
in order to download and compile source code directly.
Again, that maximizes flexibility for any administrator,
'cause remember, Linux is open source.
So a lot of the applications and tools that we'll be using
will be open source as well.
So again, that gives us the freedom and flexibility
to change and maximize performance as needed.
That concludes this demonstration.
Thank you for sticking with me,
and I'll see you in the next lesson.