EX200 Red Hat Certified System Administrator RHCSA – Servers under Red Hat: HTTP, FTP, VNC

  • By
  • January 19, 2023
0 Comment

1. How to install and configure a web server part 1

Welcome all to this tutorial. Today I am going to go ahead and introduce you to a web server setup. For this you will need to bring about your Santos machine which we have created previously as well. So I have it up and running here. We will use one machine to create a server and another machine to actually connect to the server. So the this is me doing some nonsense here. I’ll just go ahead and clear it doesn’t really matter. So at the moment I am on the Cento S machine and here I am going to bring the web server up. To bring about the web server up and running. I would also recommend that you two do it on the Sentos machine as the procedure is exactly the same and this costs nothing. So all you need to do is go ahead and type in Yum, search Apache and press Enter. There’s a lot of things that pops into your sphere of vision here, but let’s just go ahead and search through some of them. And I didn’t expand the screen so let’s just do this one more time.

Shouldn’t waste too much time like that. Excellent. So what do we got here? Out of all these things we are looking for a web server. Perhaps I should add some filtering. I should definitely add some filtering because there is no way that this is going to work. So graphi and we’re going to type in Server. Okay. So this is noticeably less and there we go. So httpd dot x 86 64 apache Http server and that is the one that we’re looking for. That is the one that we would like to install on this particular machine. So just go ahead and type in Yum install httpd x 86 this also should be necessary, but I don’t know, I really don’t mind typing it in. That’s it. Just press Enter, it’s going to load.

Okay. On this particular machine it says that it is already installed and it’s up and running. Well, I’m not sure if it’s up and running, but it is installed in any case and I don’t need to go through the whole installation procedure. The whole installation procedure is basically you just sitting back and waiting for it to finish. You might get prompted with one question, just press Y to answer it with yes. That is pretty much it.

It’s basically just a question asking you are you sure that you want to install it? That is literally all. So let’s go ahead and clear the screen and let’s verify that Apache is running. Or should I say let’s go ahead and check the status of Apache. So Systemctl Face status Httpd service I’ll just see the status. So it says loaded, disabled, active and active. It’s dead. Okay, so no big deal. We can type in Start, press Enter and the Apache web service web server has indeed started. Now a couple of things to keep in mind here you have a configuration file and you have a file where your web things are stored, such as your website files or I don’t know, some things that you would like to be downloadable or something like that. So in any case, the working directory, the root of the Apache web server when you visit that particular site would be on this machine in CDV LS. And there we go.

Now we are in the root of that system. Now we are in root of the Apache web server. That really depends how you configure it, but we’ll see that in a moment. So anyway, you will put your files here, well, maybe not directly here. You would put it under HTML if I’m not mistaken. HTML. And if I do a list, there is nothing there. Okay, let’s just go ahead and check light TTPD if there is anything there. Okay, so there are things there, the index file, and if I’m not mistaken, in all likelihood by default on pretty much an Apache server when you started, it’s going to give you a lot of information in regard to that Apache server and we will check that out. Now first of all by typing if config and I don’t have Internet connection here, strangely enough. So let’s just go ahead and connect the internet manually through the terminal. You can type in DH client and wait for it. I press enter. There you go. So we have an IP address. It’s 192-1680 101. Fantastic. Let’s go over to our Red Hat machine. Lots of things there. Red hat. There we go. CD. And we need to go over to Firefox. Click on firefox. So that’s the default place. Let’s go to 192-1681 ups zero 101. Was it 101? No. Was it 102 by any chance? Connecting problem? No. Let’s go ahead and check the IP address one more time because of my terrible memory. Okay, so it is 101 but we are not able to connect. Let’s just verify this and then we’re going to start our troubleshooting session. So 192168 dot 0101. If I say try again, try again. Okay, so no big deal. I can’t actually connect to it. I mean it is a big deal, but it’s not that big of a problem that can be resolved or something of a kind. Anyway, let’s go ahead and clear the screen CV here. Clear the screen again. And one of the first things that we’re going to do is verify locally that the Apache server is run.

