In this lesson,
we're going to discuss various Linux server roles
that you may encounter in the field.
When you're using Linux,
there are a wide variety of network services
that can be configured and run as part of the services
that you're providing.
In this lesson, we're going to cover a wide variety
of the most commonly used services
and a detailed coverage of these individual services
that make up the larger package.
Since there are so many types of servers
that a server can actually be,
Linux just installs the essentials by default.
That way you have plenty of space for any extra packages
or files that you may need to add later on.
During the installation process,
if you choose a common server role though,
Linux will actually install the different packages
you're going to need for that server role.
And this helps to streamline the process.
You can even choose one or more sets
of these different servers or server roles,
and all that software will be installed for you.
For example, I can have a single Linux server
that's serving as a Samba file server,
as well as a DNS server and an SSH server.
If I choose all three of those roles,
Linux will install all three of those sets of packages
and dependencies to ensure I can run those functions.
After you've partitioned and installed
the base operating system,
you can go into your Linux operating system
and choose from a predefined collection
of different software types.
This includes network time servers, secure shell servers,
web servers, PKI, and certificate servers,
name resolution servers, DHCP servers,
Simple Network Management Protocol servers,
centralized authentication, or LDAP servers, proxy servers,
and many others that we're going to talk about in this lesson.
Now let's first talk about NTP.
NTP stands for the Network Time Protocol.
And by default, this is a service or a server
that is not going to be running on a Linux machine.
You have to enable this if you want to be able to operate it.
Now, NTP gives you the ability to synchronize time
across the entire network by having one server
act as the time source for everything else on the network.
If you want your Linux server to be that definitive
time source, you need to run the NTP Damon,
which will install the NTP server on your Linux machine.
Now, in addition to the NTP protocol,
you need software to utilize NTP.
And one of the most common ones used on Linux
is known as Crony.
Crony was designed to perform in a large range
of conditions, including intermittent network connectivity,
heavily congested networks, changing temperatures
where ordinary computer clocks might be able
to lose time based on that, and the ability to run
on a virtual machine.
So if you need a really versatile implementation of NTP,
you can always use Crony and the Crony Damon
to be able to do that.
Second, we have SSH.
Now SSH stands for the Secure Shell Service.
And secure shell is going to provide you
with an authenticated encrypted method
of connecting to a remote or local system over the network.
Now, most frequently, you're going to see SSH used
as a remote administration protocol,
but it can also be used to tunnel
other different types of traffic through it
in a secure manner.
For example, if you want to run FTP,
by default, the traffic is unencrypted.
So if you're logging into an FTP server,
that username and password
can be seen by other people in the network,
but if you actually tunnel the FTP traffic
through an SSH connection,
it's going to become encrypted because SSH
is encrypted by default.
Now by default, Windows does not come with an SSH client.
So even if you set up an SSH server on your Linux machine,
the Windows machine won't know how to connect to it.
If you're using windows as your daily operating system,
and you're trying to connect to a Linux server over SSH,
you're going to have to install a third party tool like PuTTY.
And this will allow you to work from a Window system
and connect over SSH to an SSH server
running on a Linux environment.
And that way, you can connect to a remote server
over the internet and do your configurations.
Next, we're going to talk about web servers.
Now web servers can either be unsecure or secure.
If they're unsecure, you're going to be using HTTP,
which is the Hyper Text Transfer Protocol.
And this operates using TCP over port 80.
If you're using a secure and encrypted version,
this is known as HTTPS,
which stands for Hyper Text Transfer Protocol Secure.
This uses TCP over port 443 to make its connection.
Generally, to run one of these services,
HTTP or HTTPS is just going to be the protocol that's used,
but the server you're going to use
is going to be something else.
Normally, this is something like Apache or Nginx.
When you have this server running,
it's what's hosting all the websites on the internet.
And so if you want to run your own web server
on a Linux machine, you have to install a server Damon
known as Apache or Nginx,
or one of the other ones that are out there
to be able to operate over port 80 or port 443
and deliver those webpages and files and images
over the internet to your users.
The next type of server we're going to talk about
is a certificate server.
Now certificates are used to provide
a way of guaranteeing somebody's identity,
whether that's a user or a server itself.
These certificates are known as digital certificates,
and they're part of the PKI
or Public Key Infrastructure system.
And this uses asymmetric encryption and hashing techniques
to validate that somebody is who they say they are.
To do this though,
you have to have a central server
to manage all of these certificates.
And that is known as a CA or Certificate Authority.
These CAs or certificate authorities are used to manage
the enrollment, approval, expiration, and revocation
of all these different digital certificates.
If you're working for a large organization,
it's very possible that you're running
your own certificate authority to be able to create
digital certificates for all of your users
and all of your machines inside of your network.
Generally, if you're going to be hosting a web server,
you have a digital certificate installed there as well,
but it's not from your own certificate authority.
It's from a third party trusted certificate authority
like Verisign or Entrust,
and that way other people from outside your organization,
when they connect to your web server,
can also trust that server
because that server assigned by that trusted third party.
The next server we're going to talk about
is known as a DNS server or Domain Name System server.
Now a DNS server performs name resolution for us.
And name resolution means that we can use
these easy to remember host names like diontraining.com,
and have that automatically convert into an IP address
for that server.
That way we don't have to remember
a number like 66.123.52.8
every time you want to go to my website.
Instead, you can just type in diontraining.com.
And because we have a DNS server that's up and running,
it will convert those names to IP addresses,
and allow you to know where we are.
A DNS server is going to serve basically as a record holder
for all the company's internal network records
and all of your host names,
or you may have a public facing DNS server like I do.
And in that case, we become part of the larger
internet name resolution infrastructure
so anyone in the world can figure out
where diontraining.com is.
The next one we're going to talk about is a DHCP server.
Now DHCP server stands for Dynamic Host Control Protocol.
When you have a Linux server or workstation,
you have to configure it to participate on the network.
And you can do this either statically or dynamically.
like I said before.
If you're going to use dynamic assignments on your network,
that means you have to have a DHCP server
that's going to be handing out those IP addresses.
When somebody connects to your network,
the DHCP server is going to be responsible
for giving them an IP address, a subnet mask,
the default gateway to your router,
and other values like the location of the DNS server.
By doing all these configurations,
we can do them in this dynamic manner using DHCP.
And this makes it really easy for us,
especially if you have a lot of clients.
For example, in one of my previous organizations,
we had 15,000 end user workstations and laptops.
I didn't want to have to configure all those statically
and assign all four of those pieces of information
to each and every one of those clients.
So instead, we set them all up to use DHCP
and pointed them towards our network's, DHCP server,
which was a Linux machine that handed out that information
to those clients when they connected to the network.
Now some of your network devices can also pass information
about their performance and their workloads
over to a central management database.
To do this, they use something known as SNMP,
or the Simple Network Management Protocol.
SNMP is going to allow us to be able to use
all these different devices across the network,
like routers, switches, servers, and endpoints,
and be able to collect that information
at a centralized server.
That centralized server could be running Linux.
And if you have it configured to act as an SNMP
centralized database server,
it'll go ahead and perform that server role
and collect all the information from all the other devices
and clients on the network.
The next server we're going to talk about
is your centralized authentication server.
And this relies on a protocol known as LDAP, L-D-A-P,
which stands for the Lightweight Directory Access Protocol.
This centralized authentication server
will contain all the user identities
on that centralized server.
So when somebody tries to log into a local workstation
like a Windows, Mac, or Linux machine,
that system is actually going to connect to this centralized
authentication server and verify you are who you say you are
by validating your username and password,
and then letting you log onto the machine.
This makes the network more secure, simpler to manage,
and much easier for users to navigate
because their one account can work on any workstation
across that network instead of only the one computer
they're assigned at their desk.
Authentication servers are used to hold all the information
about the user identities inside of this directory store
known as LDAP.
Now, when a user tries to authenticate to the system,
their username and password are going to be hashed,
sent over to the authentication server,
checked against the database.
And if they're authorized, they'll then be allowed
to log into that local workstation.
Next, we're going to talk about proxy servers.
Now a proxy service resides on a system
that has a direct connection to the internet,
and also has another connection
to the internal network connection.
This way, it acts as a person in the middle
of the connection.
And anytime somebody wants to get out to the internet,
they have to connect to the proxy server first,
the proxy server takes that request,
passes it over to the internet,
gets the information back and then passes it
back to that end user.
Now, why would we want to do this?
Well, the main reason we want to do this
is to be able to log any requests
that are going out of our network
and see what our employees
inside of our organization are doing.
For example, in one of the organizations I used to work at,
you were not allowed to browse pornography
or go to gambling websites when you were at work.
And so all of their machines went through our proxy server,
where we could check the sites
that they were going to first,
and if it was one of those sites
that they weren't allowed to go to,
we would block that connection and send them back a message
saying, you're not authorized to see this.
On the other hand, you can also use it
from the other direction.
As data is coming in from the web,
you can actually check that data to make sure
it doesn't have viruses or any other bad stuff
before passing it on into your machines on the inside.
So it is a great thing to use from a security perspective.
Next, we need to talk about logging servers.
And one of the key ways that we can create a logging server
is to use this CS log protocol.
Now as a system administrator,
it's really important for us to be able to understand
what things are happening on our network.
And we do that by looking at the logs.
Now, instead of having to go to every single server
or workstation and read their logs individually,
I can set up the CS log server and have all those devices
send their data back to my centralized logging server
at a regular interval.
This can be done either every minute, every second,
or whatever interval you really want
depending on your configuration.
But the key here is that you could set up a Linux server
to be this centralized log server.
And this is one of those server roles.
And this is known as a CS log server.
This makes it a lot easier for us to archive all those logs,
especially if we have to prove that we're meeting
certain service level agreements,
or if we're trying to troubleshoot or diagnose an issue
or verify that performance is acting the way
it's supposed to,
all that can be done a lot easier
if I have centralized logging turned on.
So with all this centralization,
we can have our Linux servers, our Windows machines,
all that stuff forwarding their logs
into the single CS log server,
and it's going to consolidate and store all those files
where we can then query them and look through all of them
in one place.
The next thing we want to talk about is monitoring services.
Now there's lots of different monitoring services
available inside of Linux.
Some of these services are designed
for specific applications.
For example, there's monitoring services set up
just to look at your Apache web server.
There's other ones that are set up
to look at the entire Linux operating system.
Depending on what you're doing,
you can look at different monitoring services
and different monitoring programs to see information
about those different servers or server roles.
For example, if you want to look at just Apache,
you can look at ApacheTop.
ApacheTop is going to provide log file analysis
for your Apache web server,
as well as information about different connection
response times and things like that.
Another thing you can use is Monit.
Monit is a simple monitoring utility for Linux
that watches hardware usage and directory
and file information,
and then it monitors the system
inside of the known GUI tool
that allows you to gather information
on your system resources and how they're being used
on a given Linux server.
Now, these two tools are not the only ones out there,
but I just wanted to kind of introduce you to the concept
that there's lots of different tools out there
for monitoring your CPU and memory usage,
as well as the connections to, and from your Linux servers,
depending on your use case.
Next, we're going to talk about load balancing.
Now there's also load balancing services
that you can set up, and this will allow you
to distribute inbound connection requests
across multiple servers.
Think about it this way.
I have over 500,000 students at the time of this recording.
They can't all connect to one single server
and watch this course.
It would crash the server.
So instead, we have multiple servers set up.
And when you go to diontraining.com,
it distributes that load across all of my servers
to be able to give you the best experience we can.
This is the idea of how load balancing works.
It's really common to use load balancing
to distribute this connection
among lots of different web servers
or lots of different databases to ensure
that you can then get a better performance
for your end users.
If you're running a web server,
you don't want one single server being up
to run all of your traffic,
because that becomes a single point of failure.
And if that server goes down or becomes overwhelmed,
it means nobody in the world is going to be able
to access your content.
So you want to instead use load balancing
and multiple web servers to alleviate this congestion
and spread out the load across multiple devices.
Now on your internal network,
there's also lots of different things
that we're going to find as well.
For example, you're going to have things like database servers
and storage area networks.
These are also things that you're going to have
inside your internal network.
And a lot of these are running Linux as well.
Each server inside of this cluster gets called a node.
And if a single node goes down,
the cluster can still remain up because you have multiple
database servers or multiple storage area devices
inside of this clustered array.
This means that we can have better maintainability
and availability of these devices inside of this cluster.
Another thing you're often going to use inside of your network
is file and print servers.
Now file and print servers are going to allow you
to do two basic things;
file storage and printing documents
to a centralized printer.
Centralized printing is really popular,
especially in large organizations
because printers are really expensive.
And if everybody has an individual printer on their desk,
that is a very large capital expense that we have to have
as well as a lot of maintenance.
So instead, we might have one really large
multifunction printer sitting on each floor
of our office building,
and we might have 50 or a hundred people
using that one printer.
This allows us to use a bigger, more expensive printer,
but that more expensive printer
can handle a lot more print volume,
it doesn't break down nearly as often,
and it's a lot easier to support.
To do this though, you have to have a print server.
And so when I print from my workstation,
it goes to the print server, which could be running Linux.
And then that goes over to the printer directly
to print it out.
This helps get your print costs down and also make sure
that we have a more efficient print experience
for all of our users.
Now, on the other side,
we also have to have file storage capability.
And we do this using file servers.
There's two main types of file servers
you're going to come across inside of Linux.
One is known as Samba and the other is called NFS.
Now Samba is a Windows compatible file sharing system
that runs on SMB or Server Message Block.
If you have a Linux and Windows integrated system
for all of your servers and endpoints,
you're going to want to be using Samba
to ensure that all of your devices
can access your file share.
Now, when it comes to Samba, there's two parts of it
you have to think about.
There's the server side, and there's the file side.
If you're running a file server on a Linux server
and you have Windows clients,
you need to run Samba on that server
to be able to communicate with those windows clients.
But similarly, if you're using a Linux system
as your desktop machine,
and you're trying to connect to a Windows file server,
you need to run the Samba client
so you can read into that Windows environment
and be able to access the files that are stored
on that Windows server.
Now, if your enterprise network is made up of only Unix
and Linux workstations and servers, you can instead use NFS,
which is Network File Sharing.
NFS is a native Unix and Linux protocol
that's used by workstations to access directories
that are stored on Unix or Linux servers.
Again, either way you do it,
the idea here is to have a centralized place
for files to be on a single server or a cluster of servers.
And this makes the physical security and backups
of those machines a lot easier to maintain.
When you're configuring NFS,
you're going to do this inside of the /etsy, /exports file.
The next type of server we're going to talk about
is database servers.
Now databases can be internal or external,
but in this case, we're going to talk specifically
about internal databases.
Now databases are going to be used to store
large quantities of data,
and this makes it easier for you to query the database
and get the information out that you need
by searching through it.
There are two basic types of databases
that you're going to encounter
inside of your Linux environments.
We have SQL databases and NoSQL databases.
SQL databases are what we call structured databases.
To communicate with an SQL database
and be able to read from it,
you're going to use the Structured Query Language,
which is known as SQL.
When you're using an SQL database,
it's going to store all of its information
inside of different tables that are related to each other.
So we call these relational databases.
Inside each of these tables,
the data's going to be stored inside tables and columns,
and it will be able to read and write information
using SQL to and from these databases.
Now, the second type of databases
are known as NoSQL databases,
and these are non relational databases.
In these databases,
there is no centralized, organized way
of storing the data in them.
Now you may be wondering, why would you want to use
a NoSQL database?
It seems like it's not a great idea.
Well, NoSQL databases have a big place
in machine learning and AI,
and they're very, very popular in high velocity
and high capacity systems.
So you will run into them
if you're working at a very large organization,
dealing with big data sets in that big data world.
Next, we're going to talk about VPN servers.
Now VPNs are Virtual Private Networks.
And if you're running a VPN server,
this will allow remote users
to connect to this internal company network
and access all of your internal resources
as if they' physically sitting at their desk
of where that network location was.
This is really useful when you're working from home
or working from the road.
For example, right now I'm actually sitting
not in my office.
And instead I'm connected back to my office
over a VPN connection so I can access my email
and other things like that, that I need.
VPN services are really important
because it allows you to have this trusted,
secure tunnel from where you are,
right now I'm in my home office,
back to your corporate office
and into your corporate environment.
The final type of server we're going to talk about
that you can host on your Linux machine is email servers.
Now email services are a key component
of business communications these days.
Email servers are really responsible for the distribution
of electronic mail within the organization
or between organizations over the internet.
There's really two parts to email;
there's sending and there's receiving.
And if you have a Linux server and you want to be able
to have a sending server, you would set up Sendmail.
If you want to be able to receive email,
you would use something like Postfix.
Now, each of these are going to use different email protocols
that are common to all operating systems.
If you're sending email, you do this using SMTP,
which is the Simple Mail Transfer Protocol.
If you're receiving email,
you're going to do this using Post Office Protocol, or POP3,
or you might use Internet Message Access Protocol,
which is known as IMAP.
All right, I know we covered a ton of information
in this lesson, but really the key you need to know here
is all a review from your A+ and Network+ studies.
You need to understand that there are different types
of servers you can run on a Linux machine.
All these different services and all the different ports
and protocols you learn back in A+ and Network+,
they're all coming back right here
as we start talking about how you can install
these different servers and software packages
to run these services on a Linux server.