Changes

Jump to: navigation, search

OPS235 Lab 3 - CentOS7

425 bytes removed, 10:46, 28 March 2015
no edit summary
= Software Package Management INVESTIGATION 1: ARCHIVING FILES =
== Investigation 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 Part 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.''' == Investigation 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 Creating 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.''' == Investigation 3: How do you install and remove software with ''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}} # Change to your home directory. <ol> <li value="2">Issue the command: <code>yum install elinks</code> and answer <code>y</code> to the question about installation. <ol type="a"> <li>Where did ''yum'' get the elinks software?</li> <li>Why could ''yum'' install elinks when rpm couldn't?</li> </ol> </li> <li>Issue an RPM query to verify that elinks is installed. Record this command in your lab log-book.</li> <li>Issue the command: <code>yum remove elinks</code></li> <li>Issue an RPM query to verify that elinks is no longer installed. Record this command in your lab log-book.</li> <li>Issue this command: <code>yum info cups</code></li></ol>::* Based on the result, do you think that cups is a useful package for your system? If not, try removing it.<ol> <li value="8">Unused and unneeded software can present a security risk and ties up disk space needlessly. Find at least 4 other packages (for example: games, sound & video, etc) that you're not using on your system, and remove them. Be careful to ensure that removing those packages does not also remove other software that you do need.</li></ol> '''Answer the Investigation 3 observations / questions in your lab log book.''' ==Archiving Files / Compiling Software from Source Code== File Archive files are often used to contain source code for software; in this lab you will also be compiling software from a source code archive. {{Admon/note|Do not Shut-Down VMs Until Instructed|You will be running all 3 VMs eventually when performing this tutorial, Leave all VMs running until you are instructed to shut them down at the end of this lab.|}} ===Investigation 1: How do you create an archive file?===
{{Admon/note|Use centos3|Perform these steps in the '''centos3''' virtual machine.}}
</ol>
'''Answer the Investigation Part 1 observations / questions in your lab log book.'''
===Investigation Part 2: How do you restore files from Restoring Files From an archive?Archive===
{{Admon/note|Remain in your centos3 VM|Perform these steps in the '''centos3''' virtual machine.}}
#Create the directory <code>/tmp/extract1</code>
'''Answer the Investigation 2 observations / questions in your lab log book.'''
 ===Investigation Part 3: How do you build software Compiling Source Code from source code?Archive File===
Now that you know how to create and decompress "zipped tarball archives", we will demonstrate how to install applications from websites containing these types of archives. Although this method is not as "user-friendly" as using the yum or rpm command, this method is useful if the application is NOT contained in regular software repositories...
'''Answer the Investigation 3 observations / questions in your lab log book.'''
 
=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 3: How do you install and remove software with ''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}}
 
# Change to your home directory.
 
<ol>
<li value="2">Issue the command: <code>yum install elinks</code> and answer <code>y</code> to the question about installation.
<ol type="a">
<li>Where did ''yum'' get the elinks software?</li>
<li>Why could ''yum'' install elinks when rpm couldn't?</li>
</ol>
</li>
<li>Issue an RPM query to verify that elinks is installed. Record this command in your lab log-book.</li>
<li>Issue the command: <code>yum remove elinks</code></li>
<li>Issue an RPM query to verify that elinks is no longer installed. Record this command in your lab log-book.</li>
<li>Issue this command: <code>yum info cups</code></li>
</ol>
::* Based on the result, do you think that cups is a useful package for your system? If not, try removing it.
<ol>
<li value="8">Unused and unneeded software can present a security risk and ties up disk space needlessly. Find at least 4 other packages (for example: games, sound & video, etc) that you're not using on your system, and remove them. Be careful to ensure that removing those packages does not also remove other software that you do need.</li>
</ol>
 
'''Answer the Investigation 3 observations / questions in your lab log book.'''
 
13,420
edits

Navigation menu