Oops, I need status, not start status. Okay, so it is active. Indeed it is running. So that’s not a problem. Let’s go ahead and see if we can actually visit it from the local machine. Open up Firefox anytime now, please. There we go. Sesame Open. Don’t need this, don’t need this. Let’s type in local host. Okay, so it is working from here. Two possibilities. Either the port 80 is not open for external traffic or the configuration file is simply not listening on the IP address that has been assigned to the interface. I’m sure you can come up with some other possibilities as well, but for the time being I am going to go ahead and assume that it could be one of those two.

So how do we go about solving this? Well, first off, since we started an interface, we might try with a simple restart and see if that’s going to help us out and let’s see if it’s going to pick up the address by default. That’s a valid shot. I mean, if you can save yourself a lot of time in such a way. Not a bad idea. So this could not have internet access? Yes, it does. Okay, so let’s go ahead and continue our troubleshooting session.

We have restarted the service, but okay, nothing has happened there. Let’s go into the configuration file and have a look. So VIMC Httpd, what do you got for me? No mate, I just need conf. No, that’s not the one. Come on CDHT, let’s see, what have we got here? So we got conf. There we go. So vim Httpd comf, press Enter and here you can actually configure. How do you want your web server to behave? And there you go. Server route is httpd wow, okay, no big deal. And down below it says listen on port 80. That’s fine. Web servers by default listen on port 80 and Http is on port 80 and Https is on port four, port three. But what else does it say? It says Listen allows you to bind Apache to a specific IP address and or ports instead of the default celso virtual Hawai’s directive. Change this to listen on specific IP address as shown below to prevent Apache from looming onto all bound IP addresses. Seems simple enough of a fix. Let’s go ahead and just scroll down to see if we can see anything else that’s of interest to us. So we got a server admin directories, we’re not document route and that’s what we need. That’s what I was talking previously. It’s not the Apache route, my sincere apologies.

It’s the document root where all the documents go. So it’s our WW HTML. We have visited that place and you can actually change it to pretty much whatever, although it’s not really advisable to do that unless you really know what you are doing. You could seriously compromise your system. Okay, so we are scrolling. I don’t think that we’re going to find anything particularly useful here. What I wanted to do is mess around with that IP address as that I believe is the primary cause of the problem. So let’s go ahead and edit this file with insert. Delete this and it says here some random IP address but I am going to change it. You can leave the port number so 1921-6801. Keep in mind that this IP address will most likely change. So this is just for demonstration purposes.

Obviously, in the real environment, you would have a static IP address, which you could use for your web server. But since I don’t have a static IP address, I mean, I could configure one. However, there is no need for this sort of a demonstration, right? Quit. And don’t forget to restart the service to load the new configuration job for Http server. Failed. You have failed. Okay, why have you failed? Tell me, why have you failed? Let’s go ahead and paste it. Failed to start one failure. So I could not find okay, address already in use. I think I know where the problem is. So let’s type in stop and let’s type in start. Okay, so let’s go back into the file and let’s comment. Let’s go ahead and comment this line out. Right? Quit again. Let’s go ahead and start it. There we go. So it can’t listen twice on port 80. That would be the problem anyway. Let’s go ahead and see if we can access it on our red hat machine. Now try again. Still cannot access it. So let’s go ahead and type in Google. com. Will you be able to access this? Yes, you will. Am I seriously typing in the wrong IP address?

So one, nine, two, dot, one, six, eight. So there’s a bigger problem here at hand, and I don’t want to cut this out. I want to show what I mean, what I would do to figure out what the problem is. So, 1680 101. Let’s see if we can actually ping it. So we can ping it. Next thing that can be problematic is the firewall. We haven’t yet spoken of about our firewall, and I haven’t really introduced you to it at all, but we will. But for the time being, let’s just make a troubleshooting command. To allow port 80 connections from anywhere, all you need to do is type in IP tables and append input rule number one. I will explain these things in greater detail when we actually get to the firewall configuration. So a input one protocol DCP the port. So destination port will be 80. And I would like to issue the command. I would like you to accept everything there center bad argument one, right? You can’t append it and give a row. You need to insert it and then give a row. J.

