Open main menu

CDOT Wiki β

Changes

OPS235 Lab 3 - CentOS7

3,711 bytes removed, 11:53, 28 March 2015
no edit summary
=INVESTIGATION 2: Using the Yum Command for Local & Repository Installs=
== Part 1: How do you query the RPM database? ==
RPM maintains a database of installed software. This information is very useful to system administrators. In the previous lab you queried that database using RPM with the -q argument. When you query the RPM database, you can separately specify::* Do an <u>operational task</u> on one or more packages (like installing or removing a package), using a '''select-option''':* What <u>information</u> you want about those packages, using a '''query-option''' '''Perform the following steps:''' (Perform investigations 1 - 3 in your host machine (c6host) # Using information from the man page for <code>rpm</code>, fill in this information:   '''Answer the Investigation 1 observations / table contents in your lab log book.''' == Part 2: How do you install and remove software with RPM? == # Use the graphical file manager (Nautilus) to change to the directory on your Installation DVD. Go to the sub-directory called '''Packages'''. It should contain a file called: <code>lynx-2.8.6-27.el6.x86_64.rpm</code># Execute the following command: <code>rpm -i lynx-2.8.6-27.el6.x86_64.rpm</code># Issue an RPM query to check that lynx is installed. Record this command in your lab log-book.# Issue the following command: <code>rpm -e lynx</code># Issue an RPM query to verify that lynx is no longer installed. Record this command in your lab log-book.# Issue the following command: <code>rpm -i elinks-0.12.rpm</code>. Did it work? Explain in your lab log-book why this command may not have worked.  '''Answer the Investigation 2 observations / questions in your lab log book.''' == Part 31: How do you install Install and remove software Remove Software with ''yum''? Yum ==
{{Admon/note|Internet Connection|In order for yum to work you require a connection to the Internet. Establish this connection by using the browser to log into SeneNET}}
'''Answer the Investigation 3 observations / questions in your lab log book.'''
==Part 2: Managing Repositories with Yum==
ADD THIS SECTION
= INVESTIGATION 3: LOOKING AHEAD =
==Part 1: Automating Routine Tasks (Shell Scripting)==
[[Image:lab2_text_1.png|thumb|right|275px|When executed as '''root''' or using '''sudo''' command, provides VM status and opportunity to '''start''' VMs in a text-based interface]] We continue the discussion of using Bash Shell Scripts to help automate routine tasks for the Linux system administrator. In lab1, you were exposed to downloading and running Bash Shell Scripts for demonstration purposes. Before showing you demos for this lab, you should learn a few more "shell scripting tricks" in case you need to create your own set of tools for task automation.x
#Click on the following link to run an online tutorial showing you some additional shell scripting techniques: [ link ].#It is recommended to practice creating Bash Shell Scripts as you proceed throughout this course.#Let's look at some demos involving managing VMs with shell scripts. Issue the following command:<blockquote><b><code><span style="pointer-events: none;cursor: default;color:#3366CC;">wget https://scs.senecac.on.ca/~elizabeth.kopiec/backupVM.bash</span></code></b></blockquote>#Set the appropriate permissions and run this Bash Shell script.#Verify that the backup of your virtual machine occurred (hint: issue ls command to verify the date and time of creation).#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;">https://scs.senecac.on.ca/~murray.saul/vm-start-text.bash<br>https://scs.senecac.on.ca/~murray.saul/vm-stop-text.bash</span></code></b><br><b><code><span style=" pointer-events:none;cursor:default;color:#3366CC;">https://scs.senecac.on.ca/~murray.saul/vm-start.bash<br>https://scs.senecac.on.ca/~murray.saul/vm-stop.bash</span></code></b></blockquote>#Try to understand what these Bash Shell scripts do.#You have completed lab2. Proceed to Completing The Lab, and follow the instructions for "lab sign-off".x
'''Answer all observations / questions in your lab log book.'''
{{Admon/important|Time for a new backup!|If you have successfully completed this lab, make a new backup of your virtual machines.}}
'''NotesArrange evidence for each of these items on your screen, then ask your instructor to review them and sign off on the lab's completion:'''# rpm command options# yum command options# How to use pvs/vgs/lvs/df/pvcreate/vgextend/lvextend# Answer to this question "What is the license of the nautilus package?"
'''Arrange evidence for each of these items on your screen, then ask your instructor to review them and sign off on the lab's completion:'''# elinks application removed on the host (disk pack - main system c6host).Archived files created
# Unnecessary/unused packages have been deleted (list at least 4, and show that they are no longer installed).
 # Fresh backup 2 packages installed with yum command# 1 repository added for yum# License of the virtual machines.nautilus package 
==Preparing for Quizzes==
 
13,420
edits