1
00:00:00,020 --> 00:00:00,990
In this lesson,

2
00:00:00,990 --> 00:00:03,330
we're going to discuss various Linux server roles

3
00:00:03,330 --> 00:00:05,370
that you may encounter in the field.

4
00:00:05,370 --> 00:00:06,480
When you're using Linux,

5
00:00:06,480 --> 00:00:08,820
there are a wide variety of network services

6
00:00:08,820 --> 00:00:10,950
that can be configured and run as part of the services

7
00:00:10,950 --> 00:00:12,270
that you're providing.

8
00:00:12,270 --> 00:00:14,850
In this lesson, we're going to cover a wide variety

9
00:00:14,850 --> 00:00:16,710
of the most commonly used services

10
00:00:16,710 --> 00:00:19,470
and a detailed coverage of these individual services

11
00:00:19,470 --> 00:00:21,510
that make up the larger package.

12
00:00:21,510 --> 00:00:23,250
Since there are so many types of servers

13
00:00:23,250 --> 00:00:24,900
that a server can actually be,

14
00:00:24,900 --> 00:00:27,810
Linux just installs the essentials by default.

15
00:00:27,810 --> 00:00:30,450
That way you have plenty of space for any extra packages

16
00:00:30,450 --> 00:00:33,210
or files that you may need to add later on.

17
00:00:33,210 --> 00:00:34,830
During the installation process,

18
00:00:34,830 --> 00:00:36,990
if you choose a common server role though,

19
00:00:36,990 --> 00:00:39,240
Linux will actually install the different packages

20
00:00:39,240 --> 00:00:41,280
you're going to need for that server role.

21
00:00:41,280 --> 00:00:43,590
And this helps to streamline the process.

22
00:00:43,590 --> 00:00:45,570
You can even choose one or more sets

23
00:00:45,570 --> 00:00:47,790
of these different servers or server roles,

24
00:00:47,790 --> 00:00:50,520
and all that software will be installed for you.

25
00:00:50,520 --> 00:00:53,160
For example, I can have a single Linux server

26
00:00:53,160 --> 00:00:55,170
that's serving as a Samba file server,

27
00:00:55,170 --> 00:00:58,140
as well as a DNS server and an SSH server.

28
00:00:58,140 --> 00:01:00,060
If I choose all three of those roles,

29
00:01:00,060 --> 00:01:02,610
Linux will install all three of those sets of packages

30
00:01:02,610 --> 00:01:05,850
and dependencies to ensure I can run those functions.

31
00:01:05,850 --> 00:01:07,350
After you've partitioned and installed

32
00:01:07,350 --> 00:01:08,850
the base operating system,

33
00:01:08,850 --> 00:01:10,920
you can go into your Linux operating system

34
00:01:10,920 --> 00:01:12,720
and choose from a predefined collection

35
00:01:12,720 --> 00:01:14,340
of different software types.

36
00:01:14,340 --> 00:01:17,820
This includes network time servers, secure shell servers,

37
00:01:17,820 --> 00:01:21,000
web servers, PKI, and certificate servers,

38
00:01:21,000 --> 00:01:24,450
name resolution servers, DHCP servers,

39
00:01:24,450 --> 00:01:26,790
Simple Network Management Protocol servers,

40
00:01:26,790 --> 00:01:31,110
centralized authentication, or LDAP servers, proxy servers,

41
00:01:31,110 --> 00:01:34,530
and many others that we're going to talk about in this lesson.

42
00:01:34,530 --> 00:01:37,440
Now let's first talk about NTP.

43
00:01:37,440 --> 00:01:40,320
NTP stands for the Network Time Protocol.

44
00:01:40,320 --> 00:01:42,870
And by default, this is a service or a server

45
00:01:42,870 --> 00:01:45,330
that is not going to be running on a Linux machine.

46
00:01:45,330 --> 00:01:48,270
You have to enable this if you want to be able to operate it.

47
00:01:48,270 --> 00:01:51,240
Now, NTP gives you the ability to synchronize time

48
00:01:51,240 --> 00:01:54,360
across the entire network by having one server

49
00:01:54,360 --> 00:01:57,780
act as the time source for everything else on the network.

50
00:01:57,780 --> 00:02:00,090
If you want your Linux server to be that definitive

51
00:02:00,090 --> 00:02:03,240
time source, you need to run the NTP Damon,

52
00:02:03,240 --> 00:02:07,350
which will install the NTP server on your Linux machine.

53
00:02:07,350 --> 00:02:09,479
Now, in addition to the NTP protocol,

54
00:02:09,479 --> 00:02:12,330
you need software to utilize NTP.

55
00:02:12,330 --> 00:02:14,250
And one of the most common ones used on Linux

56
00:02:14,250 --> 00:02:15,810
is known as Crony.

57
00:02:15,810 --> 00:02:17,970
Crony was designed to perform in a large range

58
00:02:17,970 --> 00:02:20,820
of conditions, including intermittent network connectivity,

59
00:02:20,820 --> 00:02:23,550
heavily congested networks, changing temperatures

60
00:02:23,550 --> 00:02:25,470
where ordinary computer clocks might be able

61
00:02:25,470 --> 00:02:28,290
to lose time based on that, and the ability to run

62
00:02:28,290 --> 00:02:29,700
on a virtual machine.

63
00:02:29,700 --> 00:02:33,330
So if you need a really versatile implementation of NTP,

64
00:02:33,330 --> 00:02:35,850
you can always use Crony and the Crony Damon

65
00:02:35,850 --> 00:02:37,440
to be able to do that.

66
00:02:37,440 --> 00:02:39,750
Second, we have SSH.

67
00:02:39,750 --> 00:02:42,780
Now SSH stands for the Secure Shell Service.

68
00:02:42,780 --> 00:02:44,790
And secure shell is going to provide you

69
00:02:44,790 --> 00:02:46,620
with an authenticated encrypted method

