Open main menu

CDOT Wiki β

Changes

OPS235 Lab 2 - CentOS7 - SSD

1,028 bytes added, 09:31, 13 June 2016
no edit summary
=== Part 21: Installing from a Downloaded Image (Centos7 LIVE CD) ===
{| width="40%" align="right" cellpadding="10"
|- valign="top"
|{{Admon/tip|Perform Downloads and Network installs at Seneca|'''It is recommended to perform this lab in one of Seneca College's labs'''. This lab uses servers which are on the Seneca network and which are not available from other locations (such as your home). If you attempt this lab from another location, adjust the belmont.senecac.on.ca URLs to point to another mirror server -- note that you may need to change the directory name as well as the server name. The installation of the '''centos3''' virtual machine <u>must</u> be done at Seneca.}}
|-
|
{{Admon/important|Removing and Recreating VMs|If for some reason the user wants to remove a Virtual Machine, they can right-click the VM, and select delete in the Virtual Machine Manager. It is recommended to '''"delete the image file" in the remove VM dialog box when removing and then recreating a VM'''. Note: If you fail to properly remove the VM image file, it may affect the hard disk size for the new VM (i.e. use the old smaller size. Make certain to remove that VM image file prior to recreating the VM.|'''}}
|}
 
 
{{Admon/important|Restart your Host Machine Again|You must restart your '''c7host''' machine again, prior to creating your virtual machines. If you fail to do this, you may experience virtualization network problems!}}
:'''VM Details:'''
:: '''VM Name (and hostname):''' centos1
:: '''Boot media:''' LIVE CD Image (downloaded iso file)
:: '''Installation source:''' Downloaded Centos7 LIVE CD image (http://belmont.senecac.on.ca/centos/7/isos/x86_64/CentOS-7-x86_64-LiveGNOME-1511.iso)
:: '''VM Image Pathname:''' /var/lib/libvirt/images/centos1.img
:: '''CPUs:''' 1
You do not need # Make certain you used the wget command to burn a DVD for download the Centos7 install image. You can simply download an image LiveGNOME iso file from the Belmont server (.isofrom previous instructions), and refer to this downloaded image in order to install the Linux OS. This is the second method of installation that we will now investigate. # Open a web-browserIn the Virtual Machine Manger, click on the link below icon to save on your Windows machine ''Create a Virtual Machine'' in your Seneca Lab (Downloads section).<br><br><b><code><span style="colorthe upper-left corner:#3366CCA window will appear with the title ''New VM''. There are five steps to be completed;font-sizeclick Forward after each step:# '''Step 1.2em;">httpof 5://belmont.senecac.on.ca/centos/7/isos/x86_64/CentOS-7-x86_64-LiveGNOME-1511'''Select '''Local install media''' and click '''Forward'''.iso</span></code></b><br><br># Launch '''Step 2 of 5:''' Select '''Use ISO Image''', click the '''Browse''' button, and then the VMWare Workstation application'''Browse Local''' button. Navigate to the location of the downloaded Centos7 LIVE CD image, select the image file and click '''Open'''. When finished, click Forward to proceed.# Click on '''Step 3 of 5:''' Set the icon memory to ''Create a New Virtual Machine'2048 MB''' and select the number of CPUs to '''Custom (Advanced)1'''. [[Image:vm-path.png|thumb|right|300px|When your It is extremely important to '''centos1correctly specify the VM image file path-name''' LIVE machine boots. Double-up, immediately double-click on check the '''Install to Hard Disk''' icon to run spelling of the installation program.path-name before proceeding!]]<ol><li value="47">'''The Step 4 of 5:''' This next step creates a disk file that will be used to simulate the virtual machine will now start's disk drive. Select a size of '''10 GB'''.Click on</libr><li>Immediately double-click on the icon called '''Install to Hard DiskSelect managed or other existing storage'''.and type the VM image file pathame:</libr><li>Start timing your installation and making notes for '''/var/lib/libvirt/images/centos1.img''' virtual machine in (make certain that the pathname is correct) and then click '''installation comparison chart in lab2 logbookForward'''to proceed.</li><li>Select your downloaded iso Centos7 Gnome LIVE image (under ''Downloads'Step 5 of 5:''' folder) and click Enter the virtual machine name: '''Nextcentos1'''. BasicallyReview the VM information, you perform the same steps is in lab1 (i.e. select and click '''Custom (Advanced)Finish''' with .<br><br></li><li>'''2 GB of RAMThe virtual machine will now start''', the VM name will be called - start timing your installation and making notes for '''centos1''' virtual machine in the installation comparison chart in lab2 logbook. The virtual machine is running from the live disc at this point, and no software has been installed on the Hard Disk size will be ''hard drive'10 GB''' (not 20GB)of the virtual machine. The point of a live disk is to allow you to test the distribution to see whether you like it without installing to the hard-drive first. </li><li>When your VM boots-up, Double-click '''Install to Hard Drive'''. The installation program, similar to the one used when installing CentOS in Lab 1, will appear. You basically perform the same installation operations for this VM including for '''Date & Time''', '''Network & Hostname''', and '''Installation Destination'''. Make certain to use the '''hostname''': '''<u>centos1</u>''' as opposed to ''c7host'') for this installation. (with a few slight differences).</li><li>For '''Installation Destination''', select the destination option: '''I will configure partitioning''' and then click '''Done'''. Make certain that the '''Partition Scheme''' is set to '''LVM''' and then click on the link: '''Click to Create Automatically'''. '''Done'''. Check to make certain that the root partition has file system type: '''ext4'''.</li><li>Accept the changes and then click '''Begin Installation'''.<ol type="a"><li>You will be required to make selections very similar to what you did in lab1.</li><li>While the system is installing, take a few minutes to record your observations (including slight differences with centos1 install as opposed to c7host install).</li><li>When the installation process is complete, note the time required to install this system and record in the installation comparison chart of your lab2 logbook.<br><br></li></ol></li><li>Power-off your Centos7 LIVE system.</li><li>Restart your centos1 VM, and enter 1, 2, c, c, like you did in lab1You should notice that the Centos7 boot menu appears. Either press '''ENTER''' to start or wait for it to start automatically.</li><li>Finish the final steps in the setup process (like you did in lab1).</li><li>It is recommended that you #You may want to turn off the screen-saver (like you did in Lab1): [http://zenit.senecac.on.ca/wiki/index.php/OPS235_Lab_1_-_CentOS7#Turn-Off_Screen_Saver_Lock Customizing_Your_Account How to Turn-off Screen Saver Lock(lab1)]).</li></ol>{| width="10040%" align="right" cellpadding="10"
|- valign="top"
|colspan="2"|{{Admon/important|Important Network / Service TasksConsiderations|Please perform the tasks below in order allow these CentOS systems to be able to communicate with each other. '''Failure to properly perform these operations can cause problems in future labs'''.|
}}
|}
<ol>
<li value="2013">Make certain to '''disable SELinux for centos1''' ([http://zenit.senecac.on.ca/wiki/index.php/OPS235_Lab_1_-_CentOS7_-_VMware#Disable_SELinux_and_Perform_Software_Updates refer to lab1])</li><li>Start and enable the Enable SSH server to allow access to your virtual machine with these commands (semi-colon allows commands to be run in sequence):<br /> <b><code><span style="color:#3366CC;font-size:1.2em;">systemctl service sshd start sshd; systemctl enable chkconfig sshdon</span></code></b></li>
<li>Find out the IP address of your virtual machine and the name of your Ethernet network adaptor: <b><code><span style="color:#3366CC;font-size:1.2em;">ifconfig</span></code></b> </li>
<li>Enter the following command on your virtual machine to create a firewall exception to allow ssh traffic into the machine:<br /> <b><code><span style="color:#3366CC;font-size:1.2em;">iptables -I INPUT -p tcp -s0/0 -d0/0 --dport 22 -j ACCEPT</span></code></b></li><li>If you are logged in as root, logout to your regular user account.</li><li>Confirm that you can ssh to your virtual machine from the host (your main CentOS installation): <b><code><span style="color:#3366CC;font-size:1.2em;">ssh regularuserid@IPaddress</span></code></b> (where '''regularuserid''' is your regular user login id, and '''IPaddress''' is the '''IP_ADDRESS''' of your '''centos1''' VM!).</li></olli{{Admon/important|Remember Make certain to Backup your VM '''disable SELinux for centos1''' (refer to USB Key!|Remember that you need to backup lab1)</li><li>Adjust your screen-saver settings and run a '''centos1yum update''' on your centos1 VM before proceeding to your USB key before you leave your Seneca lab, or you will lose your work!}}''Part 2''</li></ol>
== Part 2: Installing from a Network ==
{| width="40%" align="right" cellpadding="10"
13,420
edits