Placeholder Image

字幕表 動画を再生する

  • 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.

  • And so that's one of those things to be thinking about again.

  • When you're doing system administration, you simply want to remove the application, leave the configuration files or do you want it to all be gone so that let's go over to the computer so I can show you how this works?

  • So here we are, my computer.

  • You can notice up here, though, if you look at the title, If you look in the name of the virtual machine that I have running, it is a bun to server clone.

  • And so this is something to be thinking about.

  • Like now that you're starting to go in and modify configuration files, actually install software uninstall software.

  • One thing to think about is keeping a clean machine and then essentially creating copies of the clean machine to play with.

  • Right?

  • So I haven't absolutely clean installation of Monte server.

  • So this is the monthly server is just playing in a gain installation.

  • The only thing it has on it is a user account for Bob.

  • 123456 and nothing else.

  • And so this is nice.

  • So let's say I'm sitting here on a plane with this clone.

  • I'm doing some modifications I'm doing doing some changes.

  • Maybe I crashed something.

  • Maybe I do something stupid and I want to be able to just start from square one.

  • What I could do is I can create a clone of the soup onto Server said.

  • If I right click or long click on the Mac book Pro World, you can click on this button called Clone.

  • You think basically what is going to do is it's going to create a complete copy of that virtual machine, so you give it a name.

  • So about two server clone, you get the location, Mac address policy, I would say, unless you know what you're doing.

  • Just leave the Mac address policy as it is, then you can click can continue clone a type you want full clone or a link clone, so I fold clone again.

  • This is what I would recommend.

  • It is basically copies the entire virtual hard drive.

  • And so you have a brand new, virtual hard drive.

  • You can throw that on a USB flash drive and move it to a different computer or whatever else there is a link clone.

  • What a link clone does is it creates a file that on Lee has the differences between the original hard drive and the clone that you've created.

  • That is something to think about, but you may run into some issues in the future, so I get it.

  • I say, Unless you know what you're doing, clip, you leave it with a full clone and then you collect clone button and you will get a clone.

  • Essentially, this is a way to copy the virtual machine that you created so that you can play around with a copy.

  • If you screw things up and you can delete the copy, create a new clone.

  • Go on from there.

  • The nice thing about clones is it only takes like four to go through the local loan process, and one takes like a minute or two, right?

  • So even in a virtual machine, if you want to install an operating system, it's a 10 or 15 minute task.

  • Probably maybe a little bit less than that.

  • But you know it's gonna take you at least 10 minutes if you want to install even who want to serve into a virtual machine.

  • Whereas if you do a clone, you can you can spend up a clone in in just a minute.

  • Thea Other thing, too, is to be thinking about like when you're doing experiments when you're playing around like once you've installed a pack, you once you build lamps server you can build your lamp, sir, with all your configurations.

  • Then you create a clone of what you've created.

  • And then again, you play around with the clone.

  • Figure out what?

  • What?

  • What you do, right?

  • Figure out what you do wrong, and then go back to your original and actually make the modifications that you want.

  • So it's no need to think about as you start playing with these virtual machines is think about creating these clones.

  • But anyways, where that let's go to our boat to server clone and actually start playing with this app.

  • Hyphen.

  • Get command s O, of course.

  • My server name for my log in Name is Bob.

  • And my password is 123456 We're gonna log in and we get the basic stuff that we normally get so that we're just gonna hit clear.

  • We get a clear screen s o.

  • The first thing is we're gonna do student.

  • So sue do act hyphen get and then update.

  • So this is going to update the library?

  • The information about where different stuff where is the current versions of software.

  • All that kind of stuff we hit Enter is gonna ask me for my password.

  • 123456 Dinner working So it's connecting is going to repositories.

  • It's getting the information and it's fetching the information.

  • And there we go so we can see that we had a 252 kilobytes that were actually effect.

  • So again, this is one of those things it's very easy to forget about.

  • It's a stupid little stupid little command that's easy to forget about.

  • But, you know, there's 252 kilobytes of information that was actually downloaded.

  • So depending on what you're installing, it might be relevant for you with that.

  • Then this clear this out, then what we're going to do is we're actually going to install a pass.

  • You too.

  • So all we do is again Soon space act.

  • I get space install and so I know what I'm looking for.

  • So I'm looking for a pack.

  • You two again, depending on what you're on selling might be my sequel, maybe PHP.

  • Whatever us just space install space, whatever you're selling.

  • Then I press enter again.

  • I have a timeout on the suit.

  • Do for the password.

  • You don't always have to put the password and get, like, a 15 minute time out, so I don't have to do that.

  • And now it's actually installed.

  • So it's enabling molecules and downloaded.

  • And everything is now installed on to you, Bunty Server.

  • So just do clear.

  • Clear the screen.

  • Um, And now to do the upgrade.

  • Since we have Apache to I don't think we'll have any kind of upgrade.

  • We do pseudo space, half hyphen.

  • Get upgrade.

  • Eso This will upgrade the packages that are itself the suffer that's installed on our server.

  • We hit.

  • Enter reading package.

  • Less building after this operation.

  • Okay, so falling packages will be upgraded.

  • Eso libidinous lit.

  • Pam, you can see all that.

  • Just click.

  • Yes.

  • Just to show you how this works.

  • So again, the nice part is this is just went up, is just connecting.

  • It's downloading everything and then we'll stop install ish.

  • Oh, nice and easy.

  • Um, definitely.

  • Definitely help what?

  • He's in the Windows world.

  • And this is this is one of the reasons why again you go back 10 or 15 years.

  • Ah, lot of administrators really did prefer Lennox over windows.

  • Remember?

  • Back in the days, right?

  • If you want to install anything on windows, you had to have those CDs you had have licenses.

  • You had to jump through all these hoops, especially when they started putting the whole of genuine authentication or whatever crap you had to jump through a lot of hoops simply to be about install software onto a window server.

  • Whereas in the Lenox World this this is how they've been doing it for decades, so can you again.

  • And that's that's what That's one of the reasons why the Lenox sys admin get so snarky is can you imagine a process like this where it is so easy to download and install software and then you go to the window is the world.

  • I mean, he can kind of understand why they lost their minds just a little bit.

  • Okay, so there we get Diogo, and we had to be upgrade.

  • So the next thing that we're going to do is I'm going to show you the remove command, so the remove command gets rid of the the application, but it doesn't get rid of the configuration files.

  • So if I use a command, there's another command called Where is so?

  • This is kind of cool.

  • So where is you can actually feed it an application.

  • And we'll tell you the folders associated with that application.

  • So we do.

  • Where is a pack?

  • You too.

  • And so it Here we take a look at that shows us the different folders that are associated with Apache to the main one that we're looking at is the E.

  • T.

  • C.

  • Forward slash Apache, too.

  • So this is where the configuration files for Apache two are located, right?

  • So what we can see is currently Apache to isn't Stone And currently there is a folder for E T.

  • C A passion, too.

  • So what we're going to dio is that what we're gonna do is sue do at five at life, get remove.

  • So we're simply doing remove right now, patchy, too.

  • Then we're gonna hit enter.

  • So this is going to remove basically uninstalled the application without getting rid of configuration files.

  • So we do that.

  • Ask us the information.

  • Of course.

  • We see yes, that it goes through and it's now removing the the application.

  • So now a path you two is removed from this particular server.

  • But what I want to show you is if we do, where is we do Apache to again?

  • If we take a look, you see how we still have that e t c Apache to folder.

  • So the configuration files for Apache two are still there.

  • So we're like, Oh, no.

  • We want to make sure the configuration finals were gone.

  • We want to get rid of a patron to what we do is pseudo get Berg Kathy, too.

  • Dinner it goes through.

  • Do you really want to do it?

  • Yes.

  • Purging the configuration of files processing blah, blah, blah.

  • Then we type in.

  • Where is again?

  • Two.

  • And we hit.

  • Enter.

  • Basically, what we can see here is that that e t c folders got so see.

  • How has these folders here?

  • So user s been user lib and then e t c.

  • If we go down here now, see, user s Ben User lib Thehe pat.

  • The E T C Apache to forger is no longer there.

  • So that's where the configuration files restored.

  • So that's the That's right.

  • Here is the difference between remove and purge.

  • And I mean really that.

  • That's basically all there is.

  • Thio Act hyphen.

  • Get command for installing, upgrading and uninstalling software on your Lennox server.

  • So there you go.

  • That's all there is to being able to install software on here about to serve again when they're gonna be installing Apache or Engine X or PHP or my sequel or Maria de B.

  • Or most again, it's a Lennox World you always got in the Lennox.

  • Where would he always got?

  • Say most.

  • He always got most.

  • Most of the South, where that most people will ever run into.

  • They can simply use this command to be able to download and install.

  • So again, I would argue, 95% of the time.

  • There is, you know, proprietary software out there that you may have to go through an installation process for if you run into that software, just simply looking the documentation and figure it out that way, generally in the Lenox world again, since most of its open sores and most of that open source is free.

  • Basically, this is the process you go through, and it really does show you mean look the Lennox at the London Sam and let's be on, Lenox admits.

  • Go way too far.

  • They go way too far when there's not in this, but but you can start to see, especially when you think about 15 or 20 years ago why they might have had a little bit of a superiority condo complex over the Windows world again as somebody who actually had to administer Windows NT 4.0, in the production environment, when you realize this is what Lennox folks were dealing with 20 years ago, compared to what the Windows and T folks we're dealing with, you can see why they would think that this is a better way to do things.

  • Uh, so that's one of the nice things with Lennox eso.

  • Whenever you're gonna be using the app hyphen, get command again.

  • Always do.

  • Make sure to use update even even on a system.

  • You've installed other stuff you know before before you install anything from a repositories.

  • Just run that update command.

  • So you make sure you're getting the latest and greatest.

  • It'll make life easier for you in the future, then remember, upgrade And again, this is an important thing in Lenox World 11 of the big problems of the world is things break so un often they don't break.

  • And so one of the issues in Lenox World is that many times the big problem with Lennox is that people don't do preventive maintenance, since it is so stable, since it is so reliable.

  • People frankly forget to do things like update software.

  • So do make sure every month or two, or at least once a frickin year.

  • I mean every month.

  • That's what you should do.

  • But at least once a year we're on the upgrade man actually do updates for your system because that's where you can run into a lot of problems.

  • That's where you see there are vulnerabilities that people found out, like five or six or even 10 years ago.

  • And they're still servers on the Internet that are vulnerable to through these very old flaws.

  • Simply because people forgot, literally just update the software is who do you make sure to use the pseudo Typhon get upgrade up to update your software?

  • Do you realize, though, if there's a major new versions, so this is like, you know, those little versions of the big versions?

  • Big differences, so the upgrade will do a little versions.

  • If there is a major improvement, there's a major, basically different version of a piece of software that comes out.

  • You may then have to actually install that that latest version without the upgrade.

  • That might be an additional thing, so just kind of keep that in mind.

  • Then you've got remove two to remove the software, but that keeps configuration files.

  • Whether you want to do that when you don't want to do that, that's up to you on.

  • Then purge with perjury.

  • News will go through a ballot configuration files and it'll get rid of the software and so you'll be back to square one more or less.

  • Uh, so that's how the app hyphen get commands works.

  • As with all of this, there's more to it.

  • It's o or do it.

  • So if you're interested in this and your interest in the concept of repositories, because that's that's one thing.

  • Like with being able to download and install software from repositories, you can actually add repositories, right?

  • So there's the basic repositories that bunch who knows about you can actually add repositories.

  • Two Bunches list.

  • But again, that's one of those.

  • If you need to if you want to realize that's a possibility, said go out and figure out how to do it.

  • Do a Google search on that.

  • There is some other interesting things with the app hyphen.

  • Get command that again.

  • 99% of time you will never use.

  • 99% of people in 99% of time will never, never need it.

  • But if you're really going to be a power user in Lenox World, get in.

  • Take a look at the man pages.

  • Take a look.

  • It's on the information about hye AP haIf and get there are some other interesting things that you could do with the command on.

  • As always, I enjoy doing this video and look for anything of the next one.

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.

字幕と単語

ワンタップで英和辞典検索 単語をクリックすると、意味が表示されます

B1 中級

Linux - Linuxサーバにソフトウェアをインストールする (apt-get) (Linux - Install Software on Linux Server (apt-get))

  • 4 0
    林宜悉 に公開 2021 年 01 月 14 日
動画の中の単語