70
00:02:46,620 --> 00:02:50,520
of connecting to a remote or local system over the network.

71
00:02:50,520 --> 00:02:53,070
Now, most frequently, you're going to see SSH used

72
00:02:53,070 --> 00:02:55,200
as a remote administration protocol,

73
00:02:55,200 --> 00:02:57,330
but it can also be used to tunnel

74
00:02:57,330 --> 00:02:59,250
other different types of traffic through it

75
00:02:59,250 --> 00:03:00,720
in a secure manner.

76
00:03:00,720 --> 00:03:03,480
For example, if you want to run FTP,

77
00:03:03,480 --> 00:03:05,850
by default, the traffic is unencrypted.

78
00:03:05,850 --> 00:03:08,190
So if you're logging into an FTP server,

79
00:03:08,190 --> 00:03:09,450
that username and password

80
00:03:09,450 --> 00:03:11,580
can be seen by other people in the network,

81
00:03:11,580 --> 00:03:14,250
but if you actually tunnel the FTP traffic

82
00:03:14,250 --> 00:03:16,170
through an SSH connection,

83
00:03:16,170 --> 00:03:18,420
it's going to become encrypted because SSH

84
00:03:18,420 --> 00:03:20,340
is encrypted by default.

85
00:03:20,340 --> 00:03:24,270
Now by default, Windows does not come with an SSH client.

86
00:03:24,270 --> 00:03:28,050
So even if you set up an SSH server on your Linux machine,

87
00:03:28,050 --> 00:03:30,630
the Windows machine won't know how to connect to it.

88
00:03:30,630 --> 00:03:33,300
If you're using windows as your daily operating system,

89
00:03:33,300 --> 00:03:36,180
and you're trying to connect to a Linux server over SSH,

90
00:03:36,180 --> 00:03:38,970
you're going to have to install a third party tool like PuTTY.

91
00:03:38,970 --> 00:03:41,100
And this will allow you to work from a Window system

92
00:03:41,100 --> 00:03:44,070
and connect over SSH to an SSH server

93
00:03:44,070 --> 00:03:46,020
running on a Linux environment.

94
00:03:46,020 --> 00:03:48,180
And that way, you can connect to a remote server

95
00:03:48,180 --> 00:03:51,180
over the internet and do your configurations.

96
00:03:51,180 --> 00:03:53,550
Next, we're going to talk about web servers.

97
00:03:53,550 --> 00:03:56,520
Now web servers can either be unsecure or secure.

98
00:03:56,520 --> 00:03:59,550
If they're unsecure, you're going to be using HTTP,

99
00:03:59,550 --> 00:04:01,800
which is the Hyper Text Transfer Protocol.

100
00:04:01,800 --> 00:04:05,220
And this operates using TCP over port 80.

101
00:04:05,220 --> 00:04:07,530
If you're using a secure and encrypted version,

102
00:04:07,530 --> 00:04:09,990
this is known as HTTPS,

103
00:04:09,990 --> 00:04:13,050
which stands for Hyper Text Transfer Protocol Secure.

104
00:04:13,050 --> 00:04:17,430
This uses TCP over port 443 to make its connection.

105
00:04:17,430 --> 00:04:19,980
Generally, to run one of these services,

106
00:04:19,980 --> 00:04:24,390
HTTP or HTTPS is just going to be the protocol that's used,

107
00:04:24,390 --> 00:04:25,950
but the server you're going to use

108
00:04:25,950 --> 00:04:27,450
is going to be something else.

109
00:04:27,450 --> 00:04:30,960
Normally, this is something like Apache or Nginx.

110
00:04:30,960 --> 00:04:32,580
When you have this server running,

111
00:04:32,580 --> 00:04:35,580
it's what's hosting all the websites on the internet.

112
00:04:35,580 --> 00:04:37,260
And so if you want to run your own web server

113
00:04:37,260 --> 00:04:40,500
on a Linux machine, you have to install a server Damon

114
00:04:40,500 --> 00:04:42,360
known as Apache or Nginx,

115
00:04:42,360 --> 00:04:44,100
or one of the other ones that are out there

116
00:04:44,100 --> 00:04:47,010
to be able to operate over port 80 or port 443

117
00:04:47,010 --> 00:04:50,070
and deliver those webpages and files and images

118
00:04:50,070 --> 00:04:52,560
over the internet to your users.

119
00:04:52,560 --> 00:04:54,240
The next type of server we're going to talk about

120
00:04:54,240 --> 00:04:55,860
is a certificate server.

121
00:04:55,860 --> 00:04:57,390
Now certificates are used to provide

122
00:04:57,390 --> 00:04:59,640
a way of guaranteeing somebody's identity,

123
00:04:59,640 --> 00:05:02,310
whether that's a user or a server itself.

124
00:05:02,310 --> 00:05:04,890
These certificates are known as digital certificates,

125
00:05:04,890 --> 00:05:06,300
and they're part of the PKI

126
00:05:06,300 --> 00:05:08,400
or Public Key Infrastructure system.

127
00:05:08,400 --> 00:05:11,400
And this uses asymmetric encryption and hashing techniques

128
00:05:11,400 --> 00:05:14,400
to validate that somebody is who they say they are.

129
00:05:14,400 --> 00:05:15,233
To do this though,

130
00:05:15,233 --> 00:05:16,530
you have to have a central server

131
00:05:16,530 --> 00:05:18,390
to manage all of these certificates.

132
00:05:18,390 --> 00:05:22,320
And that is known as a CA or Certificate Authority.

133
00:05:22,320 --> 00:05:25,230
These CAs or certificate authorities are used to manage

134
00:05:25,230 --> 00:05:28,290
the enrollment, approval, expiration, and revocation

135
00:05:28,290 --> 00:05:30,780
of all these different digital certificates.

136
00:05:30,780 --> 00:05:32,730
If you're working for a large organization,

