Modern APIs with FastAPI and Python Transcripts
Chapter: Deploying FastAPI on Linux with gunicorn and nginx
Lecture: Connecting to and patching our server
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
And we're going to say "ssh route at that address". Obviously, you would probably put some kind of domain name there,
0:07
but first time it will say you have never been here, are you sure you want to exchange your ssh keys with them? Yes. And just like that,
0:14
we're in. So the very first time you see, like, this warning and whatnot and it says, "you know you really should do apt update and then apt upgrade".
0:23
This is check for updates, apt update, and then apt upgrade is apply those updates. And if you've ever put anything on the Internet,
0:32
you want to know, you know that you need to patch it right away. Like here, if we log out and then log back in, notice
0:40
it has 18 security problems. That's not good. So let's go and just upgrade it right now.
0:48
Oh, and I believe it's like checking for its own updates the first time it came to life, so let's see how long this takes. Here we go.
0:58
It was still doing like some background stuff with the upgrade system. Alright, so it should be up to date or ready to update and whenever you
1:05
see these Linux headers, that means there's a new kernel upgrade as well.
1:13
Okay, that took a moment because there's an insane number of updates to apply, but no big deal. Now, if we log out and just log back in,
1:21
you'll see that a system restart is required. It's not always the case when you apply updates that that's true,
1:26
but when you do a kernel upgrade or major things, it is. So we'll just type "reboot", wait about 5 to 10 seconds,
1:33
and our machine should be completely up and running and ready for us to configure as
1:38
our Web server. Perfect. So here we have our Web server up and running. It's not a Web server yet, it's gonna be made into one.
1:45
But we have our Linux server running on the Internet safely because we've applied the patches.
1:50
We still need to do things like set up firewall rules and other types of stuff to make it more safe.
1:56
But it's a good thing to have here running that we can start working with and configuring, and we'll do that throughout this chapter.