Changes

Jump to: navigation, search

OPS235 Lab 1 - CentOS7

1,394 bytes added, 12:26, 24 September 2018
no edit summary
[[Category:OPS235]]
{{Admon/caution|THIS IS AN OLD VERSION OF THE LAB|'''This is an archived version. Do not use this in your OPS235 course.'''}}
=LAB PREPARATION=
# '''Newer computer models''' are labelled '''HP Z230'''.<br><br>'''NOTES:'''<ul><li>If you are using the '''<u>newer</u>''' model, allow the computer to boot up (<u>without</u> pressing F10 key) to boot from DVD.</li><li>Refer to the comparison chart in lab2 lab logbook, and fill in various installation information for '''c7host''' while you perform the installation (such as time it took to perform a full install, installation options, etc).<br><br></li></ul>
<ol>
<li value="6">Power on the computer again, and after booting from the CD, select from the installation menu : '''Install Centos7'''.<br><br>Note: If you experience unreadable display after you boot into your installed system, you can redo the install, but select from the install menu: ''<u>Troubleshooting'</u>'' and then select '''<u>Install in Basic Graphics Mode'</u>''.<br><br></li>
<li>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.</li>
#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 the option '''New mount points will use the following partition scheme''' from '''LVM''' to '''<u>Standard Partition</u>''' (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:<ul><li>Primary Partitions (ext4):<ul><li>'''30GB''' for '''/''' (i.e. "root")</li><li>'''40GB''' for /home</li><li>'''100GB''' for '''/var/lib/libvirt/images''' </li></ul> </li><li>Swap Partition:<ul><li>'''16GB''' (Note: "swap" must be selected from the drop down menu)</li></ul></li></ul><br>'''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>
#We will now create the root (/) partition. '''Click on the add button (plus) sign'''.<br>
#In the '''Add a New Mount Point''' screen, select '''/''' as the mount-point (either by typing or selecting from drop-down menu), and enter '''30720''' in for partition size and click '''Add Mount Point''' button.
# 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>not</u> LVM). You need to repeat this procedure for the ''/home'' and ''/var/lib/libvirt/images partitions'' as well)</span>.
#Repeat the same steps above for the '''/home''' partition and '''/var/lib/libvirt/images''' partition. You need to type the ''/var/lib/libvirt/images'' partition since it does not appear in the drop-down menu.
#Select Recheck each of the created partitions, and make certain that the file-system type is changed from set to '''xfs'ext4'' and the Device Type is set to '''ext4'Standard Partition''.
#Finally, add a swap partition (Mount Point: swap) for '''16 GB'''.
#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'''.<span><br><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.
#Start timing your host machine installation.
 