137
00:05:32,730 --> 00:05:34,110
it's very possible that you're running

138
00:05:34,110 --> 00:05:36,270
your own certificate authority to be able to create

139
00:05:36,270 --> 00:05:38,130
digital certificates for all of your users

140
00:05:38,130 --> 00:05:41,040
and all of your machines inside of your network.

141
00:05:41,040 --> 00:05:43,560
Generally, if you're going to be hosting a web server,

142
00:05:43,560 --> 00:05:45,990
you have a digital certificate installed there as well,

143
00:05:45,990 --> 00:05:48,240
but it's not from your own certificate authority.

144
00:05:48,240 --> 00:05:50,910
It's from a third party trusted certificate authority

145
00:05:50,910 --> 00:05:52,980
like Verisign or Entrust,

146
00:05:52,980 --> 00:05:55,590
and that way other people from outside your organization,

147
00:05:55,590 --> 00:05:57,000
when they connect to your web server,

148
00:05:57,000 --> 00:05:58,500
can also trust that server

149
00:05:58,500 --> 00:06:01,620
because that server assigned by that trusted third party.

150
00:06:01,620 --> 00:06:03,240
The next server we're going to talk about

151
00:06:03,240 --> 00:06:07,590
is known as a DNS server or Domain Name System server.

152
00:06:07,590 --> 00:06:10,890
Now a DNS server performs name resolution for us.

153
00:06:10,890 --> 00:06:12,810
And name resolution means that we can use

154
00:06:12,810 --> 00:06:16,380
these easy to remember host names like diontraining.com,

155
00:06:16,380 --> 00:06:19,470
and have that automatically convert into an IP address

156
00:06:19,470 --> 00:06:20,820
for that server.

157
00:06:20,820 --> 00:06:22,230
That way we don't have to remember

158
00:06:22,230 --> 00:06:26,340
a number like 66.123.52.8

159
00:06:26,340 --> 00:06:28,500
every time you want to go to my website.

160
00:06:28,500 --> 00:06:31,350
Instead, you can just type in diontraining.com.

161
00:06:31,350 --> 00:06:33,510
And because we have a DNS server that's up and running,

162
00:06:33,510 --> 00:06:36,030
it will convert those names to IP addresses,

163
00:06:36,030 --> 00:06:38,220
and allow you to know where we are.

164
00:06:38,220 --> 00:06:41,340
A DNS server is going to serve basically as a record holder

165
00:06:41,340 --> 00:06:43,890
for all the company's internal network records

166
00:06:43,890 --> 00:06:45,390
and all of your host names,

167
00:06:45,390 --> 00:06:48,990
or you may have a public facing DNS server like I do.

168
00:06:48,990 --> 00:06:51,120
And in that case, we become part of the larger

169
00:06:51,120 --> 00:06:53,160
internet name resolution infrastructure

170
00:06:53,160 --> 00:06:54,870
so anyone in the world can figure out

171
00:06:54,870 --> 00:06:57,450
where diontraining.com is.

172
00:06:57,450 --> 00:07:00,780
The next one we're going to talk about is a DHCP server.

173
00:07:00,780 --> 00:07:04,920
Now DHCP server stands for Dynamic Host Control Protocol.

174
00:07:04,920 --> 00:07:07,110
When you have a Linux server or workstation,

175
00:07:07,110 --> 00:07:09,537
you have to configure it to participate on the network.

176
00:07:09,537 --> 00:07:12,060
And you can do this either statically or dynamically.

177
00:07:12,060 --> 00:07:13,560
like I said before.

178
00:07:13,560 --> 00:07:15,930
If you're going to use dynamic assignments on your network,

179
00:07:15,930 --> 00:07:18,300
that means you have to have a DHCP server

180
00:07:18,300 --> 00:07:20,760
that's going to be handing out those IP addresses.

181
00:07:20,760 --> 00:07:22,530
When somebody connects to your network,

182
00:07:22,530 --> 00:07:24,540
the DHCP server is going to be responsible

183
00:07:24,540 --> 00:07:27,270
for giving them an IP address, a subnet mask,

184
00:07:27,270 --> 00:07:28,980
the default gateway to your router,

185
00:07:28,980 --> 00:07:32,160
and other values like the location of the DNS server.

186
00:07:32,160 --> 00:07:33,960
By doing all these configurations,

187
00:07:33,960 --> 00:07:37,290
we can do them in this dynamic manner using DHCP.

188
00:07:37,290 --> 00:07:39,120
And this makes it really easy for us,

189
00:07:39,120 --> 00:07:41,790
especially if you have a lot of clients.

190
00:07:41,790 --> 00:07:44,340
For example, in one of my previous organizations,

191
00:07:44,340 --> 00:07:48,270
we had 15,000 end user workstations and laptops.

192
00:07:48,270 --> 00:07:50,550
I didn't want to have to configure all those statically

193
00:07:50,550 --> 00:07:52,830
and assign all four of those pieces of information

194
00:07:52,830 --> 00:07:54,750
to each and every one of those clients.

195
00:07:54,750 --> 00:07:58,110
So instead, we set them all up to use DHCP

196
00:07:58,110 --> 00:08:00,720
and pointed them towards our network's, DHCP server,

197
00:08:00,720 --> 00:08:03,270
which was a Linux machine that handed out that information

198
00:08:03,270 --> 00:08:06,030
to those clients when they connected to the network.

199
00:08:06,030 --> 00:08:09,090
Now some of your network devices can also pass information

200
00:08:09,090 --> 00:08:11,250
about their performance and their workloads

201
00:08:11,250 --> 00:08:13,500
over to a central management database.

202
00:08:13,500 --> 00:08:16,800
To do this, they use something known as SNMP,

203
00:08:16,800 --> 00:08:19,470
or the Simple Network Management Protocol.

204
00:08:19,470 --> 00:08:22,080
SNMP is going to allow us to be able to use