Of course it’s not and there we go. So now this should definitely work. If it doesn’t, I don’t know. You can tell me that I am lame and that I have no idea what I’m doing. So 192-1680 101. And there we go. So we have successfully connected to the Apache web server keynote here. I didn’t actually run a test of this prior to the tutorial. I literally just went ahead with it and just to see what sort of problems would I encounter. So I believe that that would be beneficial for you to see a real situation and take a look at what I did. First conclusion that I made was that there was something wrong with the configuration file. Well no, first thing that I want to check whether this service was running at all. So I issued the system CTL command to see whether the service is active at all, whether it has been loaded. Second I tried to access it from the local machine so on local host and I seem to have been able to access it. Then I went into the configuration file thinking that there was something wrong with the configuration. I’ve changed the IP address to match it but that wasn’t the problem.

I do believe that it would have worked without me changing that IP address if I’ve only changed the firewall settings. There is one more thing that you can do here that I didn’t do that I would have done and that is basically install a tool called Nmap and would it conduct a scan. But I don’t have enough time in this video so in the next one we can deal a bit further with that subject because we’re going to be dealing with a few other servers and with a few other services and how to set them up. So that was my troubleshooting process, that was the order that I have taken. That is not necessarily the best order, the most logical order, that is just the one that I have taken and you can see the troubleshooting process happening live. So you just check one thing after another. Something’s got to give eventually something’s got to give, give eventually help find the error and it’s going to work. It’s just a matter of time and luck to an extent of course. Anyway, I bid you all farewell and I hope to see you in the follow up tutorial.

2. How to install and configure a web server part 2

Welcome back to this tutorial. Let’s just go ahead and clear up some loose ends from the previous tutorial. The first loose end is the Nmap. And Nmap is a tool which you can use to scan the network and to see which ports are open to confirm that port 80 is indeed open. So we can just go ahead and type in Yan install Nmap. I think I already have it installed here. And then just type in Nmap and the IP address 101. Press Enter and let’s see what the scan returns. Come on. Yeah, the scans can take a while, especially if you’re scanning for 1000 ports. So oh, I wanted to interrupt it, but that didn’t happen. Anyway, next scan that I’ll perform, I’ll perform it only on port 80 so it will be quicker. So you can see that the port 80 is indeed open and the web server is indeed functional. Let’s go ahead and stop the web server and see what happens. Httpd service we’ve stopped it and let’s redo the Nmap scan. Let’s increase the verbicity level. Let’s make it tell us everything. And let’s say that we would like only to scan for port 80 to probe for port 80 to see if it’s actually opened or not. Any moment now, please. There is like only one host and this is localized.

Be faster. And there you go. So it says port 80 TCP closed. It is no longer open. You can take a look at the difference as opposed to here. So it says open here and then it says down below here, it says closed. If we just go ahead and http the service scan one more time, I’m pretty sure you can guess what the result will be. Just trying to make a point here. Nothing in particular. You can just use it to verify that the ports are open on the server. For example, if you have a web server running like I do here on some server, and you can’t access it from outside, you don’t know what the problem is. One of the things that you can do is actually scan yourself to see whether your machine is actually listening on specific ports. Anyway, let’s go ahead and clear up this screen.

Now, there is another interesting thing, and obviously you can use Firefox as a web browser in order to access your content and to see and verify whether the web server is functional or not. But imagine that you are in an environment without a dewy and you need to run a confirmation that this server is indeed functional. How would you do that? Well, simple enough. You would use a text based browser which would enable you to do something of a kind. And I’m going to go ahead and go back to Red Hat and do it from here. I think I have it somewhere around here. Yum. Search elenx that’s the web browser that I was talking about, which is text based.

I don’t have links here. Links is also another text mode web browser. Could be the same thing, I really have no idea. It’s completely relevant. It’s just something that you will use a couple of times to verify that something is running or it is not running. That is literally it. You will never actually use it to browse the web or anything of a kind. Anyway, it’s Eilings. So just type in Yun, install Eilings enter any moment. I do believe that this installed here, but for some strange reason it’s working. This virtual machine is working really slow. Could be that I have taken a lot of resources from it. Oh, okay. So it is not installed at all. So let’s go ahead and say yes, it is okay. Go, go. Morning transaction check warning verifying. There we go. And if you would like to access our web server over there, you would type in elenx spacehttb 192-1680 101 enter unable to retrieve.

