Installing packages using the yum command
Most applications or packages are available through the CentOS directory. For us to send files from our mac to our server we need to add a package we just don't have by default on our server. In this session we will see how we add a new package into our server using the yum command.
Video Transcript
00:00In the process of this video, this lesson, we're going to learn about how to install, uninstall,
00:06how to check for if you have an application installed.
00:10Now, throughout the next few lessons, we're going to see how we're going to need to install different applications.
00:15But at that stage, we're not going to talk about how to install works because we're going to do it right now.
00:21Now, in a few videos, we're going to want to secure our server even more.
00:26And to do that, we want to have the capability of sending files directly from our local computer onto our server.
00:34To do that, we need an application package, which is called open SSH client.
00:39Now, we want to check first to see if our server comes with it or not.
00:44It really just depends on who your package and your installation, if it has it or not.
00:49Now, the way we're going to check that is we're going to type sudo again because we want to always do one of the global commands.
00:55We want to use the sudo, which is the root user, really.
00:58We're talking as the root user, and we're approaching our yum command.
01:03And again, we're going to want to list the installed item, list the installed items.
01:09And then we'll put a space and type in some of the name or all of the name.
01:13So, for example, let's type your open, and we'll get all the different installations that have the word open in them.
01:20And we'll see that there is no match for open in our application.
01:24But if we do open and then a star and run it again, we'll see that now we have a few different open options.
01:30We have your open SSH server.
01:32We have open SSH.
01:34We have open SSL.
01:36And if you remember, hardbleed had something to do with open SSL, which was a security feature issue.
01:42All right.
01:43So, the next stage, once we know that we don't have open SSL clients, we do have open SSL server, but not open SSL clients.
01:51We want to add the open SSL clients onto our system also to enable our client to send files onto the system.
01:58So, the way we would do that is basically, again, we're going to approach our sudo yum.
02:03And instead of listing, we're going to call the command install.
02:07And this time around, we're going to tell it exactly what we want to install.
02:10Open SSH, clients.
02:13Now, if you're asking yourself, how do you know what name to put in?
02:17This really is something that you want to know in advance what application you want to install.
02:21And most of the time, you're going to Google it up and find it or just do a search to find options.
02:28So, if I wanted to list instead of installed, I could have, let's do that instead of just starting installing, yum, we could ask to list.
02:37And instead of installed, we could just right here open SSH.
02:42And let's put here a star, anything that starts with open SSH.
02:46And what will happen is going to search through the server and come back with the different results of the different options that are available.
02:52And you'll see that we have here the open SSH clients.
02:55But usually, you'll probably know in advance what is the application that you want to install.
03:00All right, so, sudo yum.
03:02And let me just clean our screen here because it's getting a little bit messy.
03:06So, again, sudo yum.
03:09And we want to install, what do we want to install?
03:12We want to install open SSH clients.
03:15Once we do that, it's going to end again.
03:18And we'll see, first of all, I had a typo.
03:20And because I had a typo, it's telling me it can't find that package at all.
03:23So, let's fix that.
03:25So, first of all, it was open SSH, clients.
03:31It's not a client, but it's a plural client.
03:33And I'm going to click that again.
03:35And now it's going to search through it.
03:37And it's going to find the different, it's going to find the package itself.
03:40And it's basically telling me that, do I agree?
03:43Because it's going to install two applications, SSH clients, and also libedit.
03:49And if I'm okay with these two options, all that's left for me to do is click on yes
03:54if I'm happy with the download size and I'm happy with the install size.
03:58And I'm fine with both because I'm going to need the open SSH clients
04:04to be able to upload files onto my server.
04:07So, I'm going to click on yes there, and we're going to install it right away.
04:10And you'll see the process that's going on.
04:12It's basically first downloading the files, and then it updates them and installs them.
04:17Now, if we have any regrets and we want to delete an application,
04:22the process of removing an application is incredibly easy and similar.
04:27All we have to do is, again, type yum.
04:31But again, we're going to start with sudo yum.
04:34And this time around, we'll click on remove and type whatever we want to remove.
04:40So, for example, open SSH clients is what we want to remove.
04:44If I click on enter, it's going to go through.
04:47And again, ask me, do I want to remove that specific application?
04:50And notice how it's not trying to delete the dependencies as well.
04:55And I'm going to click on no because I actually need this application.
04:58I don't want to delete it. It's something that I'm actually going to use.
05:03So that was the process of installing and uninstalling an application
05:06and how you could see what applications are installed on your system.
05:11There are a few other commands with yum, which I don't feel are as critical for you right now to see.
05:17So we, oh, and for example, let's talk about one more thing.
05:22If you know the specific command that you want to use, but you don't know in what package it exists,
05:28you could actually search for it to see in what package could you find that command
05:32and then it might be in a few packages.
05:34The way you would do that is you would type sudo then yum.
05:40And this time around, you're going to search for provides.
05:44And provides basically says that it has this command inside of this package.
05:49And I'm going to say the command that we're looking for is secure copy.
05:54And that's the command that we want to get.
05:56It's going to give us an error now.
05:58So we're going to see the error.
05:59It's basically tells it from version three and up of yum.
06:02The way that we would make the searches is we want to add a star before or after.
06:08In our case, because it's a file structure, we know the file name is SCP.
06:12So we're just going to put a star before it.
06:14And if we do another search that way, we'll see that this time around, it is going to come back.
06:19It's going to search through the databases to try to find what application has it.
06:24And you can see that in our case, we already installed it.
06:27And it's actually located in open SSH clients, which is installed already for us.
06:32And the file name is SCP, which is inside of our user bin folder.
06:37And it gives us all the different information that we need to know about it.
06:41And that's it. That's all the information that we needed.
06:44And if at some point you have a specific command and you can't find it,
06:48you could always also search for that command to see if there's a library, a package that includes it.
06:53For example, there might be a library that's really big and bloated, but you just need that command.
06:58And there's another library that also provides it that's a smaller one.
07:01But really, in general, you would probably first start with a search online to see what is the best option.
07:06And then you would install the application.
07:09So that's all I had to talk about installations.
07:11And also make sure that you have open SSH clients installed,
07:15because in the next video, we're going to actually start securing our server even further.
07:21And we're going to need this command installed on our system to get it running.
07:26So we'll see you in the next video where we start securing our server with a public and private key.