205
00:08:22,080 --> 00:08:24,390
all these different devices across the network,

206
00:08:24,390 --> 00:08:27,150
like routers, switches, servers, and endpoints,

207
00:08:27,150 --> 00:08:28,860
and be able to collect that information

208
00:08:28,860 --> 00:08:30,450
at a centralized server.

209
00:08:30,450 --> 00:08:32,789
That centralized server could be running Linux.

210
00:08:32,789 --> 00:08:35,070
And if you have it configured to act as an SNMP

211
00:08:35,070 --> 00:08:36,750
centralized database server,

212
00:08:36,750 --> 00:08:38,850
it'll go ahead and perform that server role

213
00:08:38,850 --> 00:08:41,340
and collect all the information from all the other devices

214
00:08:41,340 --> 00:08:42,842
and clients on the network.

215
00:08:43,679 --> 00:08:45,300
The next server we're going to talk about

216
00:08:45,300 --> 00:08:47,760
is your centralized authentication server.

217
00:08:47,760 --> 00:08:51,630
And this relies on a protocol known as LDAP, L-D-A-P,

218
00:08:51,630 --> 00:08:54,810
which stands for the Lightweight Directory Access Protocol.

219
00:08:54,810 --> 00:08:56,820
This centralized authentication server

220
00:08:56,820 --> 00:08:58,830
will contain all the user identities

221
00:08:58,830 --> 00:09:00,360
on that centralized server.

222
00:09:00,360 --> 00:09:02,670
So when somebody tries to log into a local workstation

223
00:09:02,670 --> 00:09:05,100
like a Windows, Mac, or Linux machine,

224
00:09:05,100 --> 00:09:07,440
that system is actually going to connect to this centralized

225
00:09:07,440 --> 00:09:11,100
authentication server and verify you are who you say you are

226
00:09:11,100 --> 00:09:12,930
by validating your username and password,

227
00:09:12,930 --> 00:09:15,180
and then letting you log onto the machine.

228
00:09:15,180 --> 00:09:17,820
This makes the network more secure, simpler to manage,

229
00:09:17,820 --> 00:09:20,040
and much easier for users to navigate

230
00:09:20,040 --> 00:09:22,410
because their one account can work on any workstation

231
00:09:22,410 --> 00:09:25,170
across that network instead of only the one computer

232
00:09:25,170 --> 00:09:26,940
they're assigned at their desk.

233
00:09:26,940 --> 00:09:29,520
Authentication servers are used to hold all the information

234
00:09:29,520 --> 00:09:32,370
about the user identities inside of this directory store

235
00:09:32,370 --> 00:09:33,990
known as LDAP.

236
00:09:33,990 --> 00:09:36,450
Now, when a user tries to authenticate to the system,

237
00:09:36,450 --> 00:09:38,550
their username and password are going to be hashed,

238
00:09:38,550 --> 00:09:40,350
sent over to the authentication server,

239
00:09:40,350 --> 00:09:41,550
checked against the database.

240
00:09:41,550 --> 00:09:43,560
And if they're authorized, they'll then be allowed

241
00:09:43,560 --> 00:09:46,080
to log into that local workstation.

242
00:09:46,080 --> 00:09:48,630
Next, we're going to talk about proxy servers.

243
00:09:48,630 --> 00:09:50,850
Now a proxy service resides on a system

244
00:09:50,850 --> 00:09:52,860
that has a direct connection to the internet,

245
00:09:52,860 --> 00:09:54,570
and also has another connection

246
00:09:54,570 --> 00:09:56,550
to the internal network connection.

247
00:09:56,550 --> 00:09:58,440
This way, it acts as a person in the middle

248
00:09:58,440 --> 00:09:59,430
of the connection.

249
00:09:59,430 --> 00:10:01,530
And anytime somebody wants to get out to the internet,

250
00:10:01,530 --> 00:10:03,810
they have to connect to the proxy server first,

251
00:10:03,810 --> 00:10:05,640
the proxy server takes that request,

252
00:10:05,640 --> 00:10:07,050
passes it over to the internet,

253
00:10:07,050 --> 00:10:09,030
gets the information back and then passes it

254
00:10:09,030 --> 00:10:10,530
back to that end user.

255
00:10:10,530 --> 00:10:12,420
Now, why would we want to do this?

256
00:10:12,420 --> 00:10:14,100
Well, the main reason we want to do this

257
00:10:14,100 --> 00:10:15,570
is to be able to log any requests

258
00:10:15,570 --> 00:10:16,920
that are going out of our network

259
00:10:16,920 --> 00:10:18,030
and see what our employees

260
00:10:18,030 --> 00:10:20,070
inside of our organization are doing.

261
00:10:20,070 --> 00:10:22,800
For example, in one of the organizations I used to work at,

262
00:10:22,800 --> 00:10:24,930
you were not allowed to browse pornography

263
00:10:24,930 --> 00:10:27,330
or go to gambling websites when you were at work.

264
00:10:27,330 --> 00:10:30,390
And so all of their machines went through our proxy server,

265
00:10:30,390 --> 00:10:31,560
where we could check the sites

266
00:10:31,560 --> 00:10:32,820
that they were going to first,

267
00:10:32,820 --> 00:10:33,750
and if it was one of those sites

268
00:10:33,750 --> 00:10:35,130
that they weren't allowed to go to,

269
00:10:35,130 --> 00:10:37,410
we would block that connection and send them back a message

270
00:10:37,410 --> 00:10:39,630
saying, you're not authorized to see this.

271
00:10:39,630 --> 00:10:41,220
On the other hand, you can also use it

272
00:10:41,220 --> 00:10:42,420
from the other direction.

273
00:10:42,420 --> 00:10:44,430
As data is coming in from the web,

274
00:10:44,430 --> 00:10:46,020
you can actually check that data to make sure

275
00:10:46,020 --> 00:10:48,300
it doesn't have viruses or any other bad stuff

