Open main menu

CDOT Wiki β

Changes

OPS245 Lab 1

366 bytes added, 9 March
no edit summary
{{Admon/caution|DO NOT USE THIS VERSION OF THE COURSE. This page will no longer be updated.|'''Debian version here:''' https://seneca-ictoer.github.io/OPS245
<br>'''CentOS version here:''' https://seneca-ictoer.github.io/OPS245-C7<br>'''Andrew's version here:''' http://wiki.littlesvr.ca/wiki/OPS245_Lab_1}}
=LAB PREPARATION=
[[Image:vmware-1a.png|thumb|right|450px|The VMware Workstation application will allow you to create and administer '''4 different virtual machines''' ('''VM'''s) on your computer system. ]]
| |[[Image:ssd.png|thumb|left|175px|<b>Solid State Drive</b><br>Minimum Size: 250GB]]
| [[Image:log-book.png|thumb|left|100px|<b>Lab Logbook</b><br>[[:Media:OPS245-Logbook-Online.doc|(lab 1Click Here to Download)]]]]
| style="padding-left:15px;" |Package Management
'''Answer Investigation 3 observations (all parts and questions) in your lab log book.'''
= INVESTIGATION 54: Using Python Scripting to Generate System Information Reports =
Before we can successfully automate parts of configuration using python, we need to learn how to use it. Initially we will perform simple tasks we have already learned how to do in bash. This way can learn how the language works as we go.
:'''Perform the Following Steps:'''
<ol>
<li>Check if python3 is installed on your RHEL Centos Host machine. Open a terminal and type:</li>
<code style="color:#3366CC;font-family:courier;font-size:.9em;margin-left:20px;font-weight:bold;">
which python3
</code>
<li>The output should of the previous command should show python3 is already installed. If it is not, install python3 on your RHEL Centos Host machine.</li>
<code style="color:#3366CC;font-family:courier;font-size:.9em;margin-left:20px;font-weight:bold;">
sudo dnf yum install python3
</code>
<li><ul><li>Create a new file in your '''~/bin''' directory called '''myreport.py'''</li>
</ul>
</li>
<li>Run your script to make sure it works. Note that the output does not need to match investigation 4 3 exactly, but it should be very close.</li>
</ol>