Configure a functioning Linux Web Server
In this project, you will apply the material covered in the past 14 weeks to configure a functioning Linux Web Server. The project description is attached. The VM will be accessed and graded through vDirector and the written component will be attached to this assignment as a Microsoft Word or PDF document.
The Project is comprised of two parts:
Practical: • Install CentOS 7 on the blank Week 14 VM • You MUST use the following usernames and passwords: o root o P@ssw0rd o bob o P@ssw0rd • Set Hostname/FQDN to: web1.hussnet.local • Set Correct time, date, & time zone • Enable networking (use DHCP) and ensure the networking setting survives a reboot • Update the system to the latest patch level • Install the Apache Web Server • Configure the server to respond only to TCP port 8080 • Modify the default web page to include AT LEAST the following: o Your Name o Your Section & class number o The time and date you completed the assignment o Your favorite color o Uses the title “My CMIT120 End-of-Course Project) displayed in the browser title bar • Be sure to use proper HTML syntax and tagging o Bonus points awarded for extra formatting (i.e. use of CSS, etc.) • The web page MUST be visible from a Windows CSEC Lab Machine
Create a separate Word Document and be sure to fully document: • ALL steps of the installation process o Including ALL installation options chosen and specify where they are entered (i.e. installation media, hostname, etc.) • How networking was configured AND made persistent o Include the assigned IP address • How the system was updated • The entire Apache Installation • How Apache was configured to meet the project requirements • Code used to create your web document • Any other configurations or system changes needed to meet project requirements • How the web page was accessed per project requirements (how were the results tested and validated)
Important: The written section does NOT require APA/MLA formatting but it MUST use proper capitalization, punctuation, and complete sentences. This should be a professional, technical document detailing the project implementation to a customer. Screen shots are acceptable but not required. Judicious use of bullet points is also acceptable.
Written Submission Details:
I chose to use CentOS 7.0-1406 dvd iso to install the Operating System that will run your web server. For LAMP stack I used Apache, MySQL, and PHP. Here are the steps and settings that have been chosen from the installation media:
- I used an ISO to load the installation of the OS and chose English as the primary language.
2. I adjusted the date/time, keyboard language, chose software package, selected the installation location and format, and set the network and host name from the Summary Installation window.
3. I set the date and time’s zone to Eastern for the United States region. I was not able to turn on Network time at this time. I will look into the NTP service after the install is complete.
4. I decided to use the Basic Web Server package for the software installation instead of minimal. This allowed me to get the bare minimum needed to set up the web server and allowed me to decide what to download for other software later. I followed the LAMP model for initial software choices to allow for the basic tools need to start out with a basic web server.
5. Next I chose the local standard disc as the installation destination for the OS and partitioned the drive using the LVM partitioning scheme. I chose to use the default partitions set by the program for now. While pricey, I chose this for future growth options.
6. I chose LVM here for the partitioning type.
7. I left the mount points at the default settings as this is a great minimal starting point.
8. I chose the existing NIC to use for networking and set the hostname to web1.
9. Next I setup a root user and a normal user account and set the passwords.
10. I rebooted the system after all configurations were done
11. I issued the yum update command to update the system to the current patch level
12. After restarting the system I proceeded to install Apache from the command line using the yum install httpd command. I then started and enabled httpd.
13. I verified network information using ifconfig command. Note: ens32 is the NIC used for Ethernet connection. I set the Ethernet named ens32 to the server using the IP address DHCP delivered. To do this I issued the command ifconfig ens32 10.254.147.81 netmask 255.255.255.0 broadcast 10.254.147.255. I set the configuration files for the network interface to be read at boot time. I issued the cat /etc/sysconfig/network-scripts/ifcfg-ens32 command and changed the BOOTPROTO from none to DHCP and the ONBOOT from no to yes. I then restarted the network interface by issuing the commands ifdown ens32 and ifup ens32 to ensure the connections survived a reboot.
14. I disabled SELinux issuing first the getenforce command to view its current status. Then I edited the configuration file using vi /etc/selinux/config command and changed the status to disabled.
15. I configured the Firewall to allow HTTP service. I first issued the command firewall-cmd –get-default-zone to verify the default zone setting. Then I issued the firewall-cmd –list-all command to display the current firewall settings. I added port 8080/TCP and the service HTTP to the firewall settings with firewall-cmd --add-service=http –add-port=8080/tcp --permanent. To verify I used the command firewall-cmd –list-port and list-service. I then setup port forwarding of port 80/tcp to forward to 8080/tcp.
16. I did not start out with a GUI installed so I installed the GNOME desktop by issuing the command yum groupinstall “GNOME Desktop”. I then set it later to load at boot issuing the ln-sf /lib/system/system/runlevel5.target /etc/system/system/default.target command. So at startup there is the option to select just the command line OS. You can also issue the startx command to start GNOME from there.
17. I entered the IP to FQDN and hostname into /etc/hosts file and also checked /etc/nsswitch.conf to verify files are looked at first to resolve. I still was unsuccessful being able to type in the FQDN and get the default web page. I could however, in the beginning, type the FQDN with the port 8080 and get it, but this is failing as of now. I installed BIND, but did not configure it. I also messed around a little with iptables, but am not confident at all yet I have set the right settings to accomplish the goals required.
18. I tested that my default web page, the index.html was viewable from a Windows CSEC Lab Machine by using Chrome on my personal laptop at home, connected to My Lab machine via Cisco VPN. I typed in 10.254.147.81:8080 and got the default page. I was not able to resolve the name to IP address using web1.hussnet.local:8080 as I had been able to do earlier on.
19. I created the default web page and named it index.html. I also created a css style sheet, but had trouble getting the code to display properly that way, so I ended up putting the style into the html document. I also created a folder named images and put that, the index.html, and the css sheet into the /var/www/html folder. I was not able to get the picture into the images folder, so I shared the link from my google drive for now.
20. Here is the HTML coding with Internal CSS stylesheet:
<Title>My CMIT120 End-of-Course Project</title>
<h2>CMIT 120 Section 01</h2>
<p>Favorite color = Raspberry</p>