276
00:10:48,300 --> 00:10:51,000
before passing it on into your machines on the inside.

277
00:10:51,000 --> 00:10:54,150
So it is a great thing to use from a security perspective.

278
00:10:54,150 --> 00:10:56,490
Next, we need to talk about logging servers.

279
00:10:56,490 --> 00:10:59,130
And one of the key ways that we can create a logging server

280
00:10:59,130 --> 00:11:01,410
is to use this CS log protocol.

281
00:11:01,410 --> 00:11:02,880
Now as a system administrator,

282
00:11:02,880 --> 00:11:05,010
it's really important for us to be able to understand

283
00:11:05,010 --> 00:11:07,080
what things are happening on our network.

284
00:11:07,080 --> 00:11:09,390
And we do that by looking at the logs.

285
00:11:09,390 --> 00:11:11,280
Now, instead of having to go to every single server

286
00:11:11,280 --> 00:11:13,710
or workstation and read their logs individually,

287
00:11:13,710 --> 00:11:16,710
I can set up the CS log server and have all those devices

288
00:11:16,710 --> 00:11:19,680
send their data back to my centralized logging server

289
00:11:19,680 --> 00:11:21,180
at a regular interval.

290
00:11:21,180 --> 00:11:24,090
This can be done either every minute, every second,

291
00:11:24,090 --> 00:11:25,710
or whatever interval you really want

292
00:11:25,710 --> 00:11:27,390
depending on your configuration.

293
00:11:27,390 --> 00:11:29,670
But the key here is that you could set up a Linux server

294
00:11:29,670 --> 00:11:31,347
to be this centralized log server.

295
00:11:31,347 --> 00:11:33,150
And this is one of those server roles.

296
00:11:33,150 --> 00:11:35,640
And this is known as a CS log server.

297
00:11:35,640 --> 00:11:38,580
This makes it a lot easier for us to archive all those logs,

298
00:11:38,580 --> 00:11:39,930
especially if we have to prove that we're meeting

299
00:11:39,930 --> 00:11:41,640
certain service level agreements,

300
00:11:41,640 --> 00:11:44,760
or if we're trying to troubleshoot or diagnose an issue

301
00:11:44,760 --> 00:11:46,620
or verify that performance is acting the way

302
00:11:46,620 --> 00:11:47,550
it's supposed to,

303
00:11:47,550 --> 00:11:49,170
all that can be done a lot easier

304
00:11:49,170 --> 00:11:51,600
if I have centralized logging turned on.

305
00:11:51,600 --> 00:11:53,880
So with all this centralization,

306
00:11:53,880 --> 00:11:56,610
we can have our Linux servers, our Windows machines,

307
00:11:56,610 --> 00:11:58,200
all that stuff forwarding their logs

308
00:11:58,200 --> 00:12:00,180
into the single CS log server,

309
00:12:00,180 --> 00:12:02,490
and it's going to consolidate and store all those files

310
00:12:02,490 --> 00:12:04,530
where we can then query them and look through all of them

311
00:12:04,530 --> 00:12:06,090
in one place.

312
00:12:06,090 --> 00:12:08,910
The next thing we want to talk about is monitoring services.

313
00:12:08,910 --> 00:12:10,800
Now there's lots of different monitoring services

314
00:12:10,800 --> 00:12:12,540
available inside of Linux.

315
00:12:12,540 --> 00:12:13,980
Some of these services are designed

316
00:12:13,980 --> 00:12:15,660
for specific applications.

317
00:12:15,660 --> 00:12:17,940
For example, there's monitoring services set up

318
00:12:17,940 --> 00:12:20,160
just to look at your Apache web server.

319
00:12:20,160 --> 00:12:21,510
There's other ones that are set up

320
00:12:21,510 --> 00:12:23,850
to look at the entire Linux operating system.

321
00:12:23,850 --> 00:12:25,260
Depending on what you're doing,

322
00:12:25,260 --> 00:12:27,300
you can look at different monitoring services

323
00:12:27,300 --> 00:12:29,610
and different monitoring programs to see information

324
00:12:29,610 --> 00:12:32,700
about those different servers or server roles.

325
00:12:32,700 --> 00:12:35,460
For example, if you want to look at just Apache,

326
00:12:35,460 --> 00:12:37,380
you can look at ApacheTop.

327
00:12:37,380 --> 00:12:39,840
ApacheTop is going to provide log file analysis

328
00:12:39,840 --> 00:12:41,400
for your Apache web server,

329
00:12:41,400 --> 00:12:43,080
as well as information about different connection

330
00:12:43,080 --> 00:12:45,390
response times and things like that.

331
00:12:45,390 --> 00:12:47,670
Another thing you can use is Monit.

332
00:12:47,670 --> 00:12:50,250
Monit is a simple monitoring utility for Linux

333
00:12:50,250 --> 00:12:52,320
that watches hardware usage and directory

334
00:12:52,320 --> 00:12:53,520
and file information,

335
00:12:53,520 --> 00:12:54,990
and then it monitors the system

336
00:12:54,990 --> 00:12:57,060
inside of the known GUI tool

337
00:12:57,060 --> 00:12:58,260
that allows you to gather information

338
00:12:58,260 --> 00:13:00,690
on your system resources and how they're being used

339
00:13:00,690 --> 00:13:02,490
on a given Linux server.

340
00:13:02,490 --> 00:13:04,860
Now, these two tools are not the only ones out there,

341
00:13:04,860 --> 00:13:07,020
but I just wanted to kind of introduce you to the concept

342
00:13:07,020 --> 00:13:08,580
that there's lots of different tools out there

343
00:13:08,580 --> 00:13:10,920
for monitoring your CPU and memory usage,

344
00:13:10,920 --> 00:13:13,350
as well as the connections to, and from your Linux servers,

345
00:13:13,350 --> 00:13:15,360
depending on your use case.