No route to host. Interesting. You really want to exit Links. If you’re wondering what I pressed, they just pressed Escape. Yes, ping. I do have a response. So what is the deal with this IP address again? We have some problems. Let’s just try it one more time. I am getting a reply. So everything should be proper, everything should be functional. Let’s see if I can access it via Firefox. If I didn’t mess something up during the test stages, let’s try to reload it. I cannot reload it. Interestingly enough, during my testing sessions, I have actually messed around with the Firewall and it could be a problem because I’m not making these videos from one piece.

There’s a little bit of trucking involved. So let me just find the command that I’ve used so I don’t have to retype it in again. Come on. There we go. So will you be so kind as to magically access it now? There we go. And then we’re going to go ahead and form same thing that we did as before. And there we have it. So we can actually use a text based browser from our terminal and access the web server in order to confirm is it functional or not. By the way, the scans that I did with the map and everything like that, with the port and the IP tables, as I said, I’m not making these videos from one piece. I’m dropping them out. So sometimes I change something in the middle or in between. Anyway, make sure that your Firewall settings are correct and we will deal with that a bit later on. Very soon actually, I think we just have FTP and VNC something else and then we’re going to move on into Se, Linux and Firewall.

Comments
* The most recent comment are at the top

Interesting posts

The Growing Demand for IT Certifications in the Fintech Industry

The fintech industry is experiencing an unprecedented boom, driven by the relentless pace of technological innovation and the increasing integration of financial services with digital platforms. As the lines between finance and technology blur, the need for highly skilled professionals who can navigate both worlds is greater than ever. One of the most effective ways… Read More »

CompTIA Security+ vs. CEH: Entry-Level Cybersecurity Certifications Compared

In today’s digital world, cybersecurity is no longer just a technical concern; it’s a critical business priority. With cyber threats evolving rapidly, organizations of all sizes are seeking skilled professionals to protect their digital assets. For those looking to break into the cybersecurity field, earning a certification is a great way to validate your skills… Read More »

The Evolving Role of ITIL: What’s New in ITIL 4 Managing Professional Transition Exam?

If you’ve been in the IT service management (ITSM) world for a while, you’ve probably heard of ITIL – the framework that’s been guiding IT professionals in delivering high-quality services for decades. The Information Technology Infrastructure Library (ITIL) has evolved significantly over the years, and its latest iteration, ITIL 4, marks a substantial shift in… Read More »

SASE and Zero Trust: How New Security Architectures are Shaping Cisco’s CyberOps Certification

As cybersecurity threats become increasingly sophisticated and pervasive, traditional security models are proving inadequate for today’s complex digital environments. To address these challenges, modern security frameworks such as SASE (Secure Access Service Edge) and Zero Trust are revolutionizing how organizations protect their networks and data. Recognizing the shift towards these advanced security architectures, Cisco has… Read More »

CompTIA’s CASP+ (CAS-004) Gets Tougher: What’s New in Advanced Security Practitioner Certification?

The cybersecurity landscape is constantly evolving, and with it, the certifications that validate the expertise of security professionals must adapt to address new challenges and technologies. CompTIA’s CASP+ (CompTIA Advanced Security Practitioner) certification has long been a hallmark of advanced knowledge in cybersecurity, distinguishing those who are capable of designing, implementing, and managing enterprise-level security… Read More »

Azure DevOps Engineer Expert Certification: What’s Changed in the New AZ-400 Exam Blueprint?

The cloud landscape is evolving at a breakneck pace, and with it, the certifications that validate an IT professional’s skills. One such certification is the Microsoft Certified: DevOps Engineer Expert, which is validated through the AZ-400 exam. This exam has undergone significant changes to reflect the latest trends, tools, and methodologies in the DevOps world.… Read More »

img