Open main menu

CDOT Wiki β

Changes

OPS235 Lab 6 - CentOS7 - SSD

No change in size, 02:53, 12 June 2016
no edit summary
<li value="13">We will now reconfigure each of our VMs to use our new virtual network '''network1'''
<ol type="a">
<li value="1">Let's start with our '''centos2 centos1 VM'''. Double-click on your '''centos2centos1''' VM, but instead of running the VM, click on the '''view''' menu, and select: '''Details'''<br />(Note: the Virtual Machine window will appear - do not start virtual machine)</li>
<li>In the '''left pane''' of the Virtual Machine window, select '''NIC:''' and note that this NIC is on the "default" virtual network</li>
<li>Change it to '''Virtual Network network1: NAT''' (i.e. the VPN that you just created) and click the '''Apply''' button.</li>
== Part 2: Configuring VM Network Setup Graphically ('''system-config-network''')==
For Parts 2 and 3 of this investigation, we will be using a graphical tool to connect our '''centos2centos1''' and '''centos3''' VMs to our private network.
[[Image:new_network_dialog.png|right|thumb|250px|Although the private network has been setup via the '''Virtual Machine Manager''', each virtual machine requires to change its own network setting individually (either '''graphically''' or by '''command line''').]]
# On your '''c7host''' machine, run <b>ifconfig</b> and make note of the IP address assigned to the '''virbr1''' (i.e. "Virtual Bridge) interface. This will be the default gateway and DNS server for your VMs.
# Start your '''centos2centos1''' VM and login.# Within your centos2 centos1 VM, click '''Applications''' menu, then select '''System Tools''', and then '''Settings'''.
# In the ''Settings'' Dialog Box, click on the '''Network''' icon.
# For the '''Wired''' connection, click the '''settings''' button (The <u>icon</u> appears as a <u>gear</u> located at the bottom right-hand corner of the dialog box).
# When finished, check your settings, and then click the '''Apply''' button.
# Open a terminal and issue the '''ifconfig''' command to confirm the IP ADDRESS settings change.
# Verify that '''centos2centos1'''VM is now connected to the VPN by issuing the following command from your '''c7host''' machine:<br><b><code><span style="color:#3366CC;font-size:1.2em;">ping 192.168.235.11</span></code></b>
'''Answer Part 2 observations / questions in your lab log book.'''
== Part 3: Backing up Only Recent File Changes ==
This part is a repeat of part2, except we will be demonstrating how to use the '''find''' command to backup recent changes to files. In this case, we will save date/time stamp information in a file, configure to connect '''centos3''' to the network, run the '''find''' command, and prove that the incremental backup worked (showing the files created as a result of the configuration of centos2 centos1 to the VPN).
{| width="40%" align="right" cellpadding="10"
|}
# Keep your '''centos2centos1''' VM running (you will need it running later in this lab).
# Start the '''centos3''' VM and login
# Before we configure centos3 network configuration, we should create a timestamp file that can be used to see which files have changed as a result of using the GUI tool. Issue the following command:
#: <b><code><span style="color:#3366CC;font-size:1.2em;">date > /tmp/timestamp</span></code></b>
# Run the network configuration tool and enter the following static configuration in the same way that you configured '''centos2centos1'''.
#* IP Address: '''192.168.235.12'''
#* Subnetmask: '''255.255.255.0'''
Our centos4 VM is a '''text-based only''' system, thus we cannot use a graphical tool to configure centos4 to connect to our private network. Therefore we will learn how to perform this task by using command-line tools.
# Leave your '''centos2centos1''' and '''centos3''' VM running, but start your '''centos4''' VM, login, and su to '''root'''.
# Use the command '''ifconfig''' to list active interfaces, you should see one with a name of '''eth0''' or a similar name.
# To configure your card with a static address use the following command:
# Edit the '''/etc/hosts''' file on <u>each</u> of the '''virtual machines and host machine'''. Add the following contents to the <u>bottom</u> of the '''/etc/hosts''' file:<br><br>
#::192.168.235.1 c7host
#::192.168.235.11 centos2centos1
#::192.168.235.12 centos3
#::192.168.235.13 centos4<br><br>
13,420
edits