346
00:13:15,360 --> 00:13:17,880
Next, we're going to talk about load balancing.

347
00:13:17,880 --> 00:13:19,590
Now there's also load balancing services

348
00:13:19,590 --> 00:13:21,180
that you can set up, and this will allow you

349
00:13:21,180 --> 00:13:23,040
to distribute inbound connection requests

350
00:13:23,040 --> 00:13:24,960
across multiple servers.

351
00:13:24,960 --> 00:13:26,220
Think about it this way.

352
00:13:26,220 --> 00:13:29,940
I have over 500,000 students at the time of this recording.

353
00:13:29,940 --> 00:13:32,070
They can't all connect to one single server

354
00:13:32,070 --> 00:13:33,240
and watch this course.

355
00:13:33,240 --> 00:13:34,680
It would crash the server.

356
00:13:34,680 --> 00:13:37,140
So instead, we have multiple servers set up.

357
00:13:37,140 --> 00:13:39,060
And when you go to diontraining.com,

358
00:13:39,060 --> 00:13:42,097
it distributes that load across all of my servers

359
00:13:42,097 --> 00:13:44,430
to be able to give you the best experience we can.

360
00:13:44,430 --> 00:13:46,920
This is the idea of how load balancing works.

361
00:13:46,920 --> 00:13:48,660
It's really common to use load balancing

362
00:13:48,660 --> 00:13:49,950
to distribute this connection

363
00:13:49,950 --> 00:13:51,600
among lots of different web servers

364
00:13:51,600 --> 00:13:54,060
or lots of different databases to ensure

365
00:13:54,060 --> 00:13:55,620
that you can then get a better performance

366
00:13:55,620 --> 00:13:57,270
for your end users.

367
00:13:57,270 --> 00:13:58,410
If you're running a web server,

368
00:13:58,410 --> 00:14:00,690
you don't want one single server being up

369
00:14:00,690 --> 00:14:02,100
to run all of your traffic,

370
00:14:02,100 --> 00:14:03,960
because that becomes a single point of failure.

371
00:14:03,960 --> 00:14:06,780
And if that server goes down or becomes overwhelmed,

372
00:14:06,780 --> 00:14:08,340
it means nobody in the world is going to be able

373
00:14:08,340 --> 00:14:09,600
to access your content.

374
00:14:09,600 --> 00:14:11,850
So you want to instead use load balancing

375
00:14:11,850 --> 00:14:14,580
and multiple web servers to alleviate this congestion

376
00:14:14,580 --> 00:14:17,760
and spread out the load across multiple devices.

377
00:14:17,760 --> 00:14:19,260
Now on your internal network,

378
00:14:19,260 --> 00:14:20,790
there's also lots of different things

379
00:14:20,790 --> 00:14:22,320
that we're going to find as well.

380
00:14:22,320 --> 00:14:25,080
For example, you're going to have things like database servers

381
00:14:25,080 --> 00:14:26,880
and storage area networks.

382
00:14:26,880 --> 00:14:28,440
These are also things that you're going to have

383
00:14:28,440 --> 00:14:29,730
inside your internal network.

384
00:14:29,730 --> 00:14:32,550
And a lot of these are running Linux as well.

385
00:14:32,550 --> 00:14:36,210
Each server inside of this cluster gets called a node.

386
00:14:36,210 --> 00:14:37,770
And if a single node goes down,

387
00:14:37,770 --> 00:14:40,140
the cluster can still remain up because you have multiple

388
00:14:40,140 --> 00:14:42,960
database servers or multiple storage area devices

389
00:14:42,960 --> 00:14:45,450
inside of this clustered array.

390
00:14:45,450 --> 00:14:47,520
This means that we can have better maintainability

391
00:14:47,520 --> 00:14:51,180
and availability of these devices inside of this cluster.

392
00:14:51,180 --> 00:14:53,850
Another thing you're often going to use inside of your network

393
00:14:53,850 --> 00:14:55,830
is file and print servers.

394
00:14:55,830 --> 00:14:58,290
Now file and print servers are going to allow you

395
00:14:58,290 --> 00:15:00,060
to do two basic things;

396
00:15:00,060 --> 00:15:02,010
file storage and printing documents

397
00:15:02,010 --> 00:15:03,630
to a centralized printer.

398
00:15:03,630 --> 00:15:05,640
Centralized printing is really popular,

399
00:15:05,640 --> 00:15:07,410
especially in large organizations

400
00:15:07,410 --> 00:15:09,390
because printers are really expensive.

401
00:15:09,390 --> 00:15:11,940
And if everybody has an individual printer on their desk,

402
00:15:11,940 --> 00:15:14,760
that is a very large capital expense that we have to have

403
00:15:14,760 --> 00:15:16,350
as well as a lot of maintenance.

404
00:15:16,350 --> 00:15:19,170
So instead, we might have one really large

405
00:15:19,170 --> 00:15:21,780
multifunction printer sitting on each floor

406
00:15:21,780 --> 00:15:22,860
of our office building,

407
00:15:22,860 --> 00:15:24,660
and we might have 50 or a hundred people

408
00:15:24,660 --> 00:15:26,280
using that one printer.

409
00:15:26,280 --> 00:15:28,890
This allows us to use a bigger, more expensive printer,

410
00:15:28,890 --> 00:15:30,330
but that more expensive printer

411
00:15:30,330 --> 00:15:31,800
can handle a lot more print volume,

412
00:15:31,800 --> 00:15:33,600
it doesn't break down nearly as often,

413
00:15:33,600 --> 00:15:35,400
and it's a lot easier to support.

414
00:15:35,400 --> 00:15:37,500
To do this though, you have to have a print server.

415
00:15:37,500 --> 00:15:39,270
And so when I print from my workstation,

416
00:15:39,270 --> 00:15:41,880
it goes to the print server, which could be running Linux.

