Open main menu

CDOT Wiki β

Changes

OPS235 Lab 1 - CentOS7 - VMware

1,656 bytes removed, 08:53, 22 May 2016
no edit summary
<td style="border-bottom: thin solid black;font-weight:bold;background-color:#ffffff;">Command(s)</td>
<td style="border-bottom: thin solid black;font-weight:bold;background-color:#ffffff;">Purpose</td>
</tr>
<tr valign="top">
<td width="20%" style="border-bottom: thin solid black;"><b><code><span style="color:#3366CC;font-size:1.2em;">uname -rv</span></code></b><br><b><code><span style="color:#3366CC;font-size:1.2em;">hostname</span></code></b><br><b><code><span style="color:#3366CC;font-size:1.2em;">ps -ef</span></code></b></td>
<td width="20%" style="border-bottom: thin solid black;">Basic Linux OS information such as '''kernel''' version, '''host-name''' of Linux server, and all '''processes''' that are running on the system after installation.</td>
</tr>
<tr valign="top">
<td width="20%" style="border-bottom: thin solid black;"><b><code><span style="color:#3366CC;font-size:1.2em;">rpm -q -a | wc -l'''</span></code></b><br><b><code><span style="color:#3366CC;font-size:1.2em;">rpm -q -a -l | wc -l'''</span></code></b><br><b><code><span style=" pointer-events:none;cursor:default;color:#3366CC;font-size:1.2em;">rpm -q -l gedit | wc -l</span></code></b></td>
<td width="20%" style="border-bottom: thin solid black;">Obtain number of installed packages in the rpm database. Option '''-q ''' is to "query" informationo, option '''-a ''' means for all installed packages, option '''-l ''' means all files installed as opposed to just the application.</td> </tr> <tr valign="top"> <td width="20%" style="border-bottom: thin solid black;">[[Image:t2.png|left|210px|]]</td> <td width="20%" style="border-bottom: thin solid black;">'''Text-based menu''' for common operations</td>
</tr>
 
<tr valign="top">
<td width="20%" style="border-bottom: thin solid black;">[[Image:t3.png|left|110px|]]</td>
</tr>
</table>
 
 
 
 
 
<ol>
<li value="1">Issue that command displayed above. Does it work? If not, what account do you think you should be in? When you get the command working record this important information regarding commands and the admin account in your lab logbook.</li>
<li>Using the <code>rpm</code> command: you can also use the following commands to list all the installed packages, and the total number of packages installed:</li>
</ol>
::<b><code><span style="color:#3366CC;font-size:1.2em;">rpm -q -a'''</span></code></b>
::<b><code><span style="color:#3366CC;font-size:1.2em;">rpm -q -a | wc -l'''</span></code></b>
::<b><code><span style="color:#3366CC;font-size:1.2em;">rpm -qa | wc -l'''</span></code></b>
<ol>
<li value="10">The <code>'''-q'''</code> option means query, and the <code>'''-a'''</code> option means all (in other words, query all installed software packages). Did you get the same number of packages from the above two methods?</li>
<li>Some of the files on your system were installed with the software packages, and some were created by system activity (for example, by creating your Learn account and by logging in). If you know the package name (from the <code>packaging.log</code>), you can list all the files that were installed from the package by using the following command:</li>
</ol>
::<b><code><span style=" pointer-events:none;cursor:default;color:#3366CC;font-size:1.2em;">rpm -q -l gedit</span></code></b>
 
<ol><li value="12">Issue the following command to obtain the total number of files installed for gedit:<br><br></li></ol>
::<b><code><span style=" pointer-events:none;cursor:default;color:#3366CC;font-size:1.2em;">rpm -ql gedit | wc -l</span></code></b>
<ol>
<li value="13">Using what you learned in steps 3, 4, and 7, get a count of the total number of files installed by all of the software packages on your system.</li><li>How can you explain why this number is a lot larger than the total number of packages installed? Record your answer in your lab logbook.
</ol>
13,420
edits