LUIT Project 2: Building a Reliable Web Server with Red Hat

Daniel Rosales
4 min readJul 2, 2023

--

Case: As part of the cloud engineering team at Level Up Bank, we have been tasked with a project on building a new web server using Red Hat. Our goal is to develop a reliable hosting solution that will serve as the backup of the bank’s website. By leveraging the power of Red Hat, it will help provide comprehensive information about Level Up Bank’s services while ensuring online access for its valued customers. Let’s get started!

Task:

  1. Update all packages on the server
  2. Install an Apache HTTP Web Server
  3. Enable the Apache Web Server
  4. Find the public IP of the Red Hat Server and verify the webserver is working

In your AWS Console Home page, click EC2 and then click “Launch Instance.”

For this example, we will choose Red Hat as the AMI (Amazon Machine Image), name the server “Project-2” and keep all the default settings as they are for the free tier. It’s important to have familiarity with the Red Hat command “yum” for usage in the terminal.

Next, choose Project2 for the key pair, then click on “create security groups” and name it Project-2–6767.

This next step is important to ensure the proper functioning of your Apache Web Server. Create a security group rule with the following information:

First Rule
-Type: SSH
-Protocol: TCP
-Port: 22
-Source Type: Anywhere

Second Rule:
-Type: HTTP
-Protocol: TCP
-Port: 80
-Source Type: Anywhere

By configuring these rules, you will allow SSH connections and enable HTTP traffic on port 80, ensuring seamless access to your web server.

Now comes the exciting part where you get to channel your inner hacker! For this project, we will be using the Terminal in Mac OS to execute commands and perform the task assigned to us. Get ready to dive into the command-line interface and unleash your technical expertise!

Make sure to connect to your instance and open your terminal. Use the cd command to navigate to the directory where you saved the key pair file.

It’s very important to run the following command chmod 400 Project2.pemto ensure your key remains private and is not accessible to the public. You can copy this command from the SSH client tab within your instance.

Connect to your instance by running the following command copied from the SSH client tab within the instance.

Now that you are connected to your instance, you will need to elevate your privileges by running the following command to become a superuser.

The first task is to update all packages on the server. To accomplish this, run the following command yum update -y.The update process may take a few minutes to finalize. Including the -y in the command allows bypassing the need to manually respond to confirmation prompts.

The second task is to install the Apache HTTP Web Server. Run the following command yum -y install httpd.The httpd refers to the Hypertext Transfer Protocol daemon, which runs in the background and handles all requests. In this example, the Apache Web Server is included within the httpd package.

The third task assigned to us is to enable the Apache Web Server. To accomplish this, we need to perform the following steps:

  1. Check the status of the server
  2. Start the server to initiate the Apache Web Server
  3. Verify the status to confirm it’s active
  4. Finally, enable the Apache Web Server

By following these steps, we will successfully enable the Apache Web Server.

Lastly, to confirm that the web server is working, copy the public IP addresshttp://18.205.162.127/from the instance and paste it into the browser address bar. If you have followed all the steps mentioned above, your browser will successfully load the web page.

Thank you for following along. I hope the provided information has been helpful and that you now feel prepared to launch your web server using Red Hat.

--

--

Daniel Rosales

Enrolled in a 24-week Cloud Engineer boot camp, gaining practical skills and industry knowledge through hands-on experience.