417
00:15:41,880 --> 00:15:43,740
And then that goes over to the printer directly

418
00:15:43,740 --> 00:15:44,880
to print it out.

419
00:15:44,880 --> 00:15:47,670
This helps get your print costs down and also make sure

420
00:15:47,670 --> 00:15:49,440
that we have a more efficient print experience

421
00:15:49,440 --> 00:15:51,000
for all of our users.

422
00:15:51,000 --> 00:15:52,110
Now, on the other side,

423
00:15:52,110 --> 00:15:54,450
we also have to have file storage capability.

424
00:15:54,450 --> 00:15:56,880
And we do this using file servers.

425
00:15:56,880 --> 00:15:58,007
There's two main types of file servers

426
00:15:58,007 --> 00:16:00,600
you're going to come across inside of Linux.

427
00:16:00,600 --> 00:16:03,930
One is known as Samba and the other is called NFS.

428
00:16:03,930 --> 00:16:07,500
Now Samba is a Windows compatible file sharing system

429
00:16:07,500 --> 00:16:10,800
that runs on SMB or Server Message Block.

430
00:16:10,800 --> 00:16:13,260
If you have a Linux and Windows integrated system

431
00:16:13,260 --> 00:16:15,090
for all of your servers and endpoints,

432
00:16:15,090 --> 00:16:16,770
you're going to want to be using Samba

433
00:16:16,770 --> 00:16:18,090
to ensure that all of your devices

434
00:16:18,090 --> 00:16:20,010
can access your file share.

435
00:16:20,010 --> 00:16:22,200
Now, when it comes to Samba, there's two parts of it

436
00:16:22,200 --> 00:16:23,280
you have to think about.

437
00:16:23,280 --> 00:16:25,980
There's the server side, and there's the file side.

438
00:16:25,980 --> 00:16:28,410
If you're running a file server on a Linux server

439
00:16:28,410 --> 00:16:29,790
and you have Windows clients,

440
00:16:29,790 --> 00:16:31,800
you need to run Samba on that server

441
00:16:31,800 --> 00:16:33,900
to be able to communicate with those windows clients.

442
00:16:33,900 --> 00:16:36,120
But similarly, if you're using a Linux system

443
00:16:36,120 --> 00:16:37,590
as your desktop machine,

444
00:16:37,590 --> 00:16:39,840
and you're trying to connect to a Windows file server,

445
00:16:39,840 --> 00:16:41,730
you need to run the Samba client

446
00:16:41,730 --> 00:16:44,040
so you can read into that Windows environment

447
00:16:44,040 --> 00:16:45,630
and be able to access the files that are stored

448
00:16:45,630 --> 00:16:47,430
on that Windows server.

449
00:16:47,430 --> 00:16:50,010
Now, if your enterprise network is made up of only Unix

450
00:16:50,010 --> 00:16:53,940
and Linux workstations and servers, you can instead use NFS,

451
00:16:53,940 --> 00:16:56,130
which is Network File Sharing.

452
00:16:56,130 --> 00:16:58,890
NFS is a native Unix and Linux protocol

453
00:16:58,890 --> 00:17:01,410
that's used by workstations to access directories

454
00:17:01,410 --> 00:17:03,900
that are stored on Unix or Linux servers.

455
00:17:03,900 --> 00:17:05,550
Again, either way you do it,

456
00:17:05,550 --> 00:17:07,500
the idea here is to have a centralized place

457
00:17:07,500 --> 00:17:10,650
for files to be on a single server or a cluster of servers.

458
00:17:10,650 --> 00:17:13,020
And this makes the physical security and backups

459
00:17:13,020 --> 00:17:16,170
of those machines a lot easier to maintain.

460
00:17:16,170 --> 00:17:17,940
When you're configuring NFS,

461
00:17:17,940 --> 00:17:22,440
you're going to do this inside of the /etsy, /exports file.

462
00:17:22,440 --> 00:17:24,150
The next type of server we're going to talk about

463
00:17:24,150 --> 00:17:25,710
is database servers.

464
00:17:25,710 --> 00:17:28,020
Now databases can be internal or external,

465
00:17:28,020 --> 00:17:29,700
but in this case, we're going to talk specifically

466
00:17:29,700 --> 00:17:31,740
about internal databases.

467
00:17:31,740 --> 00:17:33,420
Now databases are going to be used to store

468
00:17:33,420 --> 00:17:34,950
large quantities of data,

469
00:17:34,950 --> 00:17:37,260
and this makes it easier for you to query the database

470
00:17:37,260 --> 00:17:38,970
and get the information out that you need

471
00:17:38,970 --> 00:17:40,470
by searching through it.

472
00:17:40,470 --> 00:17:42,390
There are two basic types of databases

473
00:17:42,390 --> 00:17:43,290
that you're going to encounter

474
00:17:43,290 --> 00:17:45,090
inside of your Linux environments.

475
00:17:45,090 --> 00:17:49,110
We have SQL databases and NoSQL databases.

476
00:17:49,110 --> 00:17:52,530
SQL databases are what we call structured databases.

477
00:17:52,530 --> 00:17:54,630
To communicate with an SQL database

478
00:17:54,630 --> 00:17:55,890
and be able to read from it,

479
00:17:55,890 --> 00:17:58,230
you're going to use the Structured Query Language,

480
00:17:58,230 --> 00:18:00,240
which is known as SQL.

481
00:18:00,240 --> 00:18:02,100
When you're using an SQL database,

482
00:18:02,100 --> 00:18:03,750
it's going to store all of its information

483
00:18:03,750 --> 00:18:06,510
inside of different tables that are related to each other.

484
00:18:06,510 --> 00:18:09,000
So we call these relational databases.

485
00:18:09,000 --> 00:18:10,380
Inside each of these tables,

486
00:18:10,380 --> 00:18:13,230
the data's going to be stored inside tables and columns,

