Update Packages to be more secure
Yum isn't only about installing applications but its about keeping the ones you have the most up to date. That is part of your security needs as some times applications have vulnerabilities and if you don't keep your site up to date you might end up with an attack on your server. In this session we will see how to keep our server up to date.
Video Transcript
00:00Alright, so let me show you an example of how do you make an update to a specific application.
00:05In my case, I have an application that's called postfix and I want to update it.
00:10To do that, I'm going to type sudo because I always want to approach anything to do with
00:13installations as the root itself, and I'm going to ask for yum update and type in the
00:19name of the application I want to update.
00:23Once I do that, it's going to search through to see if there is an update and it's definitely
00:26telling me I have an update and it's only one application that needs to be installed and
00:32I'm going to click on yes and install it.
00:34Once I do that, it's going to go through the steps involved of upgrading that application
00:38and installing it.
00:40So far, so good.
00:42Now what happens if you make an update and suddenly something breaks?
00:45So you update the application but something broke.
00:48The next step that you can do is now downgrade that application that you just installed to
00:53fix whatever problems you have before you make that update.
00:56To do that, all you have to do is instead of that, I'm going to type sudo, let me just
01:00clear so we're on the top again, and I'm going to type sudo yum downgrade and type the name
01:11of the package which was postfix and once I do that, it's going to tell me it's going
01:15to downgrade the package.
01:17It's only one repository and we're going to click on yes.
01:21Now if the application has dependencies, which means another application is dependent on it
01:27and you probably would want to delete not only that application, also the other application
01:31at the same time and you would do that using a comma separation and just comma down and
01:36list the next thing, the next application you want to get rid of also at the same time.
01:41So with that said, it's time for us to upgrade everything because we have a completely new
01:45system.
01:46We don't have anything installed.
01:48We don't have any risks really because we don't have anything on our server yet.
01:52So I'm going to go ahead and click on the yum sudo yum and update.
02:00Now we'll see when I click on the sudo yum update again, it's going to go through the
02:03process.
02:04It's going to tell me there are 38 upgrades and there's one new install.
02:08If we scroll through our list, we'll see that the new install is the kernel and that's
02:12fine.
02:13We're going to put a new kernel which we don't have.
02:16It's 28 megabytes and we want it.
02:18It's probably important.
02:19All right, something here is dependent on it and that's fine.
02:23So all that's left for me to do is say yes, click on yes, and it's going to start now
02:27installing all the different applications one after each other.
02:30And all that's left for me to do is to test out and see that everything is still working.
02:34Now as when you have an actual live site running in an actual live environment, obviously,
02:40well very obviously you'd want to make backups to the complete host at once a day, maybe
02:45once a week, make another one and make sure that you have a duplicate somewhere that's
02:48not on your server.
02:50That way you could go back and fetch that file and make sure that everything is still
02:53fine with it.
02:54So we're going to look at that in a future video, but for now we're going to assume
02:58that you have daily backups and in case that something breaks down, then we'll just have
03:02to undo it.
03:03All right, so that's it for us and we're going to let the applications complete installing.
03:08You don't have to watch it completing all that installation and we will see you in
03:12our next topic.
