Changes

Jump to: navigation, search

OPS235 Lab 1 - CentOS7 - SSD

12,633 bytes removed, 16:33, 9 June 2016
no edit summary
===Part 1: Start Installation ===
 
#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.
#Start timing your host machine installation.
 
=== Part 3: Completing the Installation ===
#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 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.<br><br>
 
 
=INVESTIGATION 2: COMMON POST-INSTALL TASKS=
==Part 1: Perform Software Updates==
{|width="40%" align="right" cellpadding="10"
|- valign="top"
|
{{Admon/caution|Allow Time to Perform Yum Updates|Allow sufficient time in order to perform updates prior to the end of the lab. Since you will be updating ALL of your VMs, allow 15-20 "lead-time" to start your updates and to backup your VMs prior to the end of the lab. NEVER force a shut-down of your VM while updates are running, since this will ruin your VM, and you will have to restore from a backup, or redo your labs for that VM!}}
|}
It ===Part 1: Turning Off Locked Screen-saver===  Your system automatically enables a '''screen-saver''' application which is important as a Linux System Administrator useful security tool to prevent unauthorized viewing of information on a terminal after a certain amount of inactivity. Turning-off the locked screen-saver for this (and other) virtual machine can be useful when waiting for your instructor to come over to update software "sign-off" your computer lab without having to re-issue user passwords. '''To Disable the Locked Screen-saver, Perform the following steps:''' #Click on your Linux system periodically'''username at the top right-hand screen'''#Select '''Settings''' from the drop-down menu. Performing periodic updates will fix software bugs and inefficiencies as well as apply security patches #Click the '''Power''' icon located in the ''Settings'' Dialog Box#Change the amount of time in order the '''Power Saving''' section to better secure your Linux server'''Never''' or a '''longer period of time'''#Close the ''Settings'' Dialog box
'''You are required to perform the following command for ALL of your 4 VMs===Part 2:'''Disable SELinux and Perform Software Updates===
<b><code><span style="color:#3366CC;fontSELinux stands for '''Security-size:1Enhanced Linux'''. It is a component that helps to better secure the system to protect against intrusion (hackers). SELinux is enabled upon the default install of CentOS. SELinux can be a good thing, if you take care of it and know how it works. For this course it is strongly recommended that you '''disable SELinux by default''' because we won't have the time to reconfigure it every time the labs make it necessary.2em;">yum update</span></code></b>
This will download and install all of '''Perform the packages that have been updated since the installation DVD image was created. If you complete this command at Seneca, it should run quite fast as Seneca College hosts a CentOS Repository mirror (a copy of all of the current CentOS packages, on a local web server). You will be reminded at the end of each of the remaining labs to perform software updates on ALL of your VMs.following Steps:'''
# Disabling SELinux is quite simple.
# Edit the file '''/etc/selinux/config'''
# In the editing session, set SELINUX to '''disable<u>d</u>''' (from ''targeted'') and save your editing session.
'''Answer Investigation 2 observations (all parts and questions) in your lab log book.'''
==Part 23: Accessing Administrative Priviledges==
{|width="40%" align="right" cellpadding="10"
|- valign="top"
===Part 34: Common Post-Install Commands &amp; Using Shell Scriptingto Generate System Information Reports ===
{|width="40%" align="right" cellpadding="10"
|- valign="top"
<ol><li value="14">Here are some more "complex" Bash Shell scripts, that perform the same task. Although you are not require to understand some of these other tricks, it is recommended that you view the contents of the scripts and save them for future consideration or exmaples.</li><li>The <b><code>wget</code></b> command can be used to quickly download files from the Internet. Issue the following command:<br><b><code><span style="pointer-events: none;cursor: default;color:#3366CC;font-size:1.2em;">wget https://scs.senecac.on.ca/~murray.saul/text-report.bash</span></code></b></li><li>Verify that the file '''text-report.bash''' was downloaded to your current directory.</li><li>Assign read and execute permissions for this file by issuing the command: <b><code><span style="color:#3366CC;font-size:1.2em;">chmod u+rx text-report.bash</span></code></b></li><li>Run this Bash Shell script by issuing the command: <b><code><span style="color:#3366CC;font-size:1.2em;">./text-report.bash</span></code></b></li><li>Check to see if it created a report in your current directory. What is the purpose of the report?</li><li>Use the <b>vi</b> text editor to view the contents of the file <b>text-report.bash</b>. Can you understand how this script works?<br><br></li><li>Use the <b><code>wget</code></b> command to download, study, and run the following shell scripts on-line:<blockquote><b><code><span style=" pointer-events:none;cursor:default;color:#3366CC;font-size:1.2em;">https://scs.senecac.on.ca/~murray.saul/report.bash<br>https://scs.senecac.on.ca/~murray.saul/report3.bash</span></code></b></blockquote></li><li>Try to understand what these Bash Shell scripts do.</li><li>You have completed lab1. Proceed to Completing The Lab, and follow the instructions for "lab sign-off".</li></ol>
 
 
=== Turn-Off Screen Saver Lock ===
 
:Your system automatically enables a '''screen-saver''' application which is a useful security tool to prevent unauthorized viewing of information on a terminal after a certain amount of inactivity.
 
:If you find this feature annoying and want to turn it off or adjust the idle time perform the following steps:
:*Click on your '''username at the top right-hand screen'''
:*Select '''Settings''' from the drop-down menu.
:*Click the '''Power''' icon located in the ''Settings'' Dialog Box
:*Change the amount of time in the '''Power Saving''' section to '''Never''' or a '''longer period of time'''
:*Close the ''Settings'' Dialog box.
 
 
<ol><li value="14">Proceed to Investigation 2 to obtain basic information from your newly installed Centos Host machine.</li></ol>
 
'''Answer Investigation 1 observations (all parts and questions) in your lab log book.'''
 
 
=INVESTIGATION 2: OBTAINING HOST MACHINE SYSTEM INFORMATION=
 
 
=== Part 3: Completing the Installation ===
 
{|width="40%" align="right" cellpadding="10"
|- valign="top"
|[[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).
#Click '''User Creation''' and enter your '''full name''', '''username''', and an appropriate '''password''' (and confirm password). Click '''Done''' to finish (click twice if password is not considered to be a strong password).
#<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 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: GETTING ACQUAINTED WITH YOUR VM=
 
For the remainder of this lab, we will be using the '''centos1''' virtual machine that we installed in Investigation 1.
 
First, we will focus on using the virtual machine and become familiar with some command VM operations such as switching between the full-screen and window modes. We will also learn to turn-off the screen-saver settings so you do NOT have to periodically re-issue passwords to gain access to your account (although it is a good security feature to consider in the future beyond this lab). We will also show you how to temporarily log in as the root user in order to perform tasks that require a Linux administrator.
 
 
===Part 1: Managing your Virtual Machine===
 
[[Image:taskbar.png|thumb|right|500px|The '''VM Workstation taskbar''' is useful when in full-screen mode to perform common virtual machine management tasks. ]]
The VM Workstation application allows virtual machines to run in '''windows mode''' or '''full screen mode''' (which is toggled by pressing the key combination: '''ALT-CTRL-ENTER'''). You can press the key-combination ALT-CTRL in order to return to your host computer system (i.e. running the VM Workstation application. The VM Workstation Toolbar (displayed on right-hand side) can be accessed while in full screen mode when the mouse pointer is at the top of the virtual machine display.
 
Below is a table with some useful toolbar buttons and their purpose:
 
 
<table cellspacing="0" cellpadding="5" width="100%" style="border-top: thin solid black;margin-left:20px;">
<tr valign="top>
 
<td style="border-bottom: thin solid black;font-weight:bold;background-color:#ffffff;">Button(s)</td>
<td style="border-bottom: thin solid black;font-weight:bold;background-color:#ffffff;">Purpose</td>
<td style="border-bottom: thin solid black;font-weight:bold;background-color:#ffffff;">Button(s)</td>
<td style="border-bottom: thin solid black;font-weight:bold;background-color:#ffffff;">Purpose</td>
</tr>
<tr valign="top">
<td width="20%" style="border-bottom: thin solid black;">[[Image:t1.png|left|30px|]]</td>
<td width="20%" style="border-bottom: thin solid black;">'''Toggle''' between '''auto-hide''' and '''always show toolbar'''</td>
<td width="20%" style="border-bottom: thin solid black;">[[Image:t4.png|left|100px|]]</td>
<td width="20%" style="border-bottom: thin solid black;">'''Snapshot (i.e. Restore Points)'''<br>(left to Right): Take '''new Snapshot''', Revert to '''Parent Snapshot''', '''Manage Snapshots'''</td>
 
</tr>
<tr valign="top">
<td width="20%" style="border-bottom: thin solid black;">[[Image:t2.png|left|210px|]]</td>
<td width="20%" style="border-bottom: thin solid black;">'''Text-based menu''' for common operations</td>
<td width="20%" style="border-bottom: thin solid black;">[[Image:t5.png|left|30px|]]</td>
<td width="20%" style="border-bottom: thin solid black;">'''Exit Full Screen''' mode</td>
</tr>
<tr valign="top">
<td width="20%" style="border-bottom: thin solid black;">[[Image:t3.png|left|110px|]]</td>
<td width="20%" style="border-bottom: thin solid black;">'''Common Guest VM Operations''' (Left to Right):'''Shutdown''', '''Suspend''', '''Start''', '''Restart'''</td>
<td width="20%" style="border-bottom: thin solid black;">[[Image:t6.png|left|110px|]]</td>
<td width="20%" style="border-bottom: thin solid black;">'''Running''' Virtual Machines</td>
</tr>
</table>
 
 
Take a few minutes acquainting yourself with toggling into Full Screen mode, using the VM Workstation Tool-bar in auto-hide and always-show mode.
 
We will not be using the other features in this lab, but it is a good idea to make appropriate notes of these Tool-bar buttons and purposes in your lab logbook.
 
 
===Part 2: Turning Off Locked Screen-saver===
 
 
Your system automatically enables a '''screen-saver''' application which is a useful security tool to prevent unauthorized viewing of information on a terminal after a certain amount of inactivity. Turning-off the locked screen-saver for this (and other) virtual machine can be useful when waiting for your instructor to come over to "sign-off" your computer lab without having to re-issue user passwords.
 
'''To Disable the Locked Screen-saver, Perform the following steps:'''
 
#Click on your '''username at the top right-hand screen'''
#Select '''Settings''' from the drop-down menu.
#Click the '''Power''' icon located in the ''Settings'' Dialog Box
#Change the amount of time in the '''Power Saving''' section to '''Never''' or a '''longer period of time'''
#Close the ''Settings'' Dialog box.
 
 
===Part 3: Disable SELinux and Perform Software Updates===
 
SELinux stands for '''Security-Enhanced Linux'''. It is a component that helps to better secure the system to protect against intrusion (hackers). SELinux is enabled upon the default install of CentOS. SELinux can be a good thing, if you take care of it and know how it works. For this course it is strongly recommended that you '''disable SELinux by default''' because we won't have the time to reconfigure it every time the labs make it necessary.
 
'''Perform the following Steps:'''
 
# Disabling SELinux is quite simple.
# Edit the file '''/etc/selinux/config'''
# In the editing session, set SELINUX to '''disable<u>d</u>''' (from ''targeted'') and save your editing session.
 
'''Answer Investigation 2 observations (all parts and questions) in your lab log book.'''
13,420
edits

Navigation menu