Changes

Jump to: navigation, search

OPS235 Lab 1 - CentOS7 - SSD

4,332 bytes added, 08:18, 11 June 2016
no edit summary
=INVESTIGATION 1: CREATE HOST AND INSTALL FIRST VIRTUAL MACHINE (c7hostcentos1)=
For the next 3 investigationsIn this lab, you will learn how to install your Centos Full DVD onto your removable hard diskas a virtual machine using the VMware application. You will customize Make certain to record your observations of this install to setup several separate partitions:<ul><li>in the comparison chart for '''/centos1''' (The "root" partition)</li><li>in your '''/home''' (Store regular user accounts)</li><li>'''/var/lib/libvirt/images''' (store virtual machine images to be created in lab2)</li><li>logbook'''swap''' partition (Virtual Memory)</li></ul>.
Make certain ===Part 1: Using VMware Workstation 12 to record your observations of this install in the comparison chart for '''c7host''' in your lab2 logbook.Create a New Virtual Machine (VM) ===
===Part 1'''<u>centos1 VM Details: Start Installation ===</u>'''
*'''Name:''' centos1
*'''Boot media / Installation:''' CentOS7 Full Install DVD
*'''Memory:''' 16GB
*'''Disk space:''' 40GB
*'''CPUs:''' 1
::'''<u>Host Machine Details:</u>'''
 
