Placeholder Image

Subtitles section Play video

  • please go to the line the computer guy dot com, in order to view schematics, code and Maur for the projects that you are learning about.

  • Welcome back.

  • So today's video I'm going to show you how to install applications from repositories on a bun to server using the command line.

  • So one of the nice things about the Lenox world is sense.

  • Lennox World has been open source and Maura or less free for a long, long time.

  • They were able to create a way to insult applications on do server operating systems.

  • That was a hell of a lot easier than the Windows or the Mac world, right?

  • So what do you go to the Windows world?

  • You know, way, way back three years ago, maybe four years ago, if you wanted to install a piece of software onto Windows Server, you would have to have the installation media.

  • So whether it's a CD, a DVD, us be something like that, and you would have to have a license possible a couple of other pieces of information in order to be able to install that software onto your server.

  • The reason being is because the people that created that software wanted to make sure that they paid.

  • So they force you to jump through all these hoops.

  • Well, the thing is, in the Lenox world says things were open source and more or less free.

  • They didn't have Thio enforce you to jump through these stupid hoops.

  • And so they came up with a system that made it very easy to install most of the software that you're gonna be installing onto your about to server so essentially what you're able to you do as you're able to use a command called apt hyphen get and the U Bahn to world the debian world.

  • And what that does is able to go out to repositories on the Internet and simply be able to download software applications from the Internet onto your server and install them easy as pie.

  • No problems.

  • You don't need a licensing keys.

  • You don't need to jump through any hoops because again, for the most part in the Lenox world, those aren't required.

  • So what you're able to dio is if you're going to be in selling Apache PHP my sequel Maria D B 90 I don't know.

  • Let's say 95% of the software that you're gonna be installing onto a Lennox server within your career.

  • You're able to use this app, hyphen, Get command.

  • It's able to go out to the Internet.

  • Poll down all files, be able to install it.

  • Easy peasy.

  • No big deal.

  • Now to be clear.

  • Remember when we talked about the Lenox world and we talk about whether or not Lennox is open source and is free?

  • Remember, You know, you don't want to make a blanket statement is not a good idea to make blanket statements about anything.

  • So there is proprietary software Lennox world.

  • There is no open source software in the Lenox world, and there is software you have to pay for the Lenox world.

  • So if you have to install a piece of software where you have to have some kind of insulation, media and license keys and all of that, if you're going to try to install that, all you do is you look for the documentation for that type of software and basically just run through the steps and they tell you to go through.

  • So I'm not going to show you how to install software from a non repositories away simply because you're probably actually not going to run into that very often.

  • And if you do, they'll have the instructions.

  • So the standard way that you're going to be installing software, issue this appetite at hyphen, get command.

  • It is important, Understand?

  • We talk about distributions and fork, Silly Lennox world.

  • This is another thing to remember.

  • With Forks is in the debian world.

  • You're gonna be using APP, hyphen, gift install to be approved.

  • Install software from these repositories.

  • If you're in the red hat world, you'll be using a command called the Yum.

  • So again, this is one of those things where I talk about where I'm not gonna tell you what distribution you should use.

  • I'm not going to say what the best distribution is, but this is one of those problems that you run into where you run into environments where you have multiple different distributions of Lennox.

  • Running for no good reason is when you sit down to troubleshoot or do some kind of maintenance on one of these servers, if you have a scent O s and that requires young and that requires specific commands and then you have a bunch of server that uses app hyphen get and it uses certain commands.

  • And then you're using something else.

  • This is one of the reasons why I could be a real pain in the butt for the different distributions of the different forks is because if you have multiple versions of Lennox running within your environment, you sit down to a server.

  • You think you're just gonna do something very simple as faras maintenance is concerned.

  • And then again, you have to go do a Google search figure out.

  • Oh, I'm used to using U Bahn to, and this is sent.

  • Oh, what am I gonna do here s O.

  • That is just something to keep in mind.

  • What I'm talking about today is for the U Bahn to or the Debian world.

  • If you're in Santo s red hat fedora, they use something called young and we're not gonna be dealing with that today.

  • So we're dealing with the hyphen.

  • Get command.

  • The first thing that we need to realize is that we are going to need escalated privileges in order to run this right.

  • So to be able to install or uninstall software from the server, it makes sense that you should be a root level user.

  • So the first thing that we're gonna do is we're gonna use this suit command.

  • So Sue Dio, then we use ap hyphen get so that is the command.

  • Then the first thing that we're going to do is we're going to use the update arguments.

  • What the update does is you have a library basically installed on your bun to server with the information from the repositories.

  • So the different applications that are available where their locations are all of that type of stuff basically text type file, as all the update command does, It simply updates that that library, So think of it as a library.

  • Basically, all the information where different packages are are are stored.

  • That type of thing, that's the first thing you want to do is you wanna update.

  • Why this is important is there may be a new version of the software.

  • They're goingto download install.

  • So let's say Patrick, too.

  • We're in connect something like that.

  • They may have come out with a new version.

  • Since you originally stood up, you're about to server.

  • So by doing the update command, you could just make sure that you're getting the latest version of whatever it is you're going to install past that, then you're simply going to do the install command.

  • So what you do is you do pseudo space at hyphen, get space install, and then whatever it is that you're installing now again, this is the Lenox world.

  • You've got to know what it is you're installing.

  • So if it's a pack, you too, miss my sequel.

  • Whatever else.

  • Basically, what's gonna happen with the app hyphen get install is it's going to take that package, your it's going to take what you're asking for.

  • It's going to go up.

  • It's going to find that that is going to try to install.

  • And so, since this is the command line, right, if you type in the right package, you will get the right package.

  • If you type in the wrong package, you will get the wrong package.

  • And if you type in something it doesn't understand, then you won't get anything at all.

  • So it is very important to be thinking about this when you start installing software onto your server is make sure you know the name of the package that you're going for.

  • So today we're gonna be going for something called Apache, too.

  • So that's the the latest version of the Apache Web server.

  • So again, one of those things.

  • If you don't know what package you're going for, just do a Google search of, you know in the stall, a pantry onto U Bahn to server, and then you'll you'll see a documentation on what you'll be looking for.

  • So just keep that in mind, as you do need to know what package is going to try to be installed once you've been started.

  • Basically, you do the install it goes through.

  • Uh, it'll ask you, Do you really want to do this?

  • You click.

  • Yes, you click.

  • No, you click.

  • Yes, it'll run low insulation process so it'll download the South where it'll install the software.

  • It's seamless, and it's easy.

  • No big deal now, depending on what software you're installing, there may be props for things like creating user names and passwords again.

  • That simply depends on West software.

  • Your stolen past, that the next argument that we're gonna look at is a pseudo space hyphen.

  • Get then upgrade.

  • So what upgrade allows you to do?

  • Is it allows you to upgrade the packages that are already installed on your Lennox system.

  • So if you have a passion, installed my sequel.

  • So all these different packages installed, and you want to make sure they're updated their upgraded to the latest version.

  • You would use the upgrade command, so that will simply upgrade the packages that your honor system.

  • That's pretty simple.

  • Then finally, we're gonna look at removing or uninstalling the software that you've been stolen onto you about to server.

  • The first.

  • The first argument you can use is removed so pseudo space at hyphen get space, remove and then whatever packages that it would be a pass you to.

  • The interesting thing with the remove command is basically what it does is it removes all the functionality of whatever the software is, but it leaves the configuration files.

  • So, like with Apache to V hosts, if you have a bunch of configuration files and you want to leave them for some reason you would use a remove command.

  • You completely remove the ability for Apache to to function.

  • You remove the software, but you leave those configuration files so that could be valuable.

  • Think about if you stand up, eh?

  • Database server.

  • And let's say that database server is normally going to be going to be the database for a different Web server.

  • So you have a Web server over here is doing his thing, and he's be a push and pull data to a database.

  • Well, let's say when you're standing up that database server, you decide to turn it into a full fledged layup server for migration taxed right.

  • You gotta go through these migration tasks.

  • You have scripts to run all that kind of stuff.

  • You say I'm gonna make us a full fledged lamp server.

  • I once saw Apache my sequel, PHP.

  • All of that on there basically get all the data working, functioning, doing everything I'm supposed to dio.

  • And then once I'm done, I didn't want to remove a pantry because remember every piece of functionality on the server.

  • Patrick PHP, my sequel.

  • Whatever else.

  • Not only is it a piece of functionality for your infrastructure, but it's also a vulnerability.

  • The hackers, right?

  • So if you don't need functionality, get the hell rid of it, Right.

  • So if you have Apache on a server, but you're not actually using it As a Web server, you want to remove that so that hackers can't get in there and possibly compromise your database server by compromising the Apache server.

  • So that's what a lot of people do right are.

  • A lot of hackers do is, let's say you install FTP onto your Web server or your database server lets you in stall passion on your database server.

  • And so what the hacker wants to do is the hacker wants to compromise your database server, but your database components pretty secure.

  • They can't get into the database side, so what they might try to do is they might try to hack in through the F T P service that's open or through the Apache Web server.

  • What they could dio is they get in through the Apache Web server once they're able to get in that way, then they can go and connect that that attack the database server.

  • So any service is not the news on your Lennox server.

  • You basically want to get rid of, but let's say you're sitting there thinking, Well, you know, I want to get rid of it.

  • I don't want the vulnerability to be there But you know I may need I may need to use Apache on the server in the future again for migrations or maintenance or something like that.

  • So I want to leave the configuration files.

  • So what you do is you use the removed so pseudo space act hyphen get space, remove a pack.

  • You too.

  • That will believe.

  • But the Apaches software, but really the configuration files.

  • So if you re install a patch you to future all those configuration files, they're there, and then you can just keep moving.

  • Right?

  • So that's something to think about.

  • The final command is purged.

  • Final arguments, purpose of pseudo space app, hyphen.

  • Get space, purge a pack, you two or whatever the name is.

  • What that does is that deletes the application and all the configuration files too.

  • So that's basically like, Nope.

  • I don't want this on my server anymore.

  • Get the hell read of it.

  • And if you use the perch command, it will get rid of the software and the configuration files.