487
00:18:13,230 --> 00:18:15,180
and it will be able to read and write information

488
00:18:15,180 --> 00:18:18,120
using SQL to and from these databases.

489
00:18:18,120 --> 00:18:19,620
Now, the second type of databases

490
00:18:19,620 --> 00:18:21,750
are known as NoSQL databases,

491
00:18:21,750 --> 00:18:24,150
and these are non relational databases.

492
00:18:24,150 --> 00:18:25,200
In these databases,

493
00:18:25,200 --> 00:18:27,330
there is no centralized, organized way

494
00:18:27,330 --> 00:18:29,220
of storing the data in them.

495
00:18:29,220 --> 00:18:31,033
Now you may be wondering, why would you want to use

496
00:18:31,033 --> 00:18:32,430
a NoSQL database?

497
00:18:32,430 --> 00:18:34,560
It seems like it's not a great idea.

498
00:18:34,560 --> 00:18:37,230
Well, NoSQL databases have a big place

499
00:18:37,230 --> 00:18:39,030
in machine learning and AI,

500
00:18:39,030 --> 00:18:41,580
and they're very, very popular in high velocity

501
00:18:41,580 --> 00:18:43,410
and high capacity systems.

502
00:18:43,410 --> 00:18:44,430
So you will run into them

503
00:18:44,430 --> 00:18:46,860
if you're working at a very large organization,

504
00:18:46,860 --> 00:18:50,250
dealing with big data sets in that big data world.

505
00:18:50,250 --> 00:18:52,800
Next, we're going to talk about VPN servers.

506
00:18:52,800 --> 00:18:55,500
Now VPNs are Virtual Private Networks.

507
00:18:55,500 --> 00:18:57,090
And if you're running a VPN server,

508
00:18:57,090 --> 00:18:58,410
this will allow remote users

509
00:18:58,410 --> 00:19:00,570
to connect to this internal company network

510
00:19:00,570 --> 00:19:02,820
and access all of your internal resources

511
00:19:02,820 --> 00:19:05,220
as if they' physically sitting at their desk

512
00:19:05,220 --> 00:19:07,140
of where that network location was.

513
00:19:07,140 --> 00:19:09,300
This is really useful when you're working from home

514
00:19:09,300 --> 00:19:10,770
or working from the road.

515
00:19:10,770 --> 00:19:13,410
For example, right now I'm actually sitting

516
00:19:13,410 --> 00:19:14,670
not in my office.

517
00:19:14,670 --> 00:19:16,770
And instead I'm connected back to my office

518
00:19:16,770 --> 00:19:19,650
over a VPN connection so I can access my email

519
00:19:19,650 --> 00:19:21,690
and other things like that, that I need.

520
00:19:21,690 --> 00:19:24,120
VPN services are really important

521
00:19:24,120 --> 00:19:25,770
because it allows you to have this trusted,

522
00:19:25,770 --> 00:19:27,840
secure tunnel from where you are,

523
00:19:27,840 --> 00:19:29,340
right now I'm in my home office,

524
00:19:29,340 --> 00:19:30,810
back to your corporate office

525
00:19:30,810 --> 00:19:32,910
and into your corporate environment.

526
00:19:32,910 --> 00:19:34,830
The final type of server we're going to talk about

527
00:19:34,830 --> 00:19:38,100
that you can host on your Linux machine is email servers.

528
00:19:38,100 --> 00:19:40,140
Now email services are a key component

529
00:19:40,140 --> 00:19:42,330
of business communications these days.

530
00:19:42,330 --> 00:19:45,000
Email servers are really responsible for the distribution

531
00:19:45,000 --> 00:19:47,250
of electronic mail within the organization

532
00:19:47,250 --> 00:19:49,950
or between organizations over the internet.

533
00:19:49,950 --> 00:19:51,420
There's really two parts to email;

534
00:19:51,420 --> 00:19:53,310
there's sending and there's receiving.

535
00:19:53,310 --> 00:19:55,080
And if you have a Linux server and you want to be able

536
00:19:55,080 --> 00:19:58,290
to have a sending server, you would set up Sendmail.

537
00:19:58,290 --> 00:20:00,120
If you want to be able to receive email,

538
00:20:00,120 --> 00:20:02,430
you would use something like Postfix.

539
00:20:02,430 --> 00:20:04,530
Now, each of these are going to use different email protocols

540
00:20:04,530 --> 00:20:06,720
that are common to all operating systems.

541
00:20:06,720 --> 00:20:09,720
If you're sending email, you do this using SMTP,

542
00:20:09,720 --> 00:20:11,970
which is the Simple Mail Transfer Protocol.

543
00:20:11,970 --> 00:20:13,350
If you're receiving email,

544
00:20:13,350 --> 00:20:16,980
you're going to do this using Post Office Protocol, or POP3,

545
00:20:16,980 --> 00:20:19,890
or you might use Internet Message Access Protocol,

546
00:20:19,890 --> 00:20:21,660
which is known as IMAP.

547
00:20:21,660 --> 00:20:24,180
All right, I know we covered a ton of information

548
00:20:24,180 --> 00:20:26,940
in this lesson, but really the key you need to know here

549
00:20:26,940 --> 00:20:30,330
is all a review from your A+ and Network+ studies.

550
00:20:30,330 --> 00:20:31,980
You need to understand that there are different types

551
00:20:31,980 --> 00:20:34,800
of servers you can run on a Linux machine.

552
00:20:34,800 --> 00:20:36,840
All these different services and all the different ports

553
00:20:36,840 --> 00:20:39,690
and protocols you learn back in A+ and Network+,

554
00:20:39,690 --> 00:20:41,340
they're all coming back right here

555
00:20:41,340 --> 00:20:43,050
as we start talking about how you can install

556
00:20:43,050 --> 00:20:45,360
these different servers and software packages

557
00:20:45,360 --> 00:20:47,943
to run these services on a Linux server.

