Changes

Jump to: navigation, search

OSL740 Lab 1

26 bytes added, 11:14, 13 May 2022
m
INVESTIGATION 3: Using the Shell to Generate System Information Reports
It is ESSENTIAL to have a '''Solid State Drive (SSD) with a minimum storage capacity of 240 GB''' to perform your lab sessions and provide a host for your other CentOS 7 host and other VMs that you will create in Lab 2. '''Due to space requirements, you are <u>NOT</u> permitted to share this SSD drive with any other course material than our OPS235 OSL740 course'''.
'''NOTE: It is feasible to use a notebook computer with sufficient hard disk capacity to perform these labs (as you would for an SSD drive)'''. It would require that your notebook computer can connect to the Internet (including in Seneca's computer labs). You would be required to follow the same instructions for this lab (SSD) Note: It may take one or two weeks before students can obtain their free version of VMware Workstation Pro; therefore, it may be more convenient to purchase an SSD to be able to start lab1 immediately. It is strongly recommended to NOT use VMware Player.
 
===Main Objectives===
#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 with temporarily elevated privileges (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). Make sure the box labelled ''''Make this user administrator' is checked'''. Click '''Done''' to finish (click twice if password is not considered to be a strong password).
<br><br>
{|width="50%" cellspacing="0"
<ol><li value="4">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!'''</li>
<li>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.</li>
<li>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, Click on '''License Not Accepted''' and graphically accept the license and then click '''FINISH CONFIGURATION''' to finish the installation process.<br><br>'''NOTE:''' If you have an older version of CentOS 7, you must perform the alternative steps:<br>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></li>
<li>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></li>
<li>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></li>
{{Admon/important|Never disable SELinux in the real world| It is highly discouraged and unsafe to disable SELinux on a public-facing server. Some applications may require tedious steps to setup SELinux rules. Disabling SELinux is never the correct way to solve an issue.}}
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 '''turn off change SELinux to permissive mode by default''' because we won't have the time to reconfigure it every time the labs make it necessary.
:'''Perform the following Steps:'''
:You may have learned about creating and running Bash Shell Scripts in your ULI101 OSL640 course. Shell scripts help Linux users and system administrators to automate repetitive tasks to become more efficient and to help them save time. In order to avoid confusion with syntax, you will not be writing bash scripts in this course. You will however still run bash commands to perform various tasks, e.g. to generate information reports for your newly-installed Linux host machine.
sudo yum install python3
</code>
<li><ul><li>Create a new file in your '''~/bin ''' directory called '''myreport.py'''</li>
<li>Since we haven't covered if statements in python yet, we won't be able to check if the user running the script is root. For now, we will have to trust ourselves to remember to use elevated permissions to run this script. We will correct this in lab 2.</li>
</ul></li>
# Make certain that your '''c7host''' VM is running, open the Bash Shell terminal.<br><br>
# Change to the '''~/bin''' directory.<br><br>
#Download the checking script by issuing the following Linux command:<br><b><code><span style="color:#3366CC;font-size:1.2em;">wget https://ictosl740.senecacollegegithub.ca/~ops245io/labs/lab1-check.bash</span></code></b><br><br>
# Give that downloaded shell script file execute permissions (for the file owner).<br><br>
# Run the shell script using '''sudo ''' and if there are any warnings, make fixes and re-run shell script until you receive a "congratulations" message.<br><br>
#Arrange evidence (command output) for each of these items on your screen:
::<span style="color:green;font-size:1.5em;">&#x2713;</span> Proof that c7host VM is set for '''virtualization''' (Refer to: '''INVESTIGATION 1''' - '''Part 1''' - '''Step #29''')
#:7. Take a screenshot of the evidence and upload it, the file generated by the lab1-check.bash script, your logbook, and your myreport.py to blackboardBlackboard.
= Practice For Quizzes, Tests, Midterm &amp; Final Exam =
572
edits

Navigation menu