Changes

Jump to: navigation, search

OPS235 Lab 3

219 bytes added, 19:51, 8 October 2020
m
Part 2: Compiling Source Code from a Downloaded Archived File
[[Category:OPS235]][[Category:OPS235 Labs]]
 
= LAB PREPARATION =
{| width="40%" align="right" cellpadding="10"
|- valign="top"
|
[[Image:package.png|thumb|right|200px|Learning how to conserve disk space is essential for the efficient operation of a Linux computer system. You will learn how to manipulate the size of Linux file-system sizes (via '''LVM''') in Lab5Lab 5. ]]
|
[[Image:lbreakout2.png|thumb|right|200px|You will download and compile the game called '''lbreakout2''' which is only available as compressed source code. ]]
|}
=== Purpose / Objectives of Lab3Lab 3===
In this lab, you are going to identify potential problems such as running out of space to run a GUI, or forgetting your root password. You will also learn to conserve hard disk space by learning how to compress and decompress files that are stored on your computer server. In addition, you will learn alternative methods of how to install applications (i.e. programs).
<u>Main Objectives</u>
*Learn to boot your Centos CentOS VM into '''Single User mode''' for rescue purposes
*Create and extract '''archive''' files ('''tar''' and '''tar.gz''')
*Install applications using various methods:
[http://ss64.com/vi.html vi]
| style="padding-left:20px;"|Matrix On-line Tutorials:<ul><li>Shell Scripting Basics - Part 4 (The sed Utility):<br>'''/home/murray.saulops235/scripting-4'''</li></ul>
|}
#Issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">chroot /sysroot</span></code></b><br><br>
#Issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">passwd root</span></code></b> in order to change your root password (press '''ctrl-c''' if you wish to abort - i.e. not change password).
#To restart in graphical mode, simply enter the command <b><code><span style="color:#3366CC;font-size:1.2em;">exit</span></code></b>, then <b><code><span style="color:#3366CC;font-size:1.2em;">reboot</span></code></b>.
{{Admon/important | What To Do If Reboot Doesn't Work | In this mode, the reboot command may not work. If it doesn't, go to the top of the centos1 VM window, select Send Key -> Ctrl+Alt+Delete.}}
# Verify that the elinks package has been removed. Also verify that the application called: '''xchat''' is not installed.
# Use the wget command to download the xchat rpm binary from the following URL:
::<b><code><span style="color:#3366CC;font-size:1.2em;">http://mirror.centos.org/centos/7/os/x86_64/Packages/xchat-2.8.8-2325.el7.x86_64.rpm</span></code></b><br>
::What do you think is the purpose of the numbers also contained in the filename?
<ol><li value="8">Issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">yum localinstall xchat-2.8.8-2325.el7.x86_64.rpm</span></code></b></li>
<li>Verify that the '''xchat''' command has been installed.</li>
<li>Run the xchat application. What does it say if you run this application as root?</li></ol>
# Remain in your '''c7host''' VM, but make certain that you are logged in as a regular user (i.e. NOT root!).
# Issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">which lbreakoutlbreakout2</span></code></b><br>Is there a program called '''lbreakoutlbreakout2''' on your system?# Perform a Netsearch an Internet search for the pattern: <b><code><span style="color:#3366CC;font-size:1.2em;">lbreakout2 tar.gz</span></code></b>
# Go to an appropriate webpage and download a "zipped tarball" (compressed source code) for the '''lbreakout2''' game (filename should be something like: '''lbreakout2.tar.gz''')
#Change to the directory where you downloaded that file (most likely ''~/Download''s).
<li>Issue the command in step 7. You should get another ERROR! What dependency is missing?</li>
<li>Issue the following command to install the library files for SQL by issuing the command:<br><b><code><span style="color:#3366CC;font-size:1.2em;">yum install SDL-devel</span></code></b> (possibly <b><code><span style="color:#3366CC;font-size:1.2em;">yum install libpng-devel</span></code></b> and <b><code><span style="color:#3366CC;font-size:1.2em;">yum install zlib-devel</span></code></b> )</li>
<li>Reissue the <b><code><span style="color:#3366CC;font-size:1.2em;">./configure && make</span></code></b> command. Where Were you successful?</li> <li>Run the command <b><code><span style="color:#3366CC;font-size:1.2em;">lbreakoutlbreakout2</span></code></b> (or possibly '''lbreakout2'''). Where Were you successful?</li>
<li>You need to run a command to make this program available regardless of your current directory (as opposed to running command in the directory that contains the program). Login as root (be sure to be in the same directory as the source code after logging in as root) and issue the command:<br><b><code><span style="color:#3366CC;font-size:1.2em;">make install</span></code></b></li>
<li>Run the command: <b><code><span style="color:#3366CC;font-size:1.2em;">lbreakoutlbreakout2</span></code></b> . Did it work? Issue the command:<br> <b><code><span style="color:#3366CC;font-size:1.2em;">which lbreakoutlbreakout2</span></code></b>. What do you think that the '''make install''' command did?</li>
</ol>
<ol>
<li value="8">Save, set permissions, and then run that shell script for the application '''gedit'''. Did it create that report? Try running the script without an argument - What did it do? <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://scsict.senecac.onsenecacollege.ca/~murray.saulops235/labs/packageInfoGraphical.bash</span></code></b></blockquote></li><li>Try to understand what this Bash Shell script does.</li><li>You have completed lab3. Proceed to Completing The Lab, and follow the instructions for "lab sign-off".</li></ol>
'''Answer the Investigation 3 observations / questions in your lab log book.'''
= LAB 3 SIGN-OFF (SHOW INSTRUCTOR) =
===Exclusively for Summer 2020 term, submissions are accepted only online!===
Follow the submission instructions for lab 3 on Blackboard.
{{Admon/important|Time for a new backup!|If you have successfully completed this lab, make a new backup of your virtual machines as well as your host machine.}}
# Switch to your <u>'''c7host'''</u> machine, open a shell terminal, and login as root.
# Change to the directory: '''/root/bin'''
# Issue the Linux command: <b><code><span style="color:#3366CC;font-size:1.2em;">wget httphttps://matrixict.senecac.onsenecacollege.ca/~murray.saulops235/ops235labs/lab3-check.bash</span></code></b>
# Give the '''lab3-check.bash''' file execute permissions (for the file owner).
# Run the shell script and if any warnings, make fixes and re-run shell script until you receive "congratulations" message.
#Arrange proof of the following on the screen:<br><span style="color:green;font-size:1.5em;">&#x2713;</span> '''centos3''' VM:<blockquote><ul><li> Archived files '''created'''</li><li>Archive files '''restored'''</ul></blockquote><span style="color:green;font-size:1.5em;">&#x2713;</span> '''c7host''' Machine:<blockquote><ul><li> '''One repository added''' for yum</li><li>Run the '''lab3-check.bash''' script in front of your instructor (must have all <b><code><span style="color:#66cc00;border:thin solid black;font-size:1.2em;">&nbsp;OK&nbsp;</span></code></b> messages)</li></ul></blockquote><span style="color:green;font-size:1.5em;">&#x2713;</span> '''Lab3''' log-book filled out.
 
= Practice For Quizzes, Tests, Midterm &amp; Final Exam =
[[Category:OPS235]][[Category:OPS235 Labs]][[Category:CentOS 7]][[Category:SSD2]][[Category:Digital Classroom]]
572
edits

Navigation menu