Changes

Jump to: navigation, search

OPS235 Lab 2 19

4,760 bytes added, 12:30, 24 September 2018
no edit summary
[[Category:OPS235]][[Category:OPS235 Labs]]
{{Admon/caution|THIS IS AN OLD VERSION OF THE LAB|'''This is an archived version. Do not use this in your OPS235 course.'''}}
 
= Fedora 19 Installation Methods (on Virtual Machines: fedora1, fedora2, fedora3) =
You should already have both a '''Fedora installation DVD''' and a '''Fedora LIVE CDDVD'''.
In both cases, the boot media (which you used to load the installation software) and the installation source (the software that got installed) were the same: your CD/DVD provides both. However, the Fedora (and most other Linux distributions) permits you to use any combination of boot media and installation media:
|
! Install. Source
|-
! CD or DVD
! ✓
! ✓
== Required Materials (Bring to All Labs) ==
* Fedora 19 LIVE CDDVD
* SATA Hard Disk (in removable disk tray)
* USB Memory Stick
==Linux Command Online Reference==
Each Link below displays online manpages for each command (via [http://linuxmanpages.com/ http://linuxmanpages.com]):
:* '''virsh''' (Refer to Fedora VirtualiVirtualization Guide link in the "Resources on the Web" section)
:* [http://linuxmanpages.com/man1/gzip.1.php gzip / gunzip]
 
== Resources on the Web ==
|- valign="top"
|
[http://docs.fedoraproject.org/virtualizationen-guideUS/f13Fedora/en-US19/html/ Virtualization_Getting_Started_Guide/index.html Fedora Virtualization Getting Started Guide]
|
* [http://docs.fedoraproject.org/en-US/Fedora/19/html/Fedora_Live_Images/ Fedora 19 Live Image Guide]
* [http://docs.fedoraproject.org/en-US/Fedora/19/html/Installation_Quick_Start_Guide/ Fedora 19 Installation Quick Start Guide]
|
<ol>
<li value="4">Start the virtualization serviceusing the systemctl command: <code>'''systemctl start libvirtd.service libvirtd start'''</code></li> <li>The firewall configuration is altered by the addition of the virtualization software. Restart the firewall so that these changes become active: <code>'''systemctl restart iptables.service iptables restart'''</code></li>
</ol>
{{Admon/cautiontip|Reboot Maybe reboot your fedora host now|Sometimes virt-manager may does not work properly unless you reboot after installing the virtualization software.}}
<ol>
<li value="7">You will be prompted to enter your root password: enter your user (not root ) password and click the "'''Authenticate'''" button.</li>
<li>Record the setup commands in your lab log-book.</li>
<li>Proceed to Investigation 1.</li>
== Investigation 1: Installing from the Fedora19 Desktop Live Disc (950MB) ==
{{Admon/tip|Using an Image instead of a Live Disc|It is recommended that you perform this installation from your Fedora Desktop LIVE CD DVD (950MB). As a matter of interest (for future reference), it is possible to install directly from the ISO file you used to burn your Live CDDVD. There are many Internet tutorials that show the individual how to perform that task.}}
==== Introduction ====
* '''Name:''' fedora1
* '''Boot media:''' Fedora 19 Desktop Live CD/DVD* '''Installation source:''' Fedora 19 Desktop Live CD/DVD
* '''Memory:''' 1024MB
* '''Disk space:''' 15GB
|[[Image:Virt-manager1.png|thumb|125px| '''Virtual Machine Manager:''' Create a New Virtual Machine]]
|[[Image:Virt-manager2.png|thumb|100px|'''Step 1 of 5:''' Create a New Virtual Machine ]]
|[[Image:virtual-manager2a.png|thumb|100px|'''Insert Fedora19 Live DVD''' (Click black dialog box) ]]
|[[Image:virtual-manager3.png|thumb|100px|'''Step 2 of 5:''' Create a New Virtual Machine ]]
|[[Image:virtual-manager4.png|thumb|100px|'''Step 3 of 5:''' Create a New Virtual Machine ]]
# In the Virtual Machine Manger, click on the icon to ''Create a Virtual Machine'' in the upper-left corner: <br />(refer to '''Virtual Machine Manager''' thumbnail above).
# A window will appear with the title ''New VM''. There are five steps to be completed; click '''Forward ''' after each step:
# '''Step 1 of 5:''' Enter the virtual machine (called '''fedora1''') name and select '''Local install media (ISO image or CDROM)''' (refer to ''Step 1 of 5'' thumbnail above).
# '''Step 2 of 5:''' '''Insert the CDROM or DVD containing the Fedora Live Disc image. Wait a moment for the disc to be recognized''', You should see a black dialog box appear that recognizes the CD / DVD. Click on the black box to confirm.
# Click the '''Forward''' Button.
# '''Step 2 of 5:''' '''Insert the DVD containing the Fedora Live Disc image. Wait a moment for the disc to be recognized''', You should see a black dialog box appear that recognizes the DVD. Click on the black box to confirm.
# Make certain that you select "'''Use CDROM or DVD'''".
# Under "Location your install media section", select "'''Use CDROM or DVD'''". Set the ''OS type'' to '''Linux''' and the ''Version'' to '''Fedora 19''' (refer to ''Step 2 of 5'' thumbnail above), then click the '''Forward''' Button.
<!-- {{Admon/tip|Using an ISO image|Instead of using a physical CD or DVD, you can use an ISO image of a CD or DVD. The virtualization software will make this ISO image appear like an actual CD within the virtual machine. Because hard disks are faster then optical discs, this will work faster than an actual CD/DVD.}}{{Admon/note|Choosing the operating system type and version|The purpose of the ''OS type'' and ''Version'' fields is to fine-tune some of the virtual machine settings for best performance. The VM will work even if these are set incorrectly.}} -->
{{Admon/note|Fedora LIVE CD DVD Install Screen Shots Thumbnails|While performing the Fedora 19 LIVE CD DVD install, click on the thumbnails below to provide a '''"visual reference"''' while performing this particular Fedora installation.
}}
{|cellpadding="8" width="100%"
|[[Image:fedoralive1.png|thumb|100px| The Virtual Machine will now startin '''Live''' mode.'''Install to Hard Disk''']]|[[Image:failedtoloadInstallscreen.png|thumb|140px| '''Ignore Installation Summary''' dialog box. Used to select '''Date and close the "Failed To Load" Time''' as well as '''Installation Destination''']]|[[Image:Installationdestination1.png|thumb|140px|'''Installation Destination''' dialog box(confirm and select '''done'''. Search for the panel on the upper-left-hand side of the screen).]]|[[Image:fedoralive2Installationdestination2.png|thumb|140px|Login to the VM and double-click:<br /> '''ApplicationsInstallation Options'''<br />>dialog box within '''System ToolsInstallation Destination'''<br />>process (make suggested settings and select '''Install to Hard Diskdone''').]]|[[Image:selectstorage1Installationdestination3.png|thumb|100px140px|Select '''Specialized Storage DevicesManual Partitioning''' dialog box within '''Installation Destination''' process (click link to '''automatically create partitions''' and proceed to next dialog box).]]|[[Image:selectstorage2Installationdestination4.png|thumb|100px140px|Select Confirm partitions to be automatically created and then click '''Virtio Block Devicedone'''.]]|[[Image:finishcdinstallInstallationdestination5.png|thumb|100px140px|You will get Confirm summary of changes, click '''Accept Changes''', then click '''Begin Installation''' at the ''FirstbootInstallation Summary'' configuration questions during the boot processdialog box to proceed with your installation.]]
|}
<ol>
<li value="1011">When you have completed your installation, click the '''The virtual machine will now startQuit'''button. Select You should return to the default menu item labelled: Fedora Live desktop. </li> <li>Shutdown the Fedora Live session by clicking on the '''Live User'Install to Hard Drive'' button (at the top right-hand corner) and select '''Power Off''', and confirm that you want to power-off. It is a good idea to be patient! Sometimes it may take a few minutes for shut-down!</li>
</ol>
}}
<ol>
<li value="1113">The Installation Summary dialog box will appear (similar to what you encountered in lab1 for your full DVD install). It is assumed that you will be familiar with the general steps on the installation process.
<li>Set the Time Zone for "'''Toronto'''".</li>
<li>When back at the main installation summary menu, select '''Installation Destination'''.</li>
<li>In the Installation Options dialog box Confirm approx. '''10 15 GB''' for the '''Virtio Block Device''' and click the '''Done''' button in the top left-hand corner. '''Note: It may take a few minutes to access the <u>next</u> Installation Options dialog box, so please be patient!'''</li>
<li>Click "'''I want to review/modify my disk partitions before continuing'''", confirm that the partition scheme is set to '''LVM''', and click the '''Continue''' button.</li>
<li>In the Manual Partitioning dialog box, click on the link "'''Click here to create them automatically'''"</li>
<li>Review the automatically created partitions in the next dialog box. Record in your lab log-book the partition names and related sizes, and note the virtual hard disk device name (i.e. vda1).
</li>Click the '''Done''' button at the top left-hand corner.</li>
<li>Confirm the Summary of Changes, and then click the "'''Accept Changes'''" button located on the bottom right-hand side. Note: please be patient, and wait a few minutes until you can access the Installation Summary dialog box. Click '''Begin Installation'''. Note the time that it takes to complete this installation.</li>
<li>During the installation process, set a root password and create a least one regular user account.</li>
</ol>
{{Admon/tip|Screen Lock|If during the install process, the screen locks, drag the mouse upwards, and simply press enter to unlock the screen (no password is required for a '''live user''').|}} <ol> <li value="22">After the installation process has completed, click on the '''Quit''' button. This should return you to the LIVE version of Linux that was running to help install to the Hard Drive. Click on the live username located at the top right-hand corner and power-off the machine.</li></ol>  {{Admon/tip|Virtual Machine Fails to Shutdown.| You should shut down the VM normally as you would shutdown any operating system. If your VM does NOT shutdown normally, you can select from the Virtual Machine Manager window: '''Virtual Machine''' -> '''Shutdown''' -> '''Force Off'''.|
}}
<ol>
<li value="2023">After the installation process has completedMake certain that you remove your Fedora19 Live DVD from your DVD drive. From your ''Virtual Machine Manager'' window, click on start your '''fedora1''' virtual machine (remember to press the '''QuitPlay''' button. This should return you to start the LIVE version of Linux that was running to help install to the Hard DriveVM). Click on the live username located at the top right-hand corner and power-off the machine. It is recommended to completely shutdown the virtual machine, then </li><li>Log into your '''start your fedora1 virtual machine''' from VM as a regular user (you created during the virtual machine manager windowinstallation process).</li><li>Upon first log-in, set your Gnome preferences (you are NOT required to set-up a cloud account for this course).</li> <li>Open a terminal (shell), and log into '''root'''.</li> <li>Issue the following command to set Change your hostname '''host name''' to fedora1: <code>'''hostname fedora1</code>'''</li> <li>Use the <code>hostname</code> command (refer to verify that you set your hostname to "fedora1"[[OPS235 Lab 1]] notes).</li>
<li>Compare the installation time to the amount of time it took to do this type of installation. Record this information in the '''table contained in Investigation 4'''.</li>
 
</ol>
 
{{Admon/note|Network / Service Considerations|Please perform the tasks below in order allow these Fedora systems to be able to communicate with each other. '''Failure to properly perform these operations can cause problems in future labs'''.|
<ol>
<li value="2528">Enable SSH access to your virtual machine with these commands (semi-colon allows commands to be run in sequence):<br /> <code>service '''systemctl start sshd start; chkconfig systemctl enable sshd on.service'''</code></li> <li>Find out the IP address of your virtual machine: <code>'''ifconfig eth0'''</code> </li> <li>Enter the following command on your virtual machine to create a firewall exception to allow ssh traffic into the machine:<br /> <code>'''iptables -I INPUT -p tcp -s0/0 -d0/0 --dport 22 -j ACCEPT'''</code></li> <li>Confirm that you can ssh to your <u>virtual machine </u> from the your host (your main Fedora installationf19host): <code>'''ssh ''IPaddressfedora1_IP_address'''''</code> (determined from step 27 above)</li>
</ol>
* '''Boot media:''' Network installation
* '''Installation source:''' http://belmont.senecac.on.ca/fedora/releases/19/Fedora/x86_64/os/
* '''Memory:''' 768MB1024MB* '''Disk space:''' 15GB20GB
* '''CPUs:''' 1
# Create the VM (called '''fedora2''') as you did with the ''fedora1'' virtual machine, except:
#* In '''step 1 of 5''', set the installation type to '''Network Install (HTTP, FTP, or NFS)'''.
#* In '''step 2 of 5''', provide the location of the software source by providing the URL http://belmont.senecac.on.ca/fedora/releases/19/Fedora/x86_64/os/. Select the system to automatically detect OS type and version. Did it work? If it didn't work, you can move backwards to a previous screen and then manually select the appropriate OS type and Linux version.#* In '''step 2 3 of 5''', set select the appropriate RAM.#* In '''OS Typestep 4 of 5''' , set the hard-drive space to '''Linux20GB'''(<u>NOT</u> 15 GB!)#* In '' and 'step 5 of 5'Version'' to , review the settings, and click '''Fedora 19Finish'''. # Observe the boot process. How is it different from booting from an optical disc (CD/DVD)?
# Start the installation process (make certain to use information in the ''VM Details'' section above).
# When Complete the '''Installation Summary''' sections (Date and Time, Installation Destinatation) like you get to did in the fedora1 install, except in the disk '''partitioning ''' step, select '''Use All Space''' and enable the checkbox labelled '''Review and modify partition layout'''.If an dialog box displays a permissions problemAllow the installation program to automatically create the partitions, then click yes but we will be making changes to proceedthe partition sizes. # On the next screen, change the logical volumes as follows:#* Reduce Select the logical volume (partition) '''root''' (i.e. '''/''' ), and reduce the size of the root LV to '''8000 MB10 GB''', then click '''Update Settings'''.#* Click the '''plus sign''' (i.e. '''Add +''') to <u>add</u> a logical volume with a size of 2000 MB and a mountpoint of called '''/home''' (you can name it whatever you want, and use with a size of '''ext42 GB''' . Note that you can make changes to other items (such as the file-system typelike ext4), but you are not required to do this for this lab.# On Review your changes, click '''Done''', click '''Accept Changes''' to return to the software selection screen, select '''Graphical DesktopInstallation Summary'''.# Make certain that Software Selection is set to '''Gnome Desktop'''On .# Complete the same screeninstallation, select the "Fedora 19 - x86_64" and the "Fedora 19 - x86_64 - Updates". Leave "Installation Repo" selected. set a ''root password'DO NOT'and at least ' enable the "Test Updates" repository'one regular user''account.# Complete Click '''Reboot''' to restart the system. Note: be patient for the installationreboot process! (Force a Virtual Machine shutdown only if absolutely necessary). # Record the time taken to install, and compare this to the time taken by the previous installations.# What was different with your fedora2 install (upon completion) that was different than your fedora1 install? What was similar?# Record this information in the '''table contained in Investigation 4'''.  {{Admon/tip|Adding Repositories|Repositories are online resources that contain operating system programs, application programs, was well as updates (patches). Although you have the basic repositories for Fedora19, you can add other repositories as well for "cutting-edge" programs or special applications that may not be available via the regular repositories.|}} <ol><li value="13">Turn the screen lock feature of in your fedora2 VM by selecting '''Activities''', typing '''settings''', and clicking the system settings icon. Click the Privacy icon, and switch '''lock screen''' from '''ON''' to '''OFF'''. After changing the settings, close the system settings window.</li><li>To add the RPM FUSION repository issue the following command (you can copy and paste to a shell in your fedora2 VM):<br />su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm'</li><li>You will be required to enter your root password.</li> </ol><ol><li value="16">Proceed to Investigation 3.</li></ol> 
'''Answer the Investigation 2 observations / questions in your lab log book.'''
* '''Boot media:''' Network installation
* '''Installation source:''' http://belmont.senecac.on.ca/fedora/releases/19/Fedora/x86_64/os/
* '''Kickstart location:''' http://wwwmatrix.drivehqsenecac.com/fileon.ca/df~murray.aspx/shareID10606286/fileID1269952040saul/Fedora19murray-kickstart.cfg* '''Memory:''' 768MB1024MB* '''Disk space:''' 10GB15GB
* '''CPUs:''' 1
==== Steps ====
# Create the VM as you did with the ''<u>'''fedora2'' virtual machine, specifying a network install as before, except:'</u>'' Virtual Machine.#* In '''step 2 of 5''', after entering use the same URL for the installation source, click on ''Installation Source''. Click to expand the '''URL Options''' control.#* Enter and enter the '''Kickstart ''' URL: http://wwwmatrix.senecac.drivehqon.com/fileca/df~murray.aspx/shareID10606286/fileID1269952040saul/Fedora19murray-kickstart.cfg . Make certain to select the option for the kick-start file to determine the OS type and version and click '''Forward'''.# Specify the RAM amount (1024 MB) and Hard Disk space (15GB) and proceed to next screen.# Verify the installation settings, and then click '''Finish'''.# Observe the installation. Accept default questions, and ignore errors (such as user account error). How is it different from booting from an optical disc (CD/DVD)? What is the purpose of the '''kickstart''' file?
# Complete the installation. Record the time taken to install, and compare this to the time taken by the previous installations.
# What happens when the installation is finished?# '''If installation is finished, but nothing happens when you click the "reboot" button, then force a shutdown'''.# Take a look at the '''kickstart ''' file by clicking on the link in a web-browser (using the URL you entered) and search for "'''password'''" (you may have to <u>determine</u> search for this pattern a couple of times). Determine the '''root password ''' as well as the name '''regular username and password ''' for the first user account'''.# Boot the virtual machine and log in (use the user ID and password information from the previous step). Compare the experience to the first time you booted the other virtual machines.# You can shutdown your text-based fedora3 VM by issuing the following Linux command (as root): <code>'''shutdown'''</code> or <code>'''halt'''</code>. Try to wait a least 2 minutes to see if the VM complete shuts-down. Only force a shutdown if absolutely necessary.# Why do you think you have installed both graphical and text-based VMs for this course?# Record this information in the '''table contained in Investigation 4'''.
'''Answer the Investigation 3 observations / questions in your lab log book.'''
# Shut down all of the virtual machines.
# Change to the directory <code>'''/var/lib/libvirt/images/'''</code>. Note the size of the files in this directory. What do these files contain?
# Make a compressed backup of the <code>fedora3.img</code> file to your home directory with this command: <code>'''gzip <fedora3.img >~'''YourUserId'''/fedora3.img.backup.gz'''</code><br />('''Note: Make certain to use the redirection signs "<" and ">" properly in the command!''')
{{Admon/caution| Make sure the backup is successful!|If there are any error messages, '''DO NOT''' proceed past this point. You're going to destroy your fedora3 virtual machine and restore it using the backup you have created -- if there are any problems with the backup, you will not have a working virtual machine, and will have to re-install it.}}
<ol>
<li value="4">Compare the size of the compressed and original files.</li>
<li>Start the '''''fedora3''''' VM.</li> <li>'''Make certain that you are in your fedora VM, and <u>not</u> in your Fedora main system.!'''</li> <li>Destroy Wreck <u>only</u> your fedora 3 system! Try this command inside the fedora3 virtual machine ('''DO NOT''' do this on your main Fedora system, or you will have to repeat your '''lab1''' and portions of your '''lab2'''!): <code>'''rm -rf /*'''</code></li>. You may see some error messages, but this is normal. <li>Shut down the VM.If you tried to start the Fedora3 VM, it would not boot since all system files have been removed!</li> <li>Restore the original image from the backup in your home directory (type by typing this command carefully): <code>'''gunzip <~'''YourUserId'''/fedora3.img.backup.gz''' >fedora3.img'''</code></li>
<li>Restart the VM. Is it working normally?</li>
<li>Create compressed backups of your other virtual machines.</li>

Navigation menu