::*'''Name:''' c7host
::*'''Boot media / Installation:''' CentOS7 Full Install DVD
::*'''Memory:''' 16GB
::*'''Disk space:''' 128GB (or higher)
::*'''CPUs:''' 1
{| width="40%" align="right" cellpadding="10"
|- valign="top"
|colspan="2"|{{Admon/important [[Image:vmware-2.png|thumb|right|500px|You're supposed ''Main WMware application window''' in order to use this hard drive only for this course| But if you really need to use it for two courses, and the professor for the other create a new '''Virtual Machine''' (probably windows'''VM''') course will allow it - ask your professor for help with partitioning.}}]]
|- valign="top"
|
|}
Before you can install your Centos Full Install DVD onto your Virtual Machine, you must first create a storage container which is a virtual machine that will provide a platform for you to install your Centos operating system.  '''Perform the Following Steps:''' # Refer to this listing of installation screenshots if you need a reference:<br>[ [http://matrix.senecac.on.ca/~murray.saul/ops235/installationinstall-vm/ installation screenshotsscreen-shots] ]<br># Insert Power up the computer in your Seneca lab in '''removable SATA hard diskWindows''' into and download the drive trayfollowing link for the Centos7 Full Install DVD image: http://belmont.senecacollege.ca/pub/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1511.iso# Set On your Seneca computerlab workstation, click the ''s drive selector switch to 'Windows Menu''external'button and type '' (a.k.a 'VMware'position #4'').# Power up the computer and insert the There are two VMware products: ''VMware Workstation''and 'CentOS 7 Installation DVD'VMware Player'' into . Run the DVD drive, then power-off computer.# '''Newer computer modelsVMware Workstation''' are application.# Click on the item labelled '''HP Z230Create a New Virtual Machine'''.<br><br>'''NOTESNOTE:'''We will just be creating a "shell" for the VM the contain our Centos7 Linux operating system. This will allow us to configure the VM properly so it will boot-up properly in our Seneca labs.<ulbr><libr>If you are using # Select the '''Custom (advanced)''' for the Virtual Machine Configuration setting and click '''Next'''.# Click Next at the next screen to proceed.# Select the '''I will in<u>newers</u>tall the operating system later''' option and click ''' modelNext'''.# In the next screen, allow select '''Linux''' as the '''Guest Operating System''', and '''CentOS 64-bit''' for the OS ''version'' and click '''Next'''.# Enter '''centos1''' for the computer to boot up (''<u>withoutV</u> pressing F10 key) irtual machine name'' and note the location where the image will be stored on your Windows machine and click '''Next'''.# Click '''Next''' to boot accept the default number of processors.# In the following screen, change the Memory from DVD''1GB'' to '''2GB''' (i.e. '''2018 MB''') and click '''Next'''.</li><li>Refer # Click '''Next''' to accept the comparison chart in lab2 lab logbook, and fill in various installation information default (i.e. NAT) for the network type.# Click '''c7hostNext''' while you perform to accept the installation default (such as time it took to perform a full install, installation options, etci.e. LDI Logic)for teh SCSI Controller type.<br><br></li></ul><ol># Click Next to accept the default (i.e. SCSI for the virtual disk type. <li value="6">Power on # Change the computer again, Maximum Disk Size from ''20GB'' to '''40GB''' and after booting from click '''Next'''.# Accept the CD, select from default Disk File name (i.e. centos1.vmdk) and click Next.# Quickly review your VM settings in the installation menu: final setup wizard dialog box and click '''Install Centos7Finish'''.<br><br>Note: If you experience unreadable display after you boot into # You should now see your installed system, you can redo centos1 VM appear in the main VMware Workstation window. In the installleft-hand-side, but select from '''right-click''' on the install menu: ''<u>Troubleshooting</u>'centos1''' and then VM under My Computer. In the context menu, select ''<u>Install in Basic Graphics Mode</u>'Settings'''.<br><br></li>Your centos1 Settings dialog box should appear. <li>Next, you will be prompted for a language# Click the '''options''' tab and then click the Advanced option at the bottom of the list. In On the first screenright-hand side, select language '''Englishclick''' the checkbox to enable the option to ''' Boot with subselection EFI instead of BIOS'''English-Canada. Then click on the '''Hardware''' tab, and then click select the '''ContinueCD/DV (IDE)''' button on device and select in the bottom right-hand screen.side select the radio button for the '''use ISO I<u>m</liu>age file'''. Click the '''Browse''' button and specify the path of your downloaded Centos7 Full install DVD (most likely file is contained in your Downloads folder). When finished, click on the OK button.# You will return to your centos1 VM. Click the play button near the top to boot your centos1 VM for the first time.  
<li>The '''===Part 2: Install Summary''' should now appear. This screen allows the installer to customize their Centos7 system prior to installation.</li> <li>Configure the following installation settings from the ''Install Summary Screen'':<br><br><b>DATE & TIME:</b><ul><li>Click Centos on the Map to select Toronto area (you may also select from the drop-down menu section)</li><li>Click the <b>DONE</b> button at the top-left corner to finish and return to the Installation Summary screen.</li></ul><br><b>NETWORK & HOSTNAME:</b><ul><li>Select the default Ethernet connection and click the button on the top right-hand side to change the setting from <b>OFF</b> to <b>ON</b>.</li><li>At the bottom left-hand corner type the hostname: <b>c7host</b> (all lowercase letters)</li><li>Review your settings, then click the <b>DONE</b> button at the top-left corner to finish and return to the Installation Summary screen.</li></ul><br><b>SOFTWARE SELECTION:</b><ul><li>Select the software packages labelled: <b>Gnome Desktop</b></li><li>Click the <b>DONE</b> button at the topNewly-left corner to finish and return to the Installation Summary screen.</li></ul><br></li> <li>Although the Centos installtion program can provide suggestions on how to partition your hard disk, you will be customizing partitions for your hard disk. This custom partitioning is important since it will have consequences on future labs that you perform (especially for lab2).</li></ol>Created VM ===
The next step is to perform a custom installation for your Centos7 virtual machine using the Centos7 Full DVD. Upon creation of your centos1 virtual machine, The VMware Workstation application will automatically simulate a "boot" to allow you to complete the installation process to create the Centos7 operating system on that virtual machine.
=== Part 2'''Perform the following steps: Custom Partitioning ==='''
# Select from the installation menu: '''Install Centos7'''.
# Next, you will be prompted for a language. In the first screen, select language '''English''' with subselection '''English-Canada''' and then click the '''Continue''' button on the bottom right-hand screen.
# The '''Install Summary''' should now appear. This screen allows the installer to customize their Centos7 system prior to installation.
# Configure the following installation settings from the ''Install Summary Screen'':<br><br>
::<b>DATE & TIME:</b><ul><li>Click on the Map to select Toronto area (you may also select from the drop-down menu section)</li><li>Click the <b>DONE</b> button at the top-left corner to finish and return to the Installation Summary screen.</li></ul><br>
::<b>NETWORK & HOSTNAME:</b><ul><li>Select the default Ethernet connection and click the button on the top right-hand side to change the setting from <b>OFF</b> to <b>ON</b>.</li><li>At the bottom left-hand corner type the hostname: <b>centos1</b> (all lowercase letters)</li><li>Review your settings, then click the <b>DONE</b> button at the top-left corner to finish and return to the Installation Summary screen.</li></ul><br>
::<b>SOFTWARE SELECTION:</b><ul><li>Select the software packages labelled: <b>Gnome Desktop</b></li><li>Click the <b>DONE</b> button at the top-left corner to finish and return to the Installation Summary screen.<br><br></li></ul>
{|width="40%" align="right" cellpadding="10"
|- valign="top"
|
{{Admon/tipnote|Mount Points and Linux File System Types|Similar to other Operating Systems like windows '''fat''' / '''vfat''' / '''ntfs''' file system types, it is good to know a few common file system types in Linux for comparison:<br><ul><li><b>xfs:</b> &nbsp; Newer filesystem (fast transfer rates for large files, Journaling)</li><li><b>ext4:</b> &nbsp; Newer filesystem supporting large files and Journaling (used in for this lab)</li><li><b>ext2:</b> &nbsp; Stable filesystem popular for databases (no journaling)</li></ul>|
}}
|-
[[Image:partition_verification.png|thumb|right|550px|Carefully verify partition mount-names and sizes prior to proceeding with install. Check [http://matrix.senecac.on.ca/~murray.saul/ops235/installation/ installation screenshots] link for verification.]]
|}
#::'''INSTALLATION DESTINATION:'''::*From the installation summary screen, click '''Installation Destination'''.#::*In the installation destination screen, select the destination option: '''I will configure partitioning''' and then click '''Done'''.#::*The manual partitioning screen should appear.#::*If you have used your hard disk for previous Linux (Centos) distributions, you should remove them. Click on the distribution, and for each partition, select the partition and click the remove button (minus sign) and confirm deletion.#<span style="background-color:yellow">Change :Remember that the option '''New mount points will use sizes are recorded in MB (eg. 20 GB = 20000 MB) and you should multiply GB by a factor of 1024 to get the following partition schemecorrect size. (eg. ''' from '''LVM''' to 20 GB x 1024 = 20480 MB''')<ubr>Standard Partition</ubr>''' (you will not be using LVM for your c7host machine)</span>.#Before you proceed with creating partitions, let's see the partitions that we need to create for our host computer:<ulol><livalue="5">'''Boot-efi''' Partition We will now create the root (standard /) partition: . '''2954 bytesClick on the add button (plus) sign''').</libr></li>Primary Partitions (ext4):<ul><li>In the '''20GBAdd a New Mount Point''' for , click the drop-down button and select '''/''' (i.e. "root")<boot/li><li>'''30GBefi''' for /home</li><li>the mount point and type '''60GB2954''' for as the desired capacity, and then click '''/var/lib/libvirt/imagesAdd mount point''' .</li></ul> </li><li>Swap Partition:<ul><li>When you return to the main screen, make certain that this mount point is a '''16GBStandard Partition''' (Note: "swap" must be selected from the drop down menu)and </liu>not</ul></li></ul><bru>''LVM'NOTE:''' Remember that the sizes are recorded in MB (eg. 30 GB = 30000 MB) and you should multiply GB by a factor of 1024 to get the correct size.<br> (eg. '''30 GB x 1024 = 30720 MB''')<br><br/li>#We will now create the root (/) partition. '''Click on the add button (plus) sign'''.<brli>#In Add another mount point, but in the '''Add a New Mount Point''' screen, select '''/''' as the mount-point (either by typing or selecting from drop-down menu), and enter '''3072020480''' in for partition size and click '''Add Mount Point''' button.</li># <li> You will return to the previous dialog box.<br><span style="background-color:yellow">For the '''/''' partition, change the file-system type from '''xfs''' to '''ext4''' and make certain that the Device Type is set to Standard Partition (<u>notLVM</uspan> LVM). You need to repeat this procedure for the ''/home'' and ''/var/lib/libvirt/images partitions'' as well)</spanli>.#<li>Repeat the same steps above for the '''/home''' partition and '''/var/lib/libvirt/images''' partition(calculate the equivalent size for 10GB (i.e. multiplied by 1024). You need to type the ''</var/lib/libvirt/images'' partition since it does not appear in the drop-down menu.li>#<li>Recheck each of the created partitions, and make certain that the file-system type is set to ''ext4'' and the Device Type is set to should be ''Standard PartitionLVM''.</li>#<li>Finally, add a swap partition (Mount Point: swap) for '''16 GB'''.</li>#<li>Check that your partition settings are correct (you can ask your instructor or lab monitor to confirm), and then click '''Done''' (possibly '''<u>twice</u>''') in order to proceed<br><br><span style="background-color:yellow">'''NOTE:''' If there is an error message associated with your created partitions, you may need to add a '''/boot/efi''' partition (as a new mount). The capacity should be: 2954MB (i.e. 2,954 MB). Once finished, click '''Done'''.<spanli><brli><br>#A Summary of Changes screen will appear to show the partitioning operations that will be created. Click the '''Accept Changes''' and click '''Begin Installation''' in the Installation Summary screen to proceed with the installation.</li>#<li>Start timing your host '''centos1''' virtual machine installation.</li></ol>
|[[Image:completed.png|thumb|right|500px|This screen indicates that installation is complete. You should remove the install DVD and confirm Centos7 boots from your removable hard drive. ]]
|}
 
'''Perform the Following Steps:'''
 
#During the installation process, you will required to create a '''root password''' (for administration access) and create a '''regular user account'''. Click on '''Root Password''' and enter your root password. Think of an appropriate password and record that password somewhere in case you forget! An indicator will appear to show you how secure your password is. Retype your root password and click '''Done''' (you may have to click Done <u>twice</u> if your password is not considered to be a strong password).
#You need to create a regular user account. This account will be used to graphical log into your host machine. It is never recommended to graphically log into a graphical Linux/Unix system as root. It is better to log into a regular user account, then run a command to login as root (you will learn how to do this later in this lab).
#<span style="background-color:yellow">Remember to record this host installation information in the '''installation comparison chart''' in the lab2 logbook</span>.
#When installation is complete, you will notice a message at the bottom of the screen stating: '''CentOS is now successfully installed and ready for you to use!'''
#Click the '''Reboot ''' button. Your DVD will <u>briefly</u> open in the DVD drive bay. Make certain to remove this installation DVD so that Centos will boot from your hard drive.
#After the system reboots, a boot menu should briefly appear, then prompt the user to accept the License Information (this is only a one-time occurrence).<br> In order to accept the license agreement, issue the following keystrokes:<br><br>'''1''' followed by ENTER (to select the license agreement prompt<br>'''2''' followed by ENTER (to accept the license agreement)<br>'''c''' followed by ENTER (to save the selection)<br>'''c''' followed by ENTER (a second time to continue booting into the system)<br><br>
#The system should then graphically prompt the user to login with their regular user account. Click on your '''regular user account name''' and '''enter your regular user password'''.<br><br>
#The last phase of the installation process should now run:<ul><li>Confirm English as the default input source and click '''Next'''.</li><li>Skip the creation of online accounts by clicking '''Next'''.<li>Start using your installed Linux system by clicking '''Start Using CentOS Linux'''.</li></ul><br>
#Stop timing your installation and note the amount of time that your installation took to perform. Also take the time to fill in the c7host centos1 section of the installation comparison chart in your lab2 logbook.#Open a web-browser and check to see if you can connect to the Internet.  === Part 4: Backing up Virtual Machines to a USB Key ==={{Admon/caution|VMs MUST be Backed up to USB key before Leaving Seneca Labs|It is absolutely essential that you backup your virtual machine image to USB key after completing your virtual machine session at Seneca Labs, or you will lose your work! Make certain to PROPERLY follow the instructions to copy and archive the required files to your USB key as opposed to using your USB key directly, which can cause problems.}} As mentioned above, you need to backup your VM image files for ALL of your virtual machines that you create in Seneca's computer labs via a USB key to restore and continue your virtual machine sessions in future lab sessions. You can also move a virtual machine created in a host to another host for VM Workstation. For example, you can move saved image files to your home computer to complete labs, etc. Students can download the license key for VM Workstation 12 - refer to the following link for details: [ link ] '''Backing Up VM to a USB Key:''' '''Perform the following Steps:''' #Shut down your centos1 VM.#Determine the location that contains your centos1 virtual machine files. Here are some common locations for various Operating Systems:  <table cellspacing="0" cellpadding="5" width="55%" style="border-top: thin solid black;margin-left:45px;"> <tr valign="top>  <td style="border-bottom: thin solid black;font-weight:bold;background-color:#ffffff;">'''Operating System (Platform)'''</td> <td style="border-bottom: thin solid black;font-weight:bold;background-color:#ffffff;">'''VM Directory Pathname'''</td> </tr> <tr valign="top"> <td width="30%" style="border-bottom: thin solid black;">Windows</td> <td style="border-bottom: thin solid black;">C:\Users\username\My Documents\My Virtual Machines\</td> </tr> <tr valign="top"> <td width="30%" style="border-bottom: thin solid black;">Linux</td> <td style="border-bottom: thin solid black;">/home/userid/vmware</td> </tr> <tr valign="top"> <td width="30%" style="border-bottom: thin solid black;">Mac OS/X</td> <td style="border-bottom: thin solid black;"></td> </tr> </table>  [[Image:moved.png|thumb|right|300px|When starting the VM, you need to respond to the system prompt to confirm that you moved the VM to another platform.]]<ol><li value="2">Create a zipped archive of the '''centos1.vmx''' file located in the '''centos1''' VM directory.</li><li>Copy the zipped archive to your USB key.</li></ol> '''Restoring a VM from a USB Key:''' :Perform the following Steps: <ol><li>To move work to your computer system running VMware Workstation, copy the archived file from your USB key to the appropriate VM storage location.</li><li>Restore the archived file</li><li>Launch the other VMware Workstation.</li><li>Select '''File''' -> '''Open''' -> '''Browse''' to select the VM image in the centos1 subdirectory and a file labeled: '''centos1.vmx'''</li><li>When starting the VM, you need to respond to the system prompt to confirm that you moved the VM to another platform.<br><br></li><li>Proceed to Investigation 2 to obtain basic information from your newly installed centos1 virtual machine.</li></ol>
'''Answer Investigation 1 observations (all parts and questions) in your lab log book.'''
 
=INVESTIGATION 2: COMMON POST-INSTALL TASKS=
13,420
edits

Navigation menu