In this video learn how to configure networking and local hostname resolution using the /etc/hosts files.
- [Instructor] Now let's boot up all three rhhost VMs and ensure their networks work. Highlight all three VMs and click on Start. This may take a moment or two. When they boot up, log in to rhhost1. Then open a terminal and type in ifconfig. Note the IP address, in my case it's 192.168.1.123.
Now switch to rhhost2, log in, open a terminal and type in ifconfig again. Once again, note the IP address. Lastly, switch to rhhost3. Log in. Open a terminal and type in ifconfig one more time. Be sure that all three VMs have unique IP addresses.
Now let's create an Etsy host file for static name resolution. I'm going to do this on rhhost1 for clarity. Type in clear and then type in sudo, space, vi, space, slash, etc, slash, hosts and hit Enter. Type in your password and hit Enter again. Go into insert mode by pressing the I key, and then go to end of the file, and add a line. In the first column, enter rhhost1's IP address, in my case it's 192.168.1.123.
In the second column, type in rhhost1's fully qualified domain name. And in the last column, type in its alias. Now press Escape, Y, Y to copy it into the buffer, and then press P twice. Go back into insert mode by pressing the I key, and then change the IP address and hosting with the second copy to match rhhost2. Do the same for rhhost3.
Now save the file by pressing escape:x! and hitting Enter. Now let's copy the Etsy host file to the other host. We will be copying the file to the remote hosts as the root user, so be sure to enter the root user's password when prompted. Let's copy the host file to rhhost2. Type in clear then type in SCP, space, slash, etc slash, hosts, space, root@rhhost2, colon, slash, etc, slash, hosts and hit Enter.
Type in the root user's password and hit Enter. Now let's copy the file to rhhost3. Bring your line back, and change rhhost2 to rhhost3, and hit Enter again. Once again, enter the root user's password. Now test name resolution by pinging all three hosts. Type in clear. Then type in ping, space, dash, c1, space rhhost1 and hit Enter. Then bring your line back and change rhhost1 to rhhost2, and hit Enter again.
Lastly, bring your line back and change rhhost2. Change rhhost2 to rhhost3, and hit Enter again. If it successfully pings the other hosts by hosting, you can continue with this course. If not, go over the steps in this video until you get it to work. Before, we end this video, let's create snapshots of all of our VMs by selecting the VM window and pressing the host plus T key. Name the snapshots, Hosts Configured and hit Enter. Now go to rhhost2 and do the same thing.
And lastly, go to rhhost3, and create the snapshot there as well. You can now shut down all VMs, if you wish, by clicking the close gadget and selecting power off and then click the revert to snapshot checkbox.
- Overview of email and mail agents
- Installing Postfix
- Postfix services and commands
- Postfix configuration files
- Configuring a mail service
- Creating a mail gateway