Changes

Jump to: navigation, search

OPS335 Installation Lab

735 bytes removed, 16:12, 8 January 2019
m
Replacing deprecated command with current one.
=== Required materials ===
*Centos 7 Full Installation DVD.
*One SATA hard disk in a removable drive tray Solid State Drive (minimum 250GBSSD), mininmum capacity: 240 GB (USB 3.0). It is strongly advised you dedicate a drive for this course only.
*USB drive (8 GB+) for creating and storing backups (Virtual Machines, configuration files).
*OPS335 Lab Log-book (Previous OPS235 log lab-book as an additional resource).
==INVESTIGATION 1: HOST INSTALLATION==
=== Installation instructions for Centos CentOS 7 ===# It may be advisable to obtain a <u>newer version</u> of the Centos CentOS 7 Full Installation DVD since there may be improvements since the last version from when you took OPS235.# '''Note:''' There are two versions of OPS235 lab1 if you are using for reference for either a SATA removable hard drive or a Solid State Drive (SSD). Both labs are identical in basic content, except the SSD labs uses VMware Workstation 12 Pro to create the host machine. For an SSD drive, you would also need to setup nested VMs when you setup KVM in lab2 (i.e. follow instructions in OPS235 labs CAREFULLY).<br><br># Download and burn on a DVD a copy of the Centos CentOS 7 installation DVD (64 bit edition) from the Centos CentOS web site or the Belmont server.<br>'''Note:''' we'll be using the 64 bit version of Centos CentOS because all of our lab computers are equiped equipped with Intel 64 bit mainboards and CPUs, and any computer you bought in the last few years for yourself will be 64bit as well.<br><br>#* '''Seneca's mirror of CentosCentOS:''' httphttps://belmontmirror.senecacollege.ca/pub/centos/7.2.1511/isos/x86_64/CentOS-7-x86_64-DVD-15111810.iso<br>This is very fast, but is only accessible from within Seneca's network - you can't access this from home. You can burn this disc on the machines in the Open Lab.)<br><br>#* '''Outside Seneca College link (available from any Internet connection):<br>''' http://archivemirror.kernelnetflash.orgnet/centos-vault/7.2.1511/isos/x86_64/CentOS-7-x86_64-DVD-15111810.iso<br /><br># Insert You need to refer to your removable harddrive into the OPS235 notes in order to install your host machine and boot from the DVD.<br>Here is a direct link:<br> [https://wiki.cdot.senecacollege.ca/wiki/OPS235_Lab_1_-_CentOS7_-_SSD2 OPS235 - Lab1]
{{Admon/tip |Boot order|Some of our machines' boot order is configured to be Harddrive first, DVD second. Which means you won't be able to boot from the DVD if you already have an operating system installed on your drive.}}
<ol>
<li value=54>Customize your installation following these guidelines:
<ul>
<li>'''Turn on networking''' and use '''host''' as the '''hostname'''.
<li>Select the hard disk and indicate "I will configure partitions" and click done.
<li>Click the link to '''create partitions automatically''' (this will give a typical layout with /, /boot, /boot/efi, /home, etc).
<li>Free up at least '''100GB''' of disk space by shrinking the '''/home''' partition (At least '''40GB''' GB for root (/) and '''40GB'''GB for /home). Since your machine will have far fewer users and more virtual machines than a typical installation, we will need that space elsewhere.
<li>Create a new logical volume for '''/var/lib/libvirt/images''' and give it the space made available by shrinking /home (You will need enough space for up to 10 virtual machines at 8GB each plus room to compress/extract images).
<li>Make certain that the existing partitions have the file system type '''ext4''' (not xfs).
=== First boot ===
# In the current version of CentOS the first time you boot your system a graphical licence prompt comes up. To save you some stress, here are the keys you need to press to get past it::: '''1''' ''ENTER'':: '''2''' ''ENTER'':: '''c''' ''ENTER'':: '''c''' ''ENTER''<br><br>
<ol><li value="2">Log in and check that you have access to the internet. If you don't - you need to get the network interface to come up on boot. Edit '''/etc/sysconfig/network-scripts/ifcfg-eno1''' (the name of the interface may be different) and change '''onboot''' to '''yes'''.<ul><li>You can then use the '''ifup'''/'''ifdown''' commands to reset your network configuration or you can just reboot.</li></ul></li><li>Make certain that '''SELinux''' is '''enforcing''' for security reasons (this should be the default). To make it ''enforcing'', simply edit the '''/etc/selinux/config''' file and follow the instructions inside.</li><li>Install all updates using the '''yum update''' command.</li></ol>
<br>
 
{{Admon/important |Yum Update Hangs|If you experience yum update "hanging" around item 689 of over 1200 packages, issue the following commands:<br><source>pkill systemctl
yum clean all
yum update
</source>'''NOTE:''' Do not press &lt;ctrl&gt;c since it may cause your machine to cause a kernel panic when you restart your machine.}}
===Using iptables===
The most recent variants of Centos and Fedora are using a service called '''firewalld''' that is intended to replace '''iptables''', however the ''iptables'' service is still in relatively common usage. In this course we will concentrate on ''iptables''.
<ol><li>Disable firewalld:
<source lang="bash">
systemctl disable firewalld
systemctl stop firewalld
</ol>
<ol><li value="2">Install and enable the IPTables services:
<source lang="bash">
yum install iptables-services
systemctl enable iptables
'''Record steps, commands, and your observations in INVESTIGATION 1 in your OPS335 lab log-book'''
 
==INVESTIGATION 2: VIRTUAL MACHINE INSTALLATION==
First, It is a good idea to make certain that your host machine has been set up correctly prior to creating your first virtual machine:
#Open a separate terminal and issue the '''ifconfigip address show''' command on your host machine to know your physical network and your virtual network. Note this information for the next few steps.
#Issue the following command to download Bash shell script to check your host machine's set-up prior to proceeding with this lab:<br>'''wget http://matrix.senecac.on.ca/~murray.saul/ops335/labcheck_install.sh'''<br>
#Assign execute permissions, and run the script to check your work:<br>
'''labcheck_install.sh'''
<ol><li value="4">Use the information from the '''ifconfigip address show''' command to correctly specify the '''physical network interface''' and the '''virtual network interface'''.</li></ol>
'''NOTE:''' You will need an ISO file for CentOS 7 (the same one you burned your DVD from). It is recommended to use the command:<br> '''<span style="text-decoration:none;color:blue;">wget httphttps://belmontmirror.senecacollege.ca/pub/centos/7.2.1511/isos/x86_64/CentOS-7-x86_64-DVD-15111810.iso</span>''' <br>to download this image onto your host machine. In this way, you can keep it on your host machine for the remainder of this course in case you need it.
# Create a new virtual machine named '''vm1'''.
# Accept the default file type (which is '''qcowqcow2'''). You are <u>NOT</u> required to specify the VM file pathname as you did in OPS235.
{{Admon/tip|VM File Types ( '''.qcowqcow2''' vs '''.img''' )|In OPS235, you selected the VM images as a '''"raw"''' image. In OPS335, you will be accepting the default image file '''".qcowqcow2"''' (which stands for "QMENU Copy on Writeversion 2" ) that provides more features when manipulating stored VM images.}}
===Online Submission (Peter Callaghan's Classes only)===
Follow the instructions for lab 0 on moodleblackboard.
===In Class Submission(Murray Saul's Classes only)===
[[Image:lab1_signoff.png|thumb|right|500px|Students should be prepared with '''all required commands (system information) displayed in a terminal (or multiple terminals) prior to calling the instructor for signoff'''.]]
'''Arrange evidence (command output) for each of these items on your screen, then ask your instructor to review them and sign off on the lab's completion:'''
932
edits

Navigation menu