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 in today's video, I'm going to show you how to check on the status of service is on your Lennox server.

  • How to start, stop and really start.

  • Those service is on your server.

  • Why Service's are important in the Lenox world and the server world is basically service's are the applications that are running on your server.

  • So if you have installed a pantry to or engine X or my sequel or whatever else, but the service is not actually running, then when somebody tries to go to your server in order to get a website or to get a database or something like that, they will not be able to access the service.

  • Kind of sort of think about like if you have a desktop computer and you have installed word on that desktop computer, but you have not opened it up right.

  • My opening upward now word as a service has started, and you can start interacting with word if word is installed.

  • But it's not open.

  • Then you can't use words.

  • So that's basically what we're dealing with in the service is we're World on a Lennox server is a lot of times the reason that you're having a problem with your Lennox server instantly because the service, for whatever reason, has been turned off or disabled.

  • And so even though it's installed, even though the configuration files have been done and all that kind of stuff, if the service itself is not running, it doesn't matter.

  • The other reason that understanding how to deal with service is in the Lenox world is important is because if you do any changes to configurations for things such as, let's say, you're your firewall.

  • So there is a built in firewall and Lennox or, if you do a changes to configuration in Apache or squid or anything else.

  • Basically, in the Lenox world for configuration, Do you have a text file when you simply go through the text file and you make modifications and edits Well, remember, right?

  • Those modifications and edits don't actually get loaded into the service until you restart the service.

  • So one of the problems a lot of new boobs and the Lenox world can have is they go in and they do always beautiful, beautiful modifications to the configuration file.

  • But then the server keeps doing what it was doing before they get frustrated and they keep going back and back and back, and they keep doing all these strange is that they keep doing all these modifications, and the reason why their server is still working like it did before is because they haven't really started.

  • The service is if you do, if you change the V hosts within the Apache configuration, but you don't restart the Apache service, then all of that is configurations that you've changed will not be loaded into service.

  • And so the service will keep doing what it has been doing.

  • So these are the reasons why service's are very important in Lenox World.

  • If your service is not running, then again, it's literally and not running.

  • And if you make changes to configuration files and you do not restart the service, those changes will not be loaded into the servers of the server can perform how you're expected to perform now.

  • When we start document service's again, you go back to that whole.

  • Remember, I was talking about that whole good new Lenox saying the cold in new Lenox thing and how Lennox really is only the Colonel and then good new is everything that gets put on top of it.

  • And then that's one of the reasons why Lennox can turn out to be a mess.

  • All right, you goto Windows, you're the windows like it or hate it in the Windows world, there's only one way to do things like one way to do things you go to service is any deal.

  • Service's, that's it.

  • If you hate the control panel, it doesn't matter if you love the control battle, it doesn't matter.

  • Microsoft gives you one way to deal with service is Oh, but we're gonna Lennox world with Lennox World.

  • So what I'm gonna show you today?

  • It's the three ways that basically do the exact same thing as far as service's market, sir.

  • So even when you're doing simple things like checking the status of service is starting restarting.

  • Stopping service is there are always multiple ways to do that in Lenox, And one of the reasons why this could be confusing, especially for Nubes, is because you come in and you've learned one way to do things and then somebody else tells you a different way to do it.

  • And then you get really confused or again, you go to Google.

  • We're trying to figure out how to do something.

  • Let's say change configurations and squid or something like that.

  • And then they tell you how to do something.

  • You're like, what?

  • I've never seen that before.

  • And so that's one of the problems with Lennox is it could get very confused because you could literally have it three different ways to the exact same thing s O.

  • Now, since we're dealing with a bun to Debbie in, uh, they use something called a system buddy.

  • Now, in order to control service is S o the Let me say this official here, the proper way of a proper way to deal with service is and who want to 18.4 And going forward is something cold.

  • System D you use a A command cold system.

  • A C t l start.

  • Stop, restart, but status.

  • And that is the the proper way.

  • D'oh!

  • But understand, even in a bond to 18.4 there's also something called the service command, and so you can actually use something called pseudo service and then Apache two.

  • Or whatever the service's start Stop restart status, and you basically get the exact same results on for anybody that was doing clinics a little bit ago.

  • The way that I don't learn to deal with service is is there's also something called I uh innit I and I T V scripts.

  • So there's a four Call the i n i t dot de folder and in that their specific scripts again for for two deals.

  • Service's Start stock Restart status, the whole nine yards.

  • The one thing I will say is that the i n i t.

  • D is deprecate ID.

  • It's important, Understand?

  • Basically dedicated means in the Lenox world many times is that it still works.

  • It's still there, still does what it does, but there is no longer really any updates.

  • There's no longer work being done on that way of doing things.

  • And so when they say something is deprecate ID, Basically, what they mean is it's come to the end of the road.

  • It does what it does.

  • It's still within the operating system.

  • You can still do it But that's not how you're supposed to do it anymore.

  • More and again, so it's very important.

  • Understand, in the bun to world your official where to do it is System D.

  • But again, something to understand.

  • If you're going back and you're looking a documentation and again with Lennox right again for dealing squid servers or firewall or Apache, you may go back and you may look at some documentation from, Let's say, 2012 within 2012.

  • I I and I T D scripts where the way to do things and so you may see something where they say, modify the configuration files and such and such way.

  • And then this is how you restart the service.

  • And so one of reasons I'm showing you that is just to show you that again, at least in 18.4 It's still work that it probably still work well for work for a few more years.

  • So I'm just showing you that to show you that it exists, and if nothing else is, you get it.

  • When you do see it in the future, you go.

  • Oh, that's how they used to do it.

  • So instead of using i n i t d I'm gonna use a system de loop roper where to do it instead.

  • So do you remember in the Lenox World one of the reasons why Lennox could be so Dorn fusing is you literally you literally three ways.

  • Three ways to to something s eval as start, stop, restart and status on service is so with that, let's go over to my computer.

  • I guess you're the exciting world of service is, uh so here we are my Avanti server again, we have running a bunch of 18.4 point three.

  • Lt s But everything that I'm showing you today should should work for about a decade into the future.

  • There should not be any differences and many of the things that I'm showing you can work 10 generations in the past three.

  • Only thing that might not work if you have an older version of Lennox, is the whole system.

  • The thing I think System D came in four or five years ago.

  • So it should work on any relatively new versions of a bun too.

  • But I don't know if you had a distribution from, let's say, 2010.

  • I don't think system the woodwork then.

  • But on the other hand, why the hell are you running a distribution from 2000 type video?

  • So again, it's the athletics world that's out, Goes S O.

  • This is the standard of standard server insulation with virtual box.

  • The one thing that I have done is I haven't sold a patchy too.

  • So Apache to is a Web server service, I guess so that we have a service that we can interact with here as I'm gonna log in.

  • Of course, we're gonna use Bob.

  • 123456 If that's how I roll with security and gonna hit Enter.

  • So we're now long dead and I'm going to do clear and order to clear the scream s So we're gonna deal with system.

  • The first AM tbe clue system D is the proper way.

  • The proper way to deal with service is in the Lenox world.

  • So the other things that I'll show you today our ways will end up doing the exact same thing.

  • When the problem proper, Robert way system deep.

  • The first thing that we d'oh with system deep is we can use the system C t l command for status.

  • So to look at the status of the different service is on the system.

  • So we knew pseudo system c t l and then space status.

  • So what is going to is gonna show us the status of all the service is that are currently running on the system.

  • Hit.

  • Enter.

  • That's a pseudo 123456 Enter.

  • Now we can see different things, right?

  • So, server, the state is obviously running because we're actually interacting with it and we can go down here.

  • We can see a lot of just generic information that may or may not be a value to you.

  • So one of things that were interested here again, As I said before the Apache to service is running so pack YouTube service that is actually running.

  • We see this star command here Was he p i d s on.

  • So we have this information this right now is not overly valuable, Thio.

  • I just want to kind of show you this so that you know it exists.

  • So it might be a lot more valuable to use again.

  • If we do sudo system c t l space status, and then we actually say what service we care about.

  • So now we're gonna say that we actually care about Apache Tucson 70 everything we just want to Apache to I just want to know a Paki to I just want to know my Siegel, right?

  • So if somebody's coming to my server and for some reason they're not getting the website or let's say they're getting a Web page but it's garbage because it's obviously you're not reading from the database, I could come in here, but my sequel or passion to or whatever service, Right?

  • So I put a passkey to hit inner, and so this tells me specifically about a path.

  • You, too.

  • And so this is honestly, was the help.

  • I have a lot more valuable than guessing in all those service's joins the Apache not to service.

  • You have some information here active so it's active.

  • Running gets in these p i.

  • D.

  • S.

  • These air the process I d numbers gives me some other information, started things the whole nine yards, like inner, gives me some other information here, but the big thing that I'm looking for is like Okay, so At least I know that a path you two is started.

  • Get down once you get to the end Doesn't really tell you what to dio.

  • Q Q is the answer Q and you're out of this Clear to clear the screen.

  • So to use system C t l in order to stop the service will do is you do sudo system c t l.

  • And then what we're going to do is we're going to say, stop happy too.

  • So let's say for some reason we launch we we installed Webster on here.

  • We're using it for some reason, but we just purely want to stop the service.

  • We don't want anybody to be able to get to the website.

  • We could stop we enter than if we do sudo system c t l status pad fee to this will tell us a status we hit Enter.

  • And if we go down here, we can now see inactive.

  • Dead Good.

  • Right.

  • So we know that that service is not running.

  • Then we could just take you to get out of that from that point again.

  • If we just want you simply start the service, we could do sudo system c t l start a patron to start the service again.

  • No big deal.

  • The big one, though The big the big command that you are actually going to use the one that you're actually going to use a lot is simply the restart command.

  • So let's say I go in.

  • I changing configurations.

  • The PHP, don't I?

  • Thank you.

  • Configurations for the V hosts change attentive, can't configurations for something.

  • Service is what you're going to dio is the way to a load.

  • Those configurations actually into memories so that they're being used is by simply restarting.

  • So we do system O c t l restart happy too.

  • And then you get inner on.

  • Then again, woo exciting.

  • This may not seem excited, but this this right here, this is the command that you're actually going to be using on a day today basis.

  • It's over that Let's go over and let's talk about the service.

  • So let me clear this clear the screen.

  • And now the service command, it basically does everything I just showed you, uh, in a different way.

  • So you do is suit up a super user dio on.

  • Then we're gonna use a service command and for this to see the status of everything going on.

  • So, basically, see, all the service is on your Lennox server.

  • You're going to hyphen hyphen status.

  • Uh, again.

  • You don't type it, right?

  • It's not right, hyphen.

  • All and then we're gonna do is we're gonna pipe this through, the less so we're gonna use this up.

  • Down.

  • This is not an L.

  • This is that up, down, sticky thing.

  • And then there s a less so basically, what it's gonna do is gonna show us things on a page.

  • And then when it gets to the end of the page, it's going to stop.

  • And then I'm gonna have to hit in order to keep see being a pussy things because basically, when you try to look at the service is, well, let me show you.

  • And when I do this, when I simply do this hit enter, see, you see how all those service's scrolled buys?

  • We got a lot of service is up here that I can't see.

  • So if I do this, but then I pipe it through less.

  • What's gonna happen is gonna go down.

  • It's gonna show me one page of information and then to keep going, I just hit inner line by line.

  • Now, with this, if you're gonna use a service in order to check on the status plus your pantry two plus means the service is running minus council set up crypt discs.

  • Things like that means the service is not running.

  • So basically, you could just do this is a little more graphical way.

  • I think this might be actually a little bit easier way of seeing what service is air actually running on your box on this just shows you all of your service is You just press enter, get to the end on then you can press cue to get out.

  • Then from here, if you want to see the status of a specific service, you do sudo, you do service.

  • And then what you're going to do is Aaron do the service itself a passion to status.

  • So with here, service the name of service and status.

  • Get this and then this gives us the same kind of thing.

  • We got a system D Apache to service active, run in wana, la la, blah, blah.

  • So that's basically how you do that.

  • There now in order to start.

  • Stop.

  • Restart Service is with this.

  • Clear the screen.

  • Uh, we're going to do is write you pseudo service the name of the service.

  • So for us, we're using Apache two on.

  • Then we're going to say stop, right?

  • So we're just gonna stop the Apache to service.

  • We hit enter, and there we go.

  • If we wanted And check on the status pseudo service patty to status, we can now see that it is inactive.

  • It is dead.

  • I can take you and I could get out of this.

  • Then I'll have to do in order to start the service using service's again pseudo uh, service, uh, start.

  • And now we've started the service on I would have said the up.

  • So I hit the up key.

  • I can go back and I can look at the command.

  • So up and down keys scrolls through the commands that I've been using.

  • So, this again, if you change configuration files, anything like that.

  • So you want that to get loaded the memory so that servers actually using those new configuration files you simply do restart and voila.

  • You have now restarted the pack you to service so that right there is basically how you deal with the service command in order to deal with service is on the U bahn to box.

  • So from there, let's go to the eye and I t d scripts so that let me clear, clear the thing and we're going to deal with i n I t d scripts again.

  • To be clear, these are deprecating.

  • They are dedicated.

  • But, you know, for some reason, you may see them and instructions.

  • You may know how to use them.

  • Whatever else they still work again.

  • That's with many things, and Lennox is still works.

  • Eso with this is a little bit weirder because you actually have to get a full, full path, full path where you're going.

  • So we're gonna do sudo and then we're gonna do is your idea forward slash So root directory E T C.

  • Folder.

  • So root directory E d.

  • C.

  • Folder and then something called the eye and I t period the folder.

  • Right?

  • So this is an actual forger, and then in here there are going to be the different service is and they have different scripts that you can run.

  • So with this, what are you doing to Apache To.

  • And then I could give the argument of something such as status.

  • So what we're doing here is we do sudo obviously than the root directory.

  • E T C i n I t d folder in there is gonna be something called in a pack, you to script, and then we're gonna feed it, feed it an option.

  • So for us or feet of the status option, we're going hit inner.

  • And then, uh oh, that's right.

  • With this, it actually gives us too much information.

  • This is one of probably get into in Lenox World.

  • Sometimes it gives him or information that could fit on screen.

  • So we're gonna pipe this through less less enter.

  • And so here gives us just the amount of information we need for one page.

  • So Apache dot to dot service it is loaded.

  • So it is running his active, active running gives us some more information, gives us those p I d numbers that don't really matter right now.

  • I keep hitting enter and then I you get to and then I can hit Q Q is what exits s.

  • Oh, that's the way that I can see the status of the service If I want to stop the servers again Pseudo forward slashing D c for special 90 period d for such a happy too that I can stop the service Agneta dinner.

  • And with this you actually get a little bit different.

  • You actually get this readout, You get a message from the from the server.

  • So that's something to realize we go up and we want to take a look at the status.

  • We can do this.

  • So Vienna pack you d c i n I t d a patron to status and we're piping that through less L E S s.

  • So for here we come down here, we can see status is as inactive.

  • It is my cue to escape that if I want to start the service again Pseudo forward slash e TC forwards I t.

  • Period D and Force 24 star and how it started when you do the same thing, I do restart Now it's restarted s Oh, those are the three aways you're able to interact with.

  • The service is on a bunch of server again system.

  • The system days were all ball went to d'oh but Frankly, these other ones work.

  • And so if you see these other ways of dealing with service is an instruction somewhere.

  • It's up to you a CZ, long as it works made at the end of the day, you're stopping and starting service is as long as the service stop sent a long stare starts.

  • That's all that really matters is that you do what you want to do.

  • So there you go.

  • There's like a 20 minute class, literally on how to deal with Service's and Lennox World.

  • This was Microsoft open of the service panel.

  • You'd right click, start, stop, restart and that would be about it.

  • But that's Microsoft World.

  • This is Lennox and Lennox.

  • You have three different ways to essentially do the exact same thing again.

  • And you, Monty world.

  • At this point, they use something called System D System.

  • He used the command system C T l on zona there Bobo hope to do with service is in the Avanti world.

  • But do you realize the service command will also work?

  • And i n t e period?

  • DEA scripts actually still work even though, and they have been deprecate ID as with all of these things.

  • There are more arguments.

  • There are more options.

  • You can go and read the man pages If you want to learn more about these commands that I show you today But I showed you the ones that you were generally gonna need and honestly to that you're generally gonna need is status Is the service running and restart?

  • Those are the ones that you actually generally use starting at just purely started and stopped him Uh, depends on what you're doing, but you don't normally just started.

  • Stop Service is willing Nearly in politics world the one the one option.

  • The one argument I did not show you today is actually something called reload, which is kind of interesting.

  • What reload does is basically, you can give the option and the idea is it real loads the configuration file without fully restarting the service.

  • Eso theoretically, in the real world, theoretically, this should be a faster way, faster way to load than new configurations that you've created into the service and keep it running.

  • It's not something that I've done in the past.

  • I always restart.

  • Service is to be honest with you.

  • Maybe I'm an old guy maybe old people restart service is it took a look into a lot more.

  • You can have some weird quirks with the reload command.

  • Like sometimes the configuration found a fully loaded gets, of course, is Lennox.

  • You run into problems.

  • So what I would say is you might want to take a look at the reload option just to know that it's there I find, especially when you're dealing with a pack, YouTube or squid or any of these basic service is on Lenox box.

  • Restarting the service is so quick, I'm not sure I'm willing to risk quirks for a few microseconds of speed again.

  • In the real world, if you're running is important thing to think about.

  • Like if you're If you're running these the service thes service things in a script or something like that, it may be valuable.

  • Couple of couple of microseconds.

  • A couple of seconds microseconds might actually matter, I would say if you're actually sitting there at the command line again, you got any decent side, decent speed server.

  • It probably will be an issue, but there is the real load option.

  • So that's something that you might want to take a look at?

  • Yes, I do know it exists.

  • I did not teach it to you today because Mike Causey problems, especially, is a new if you reload and things don't load properly.

  • So just something for you to realize There.

  • So that's how Thio, uh, check on the status of a stop start And Maria Star Service is in the Lenox world.

  • As always, I enjoyed doing this video and 40 at 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.

字幕與單字

單字即點即查 點擊單字可以查詢單字解釋

A2 初級

Linux - 啟動、停止、重啟服務 (Systemd, systemctl, service, init.d) (Linux - Start, Stop, Restart Services (Systemd, systemctl, service, init.d ))

  • 0 0
    林宜悉 發佈於 2021 年 01 月 14 日
影片單字