Create Two Servers Deployed from a Template:
- The following steps will be demoβd in class, but here is a helpful summary:
- Deploy a Client VM from the client template using the profile for your group.
- Configure the VM Name, IP, and resources.
- Deploy a Rocky Linux Server using the correct template and profile for your group.
- Install the httpd Apache Web Service using dnf:
1dnf install httpd -y- Enable the httpd daemon using systemctl:
2systemctl enable httpd- Start the service:
3systemctl start httpd- Configure the firewall to allow the server to accept outside connections
4firewall-cmd --add-port=80/tcp --permanent-
Test to see if you can access the Web Server from your Client VM
-
Use vi to create a webpage at /var/www/html/ named, index.html with the following text:
1<html>
2<body> Hi, my name is YOURNAME. <br>
3I am student X from group X.
4</body>
5</html>- To create the page in the above step, type:
1vi /var/www/html/index.html-
To begin writing inside the visual editor (vi), press i to enter insert mode.
-
To save and close your file, once you have entered the above text, first, click ESC on your keyboard, then type :wq (colon w q ). This will save and close the file.
-
Test your page again from your Client VM; it should now show your custom page.