Open main menu

CDOT Wiki β

Changes

OPS245 Lab 3 dev

42 bytes added, 16:16, 21 February 2023
INVESTIGATION 3: MANAGING SOFTWARE PACKAGES
= LAB PREPARATION =
*** UNDER DEVELOPMENT ***
{| width="40%" align="right" cellpadding="10"
|- valign="top"
*Install applications using various methods:
:*'''Download''', '''decompress''' and archive file from the Internet, then '''compile source code''' in order to install an application.
:*Use '''yumdnf''' utility to install software from '''local source programs''' (on DVD drive):*Use '''yumdnf''' utility to install software from '''repositories''' (online storage areas)
:*Learn how to '''add repositories''' (online software storage areas) to install less common applications.
<ul><li value="4">Demonstrate the use of Bash Shell scripts to automate routine tasks (generate a customized software report)</li></ul>
Software Manangement<br>
[https://linux.die.net/man/8/rpm rpm]<br>
[httphttps://man7.org/linux/man-pages/man8/yumdnf.8.html yumdnf]
| style="padding-left:20px;"|Miscellaneous
[http://man7.org/linux/man-pages/man1/ls.1.html ls]<br>
|- valign="top"
|
[[Image:grub1Rhel-grub_1.png|thumb|right|600px|Press '''e''' at Grub Boot Menu to edit]]
|}
===Part 1: Common Booting Issues===
|- valign="top"
|
[[Image:grub2_1Rhel-grub_2.png|thumb|right|600px|Add the boot option '''single''' and then press '''ctrl-x''' to boot into single user mode]]
|}
|- valign="top"
|
[[Image:grub2_3Rhel-grub_3.png|thumb|right|600px|Add '''rw init=/sysroot/bin/sh''' as shown and then press '''ctrl-x''' to boot into single user no root password mode]]
|}
'''Answer INVESTIGATION 1 observations / questions in your lab log book.'''
 
= INVESTIGATION 2: ARCHIVING &amp; RESTORING FILES =
#Boot up your '''rhel3''' VM.
#Tar may not be installed by default. Confirm by issuing the command '''which tar'''. If the output indicates tar is not on the system, install it with the following command. If it is found, skip the next step
#Install tar (if it was missing) sudo dnf install tar
#Change your working directory to '''/usr/share/doc/sudo*'''
#Use the tar (tape archiverarchive) command to create an archive file named "/tmp/archive1.tar" by issuing the following command:<br><b><code><span style="color:#3366CC;font-size:1.2em;">tar cvf /tmp/archive1.tar .</span></code></b>
{{Admon/important | Warning! | Don't miss the <code>.</code> at the end of the <code>tar</code> command (where indicated). It specifies what should go into the archive: the contents of the current directory.}}
'''Perform the following steps:'''
#Make certain that you are in your '''r9host''' machine.#Issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">sudo dnf install elinkslynx</span></code></b>#Now issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">dnf info elinkslynx</span></code></b>#How can you tell if the elinks lynx package has been installed?#To remove the elinks lynx package issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">sudo dnf remove elinkslynx</span></code></b># Verify that the elinks lynx package has been removed. Also verify that the application called: # We will now look at how we can add different repositories to our '''xchatr9host''' is not installedmachine.# Use Issue the wget following command to download the xchat rpm binary from the following URL:::<b><code><span style="color:#3366CC;font-size:1.2em3em;">http://mirror.centos.org/centos/7/os/x86_64/Packages/xchat-2.8.8-25.el7.x86_64.rpmdnf repolist</span></code></b><br>::What do # Take a few moments to review the output. Do you think is see which repositories are used by the purpose of '''dnf''' command? Write down the numbers also contained repositories in the filename?your lab logbook. <ol><li value="8">Issue Next, we will add the command: '''epel repository''' (Extra Packages for Enterprise Linux) and install '''Alien'''. <b><code><span style="color:#3366CC;font-size:1.2em;">sudo dnf localinstall xchat-2.8.8-25.el7.x86_64.rpm</span></code></b></li><li>Verify that the '''xchatAlien''' command has been installedis a tool for converting packages for other package managers (such as debian, which end with .deb) to another (such as red hat, which end with .rpm).</li><li>Run the xchat application.</li></ol>
{| width="40%" align="right" cellpadding="10"Possible Packages to install from epel:|- valign="top"# Cinnamon|colspan="2"|{{Admon/tip|IRCs: A Great Tool for Linux Administrators|Although Search Engines (like Google) are a system administrator's good friend, Internet Relay Chats (IRCs) are also a great tool for system administrators to help obtain information. Many website offer information on how to connect to IRCs (both nodes (eg. FreeNode) and irc channel (eg. #linux). You can now use your newly-created application called '''xchat''' to do this.<br><br><u>'''A few tips to consider with IRCs'''</u>:<ul><li>Do your Homework (read docs first!)</li><li>Ask specific questions</li><li>Not all chats are friendly</li><li>Be patient when asking questions (use courtesy)</li><li>The advice is free (you get what you pay for!)</ul>}}|}Chromium
# To add the epel repository, issue the commands:<olbr><b><code><li valuespan style="11color:#3366CC;font-size:1.3em;">We will now look at how we can add different repositories to our '''r9host''' machinesudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms <br> sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm</lispan><li/code>Issue the following command</b># Install alien: <b><code><span style="color:#3366CC;font-size:1.3em;">sudo dnf repolistinstall alien</span></code></b># To verify that you have added the repository, you can issue the command: <b><code><span style="color:#3366CC;font-size:1.3em;">dnf repolist</lispan><li/code>Take a few moments to review the output. Do you see which repositories are used by </b># Also verify that the application called: '''dnfpackettracer''' command? Write down the repositories in your lab logbookis not installed.</li><li>View the following link # Login to see a general listing of repositories:<br>[ [httphttps://wikiwww.centosnetacad.orgcom/AdditionalResources/Repositories Available Repositories for CentosCisco Netacad] ].</li><li>To add and download Packet Tracer '''Ubuntu Desktop Version'''# Launch a terminal and change to the directory where you downloaded the epel repository, issue package (likely your Downloads folder)# Issue the following commandconvert the .deb package to an rpm using Alien (this may take a few minutes, be patient):<br><b><code><span style="color:#3366CC;font-size:1.3em2em;">sudo dnf install epelalien -releaser CiscoPacketTracer_*</span></code></b></li><li>To verify that you have added # List the repository, contents of your directory. What changed? What do you can issue think Alien did?# Issue the command: <b><code><span style="color:#3366CC;font-size:1.3em2em;">sudo dnf repolistlocalinstall xchat-2.8.8-25.el7.x86_64.rpm</span></code></b></li><li># Verify that the '''xchat''' command has been installed.# Run the xchat application# Unused and unneeded software can present a security risk and ties up disk space needlessly. Find '''at least 4 other packages''' to remove on your r9host machine(for example: '''sound & video''', '''games''', etc) that you're not using on your system. '''Be careful''' to ensure that removing those packages does not also remove other software that you do need.</li></ol>
===Part 2: Compiling Source Code from a Downloaded Archived File===
<li>Run the command <b><code><span style="color:#3366CC;font-size:1.2em;">lbreakouthd</span></code></b>. 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). So, issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">sudo make install</span></code></b></li>
<li>Run the command: <b><code><span style="color:#3366CC;font-size:1.2em;">lbreakouthd</span></code></b>. Did it work? Issue the command:<br> <b><code><span style="color:#3366CC;font-size:1.2em;">which lbreakout2</span></code></b>. What do you think that the '''make install''' command did?</li>
</ol>