== Part 3: Completing the Installation ==
#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 (what this is only a one-time occurrence).<br> In order to accept the purpose of accepting license agreement, issue the license?).#Click on following keystrokes:<br><br>'''1'''License Informationfollowed by ENTER (to select the license agreement prompt<br>''' and 2'''click that you agree followed by ENTER (to accept the license agreement)<br>''', click c'''Donefollowed by ENTER (to save the selection)<br>''' and then click c'''Finish Configuration'''.#Click Forward followed by ENTER (a second time to enable Kdump (what is continue booting into the purpose of this application?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 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>
#=== 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:<ol type="a"><li>:*Click on your '''username at the top right-hand screen'''</li><li>:*Select '''Settings''' from the drop-down menu</li><li>.:*Click the '''Power''' icon located in the ''Settings'' Dialog Box</li><li>:*Change the amount of time in the '''Power Saving''' section to '''Never''' or a '''longer period of time'''</li><li>:*Close the ''Settings'' Dialog box.  <br><brol></livalue="14"></ol>#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.'''
#Issue the command <b><code><span style="color:#3366CC;font-size:1.3em;">su </span></code></b> Issue the '''pwd''' and '''whoami''' commands to confirm your directory pathname. When finished logout of this account.
#Issue the command <b><code><span style="color:#3366CC;font-size:1.3em;">su - </span></code></b> Issue the '''pwd''' and '''whoami''' commands to confirm your directory pathname. What do you notice are the main differences between using '''su''' versus using '''su -''' ?
# An installation log file called <b><code><span style="color:#3366CC;font-size:1.2em;">/var/log/anaconda/anaconda.packaging.log</span></code></b> has been created to record the installation of your c7host machine. This file is an ASCII file which can be viewed with the <b><code><span style="color:#3366CC;font-size:1.2em;">more</span></code></b> command.
# You can make use of this file to determine how many packages have been installed: complete the following command to count the number of packages that are labelled "Installing" in the installation log file:
:: <b><code><span style="color:#3366CC;font-size:1.2em;">grep -i installing packaging /var/log/anaconda/anaconda.packaging.log | wc -l'''</span></code></b>
<ol>
<li value="8">Issue that command displayed above. Does it work? If not, what account do you think you should be in? When you get the command working record this important information regarding commands and the admin account in your lab logbook.</li>
<ol>
<li value="10">The <code>'''-q'''</code> option means query, and the <code>'''-a'''</code> option means all (in other words, query all installed software packages). Did you get the same number of packages from the above two methods?</li>
<li>Some of the files on your system were installed with the software packages, and some were created by system activity (for example, by creating your Learn account and by logging in). If you know the package name (from the <code>installpackaging.log</code>), you can list all the files that were installed from the package by using the following command:</li>
</ol>
::<b><code><span style=" pointer-events:none;cursor:default;color:#3366CC;font-size:1.2em;">rpm -q -l gedit</span></code></b>
<li value="13">Using what you learned in steps 3, 4, and 7, get a count of the total number of files installed by all of the software packages on your system.</li><li>How can you explain why this number is a lot larger than the total number of packages installed? Record your answer in your lab logbook.
</ol>
 
==Part2: Obtaining System Information==
::: <b><code><span style="pointer-events: none;cursor: default;color:#3366CC;font-size:1.2em;">The default gateway</span></code></b>
::: <b><code><span style="pointer-events: none;cursor: default;color:#3366CC;font-size:1.2em;">The DNS nameserver</span></code></b>
<ol><li value="9">Run the commands <b><code><span style="color:#3366CC;font-size:1.2em;">hostname</span></code></b>, <b><code><span style="color:#3366CC;font-size:1.2em;">uname -rv</span></code></b>, <b><code><span style="color:#3366CC;font-size:1.2em;">ps -ef</span></code></b>, <b><code><span style="color:#3366CC;font-size:1.2em;">ifconfig</span></code></b>, and <b><code><span style="color:#3366CC;font-size:1.2em;">route -n</span></code></b> redirecting the output to add to a file in root's home directory called <b><code><span style="color:#3366CC;font-size:1.2em;">system.txt</span></code></b>.</li><li>Copy the installation log file <code>'''/var/log/anaconda/anaconda.packaging.log'''</code> and the file '''system.txt''' to a USB memory key, or '''scp''' to your matrix account as a backup.</li></ol>
'''Answer the Investigation 2 observations / questions in your lab log book.'''
 
= INVESTIGATION 3: LOOKING AHEAD =
{{Admon/important|SELinux|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.}}
|}
# Disabling SELinux is quite simple, just edit the file '''/etc/selinux/config''' and set SELINUX to disabled'''disable<u>d</u>'''.
# Add additional text regarding disabling SELinux.
#The CentOS software is updated frequently to add features, fix bugs, and upgrade security. Perform a system update to get the latest versions of the packages installed: Start the Firefox web browser, turn off popup window blocking (select '''Edit''', '''Preferences''', then select the '''Content''' tab and uncheck the box to '''Block Popups'''), then return to your web-browser, load a page, and when prompted, login to SeneNET.
= LAB 1 SIGN-OFF (SHOW INSTRUCTOR) =
[[Image:lab1_signoff.png|thumb|right|500px|Students should be prepared with a'''ll 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:'''
::<span style="color:green;font-size:1.5em;">&#x2713;</span> '''Default route (gateway)'''
::<span style="color:green;font-size:1.5em;">&#x2713;</span> '''DNS name server IP Address'''
::<span style="color:green;font-size:1.5em;">&#x2713;</span> Contents of your '''reportmyreport.bash''' shell script
::<span style="color:green;font-size:1.5em;">&#x2713;</span> proof of '''yum update''' performed on c7host
::<span style="color:green;font-size:1.5em;">&#x2713;</span> '''SELinux''' is disabled on '''c7host'''
::<span style="color:green;font-size:1.5em;">&#x2713;</span> '''lab1 notes''' <u>and</u> '''first column of Comparison Chart in lab2'''.
= ADDITIONAL PRACTICE = Practice For Quizzes, Tests, Midterm &amp; Final Exam ==
# How many packages were installed?

Navigation menu