Changes

Jump to: navigation, search

OPS235 Lab 5 - Fedora17

1,301 bytes removed, 19:48, 3 January 2014
no edit summary
[[Category:OPS235]] {{Admon/caution|DraftLab|This lab has NOT been released for regular distribution. When the lab is ready to be released, this caution banner will disappear.}} =OPS235 Lab 5 - Archiving Files, Compiling Software Packages from Source, Managing Services=
[[Category:OPS235]][[Category:OPS235 Labs]]
==Overview==
* In this lab, you are going to help conserve 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 programs (via git, and decompressing zipped tarball archives and then compiling source code).
* In addition, you will learn about how certain processes (services) work, and how the system administrator can manage these services (i.e. turn "on" and "off").
 
==Objectives==
==Required Materials (Bring to All Labs)==
* '''Fedora 16 17 LIVE CD''' - You can burn this onto a CD-R in the Open Lab* '''Fedora 16 x_64 17 x86_64 Installation DVD''' - You can burn this onto a DVD-R in the Open Lab (or burn image onto a DVD+R if you are using the Freedom Toaster).* '''SATA Hard Disk''' (in removable disk tray)* '''USB Memory Stick''' (minimum 64M)* '''Lab Logbook (Lab5 Reference Sheet)''' (to make notes and observations).
==Prerequisites==
|- valign="top"
|
*[http://linuxmanpages.com/man8man1/tar.81.php tar]*[http://linuxmanpages.com/man8man1/gizgzip.81.php gzip]*[http://linuxmanpages.com/man8man1/gunzipizgunzip.81.php gunzipzip]*[http://linuxmanpages.com/man8man1/make.81.php make]*[http://schacon.github.com/git/git.html git]
|
*[http://www.linuxcertif.com/man/1/systemctl/ systemctl]
* [http://www.centos.org/docs/2/rhl-gsg-en-7.2/s1-zip-tar.html archiving with tar, gzip, gunzip]
* [http://www.tuxfiles.org/linuxhelp/softinstall.html Compiling Software from Source Code]
* [http://schacon.github.com/git/everyday.html Using git]
* [[init vs systemd]]
 
==Archiving Files / Compiling Software from Source Code==
{{Admon/note|Use fedora3|Perform these steps in the '''fedora3''' virtual machine.}}
#Boot up your '''fecora3fedora3''' VM.
#Change your working directory to <code>/usr/share/doc/sudo*</code>
#Use the tar (tape archiver) command to create an archive file named <code>/tmp/archive1.tar</code>
'''Answer the Investigation 1 observations / questions in your lab log book.'''
 
===Investigation 2: How do you restore files from an archive?===
In order to build software from source code, you must have the appropriate software development tools (such as make and gcc) and libraries (such as GTK) installed. The required tools will vary depending on the computer languages used in the software being built.
#Boot up your '''fecora2fedora2''' VM.<!-- corrected a couple typos Eric D.--># Issue the following command to install a basic set of development tools and libraries:<br /><code>yum groupinstall "Development Tools" "Development Libraries"</code>.
{{Admon/note|Installing Development Libraries|In the future, remember the above procedure whenever installing software from source. Sometimes, you need to install additional tools or libraries in order to compile a particular software package}}
'''Answer the Investigation 3 observations / questions in your lab log book.'''
 
 
===Investigation 4: Using git===
 
{{Admon/note|Use '''VM NAME'''|Perform these steps in the '''NAME''' virtual machine.}}
 
#Insert Lab investigation instructions here.
 
'''Answer the Investigation 4 observations / questions in your lab log book.'''
 
==Managing Run-Levels and System Services==
===Investigation 54: How do we Manage Runlevels?===
{{Admon/note|Use fedora2|Perform these steps in the '''fedora2''' virtual machine.}}
'''Runlevel''' is a Unix/Linux term relating to the operating system's mode of operation. For example, if the operating system operates in text-based or graphical mode, reboot, shutdown, etc. We will be learning to switch to different runlevels in your fedora2 virtual machine. #Switch to your '''fedora2''' VM.#Issue the following Linux command to determine your runlevel:#*<code>runlevel</code><br />The number '''5''' indicates that your fedora2 VM is currently in '''"runlevel 5"''' or '''"graphical mode with networking"'''. {{Admon/note|The runlevel command is now depreciated|Although you can still use the '''runlevel''' command, it is considered obsolete (deprecated)in Fedora, and has been replaced by '''systemctl'''.<br />The newer system called '''systemd''' is a newer method to help simplify controlling both runlevels (referred to as "targets" and system services (referred to as "services").<br />Refer to the tutorial [[init vs systemd]] for systemctl command usages and reference.}} 
<ol>
<li value="3">Issue the following Linux command:
<ul>
<li><code>systemctl list-units --type=target</code></li>
</ul>
</li>
<li>Note the target labelled graphical. What does this indicate about your fedora2 VMNow trace the chain of links starting at /etc/systemd/system/default.target - what's it ultimately pointing to?</li> <li>Issue the following commands to switch the default mode (also known as target or , formerly runlevel):
<ul>
<li><code>rm /etc/systemd/system/default.target</code></li>
<li><code>ln -sf s /lib/systemd/system/multiusermulti-user.target /etc/systemd/system/default.target</code></li>
</ul>
<li>Restart your fedora2 VM. What happens?</li>
<ul>
<li><code>rm /etc/systemd/system/default.target</code></li>
<li><code>ln -sf s /lib/systemd/system/graphical.target /etc/systemd/system/default.target</code></li>
</ul>
</li>
</ol>
'''Answer the Investigation 5 4 observations / questions in your lab log book.''' 
===Investigation 65: How do we Manage System Services?===
{{Admon/note|Remain in your fedora2 VM|Perform these steps in the '''fedora2''' virtual machine.}}
We have seen that maintaining unneeded '''packages can be a security risk''' due to the unnecessary increase in the complexity of your system. Similarly, it is also unnecessarily hazardous, and even more so, to leave unneeded services running. In this investigation, we will learn how to '''control services, and turn off those services that we think are not necessary to help reduce security risks'''.}}
 
#Issue the following Linux command:
#* <code>chkconfig --list</code>
#Note the services that are running.
 
{{Admon/note|'''chkconfig''' command is now deprecated|The '''chkconfig''' command has now been replaced by the '''systemctl''' command to manage system services.}}
<ol>
<li value="3">Issue the following Linux command:
<ul>
<li><code>systemctl list-units --type=service</code></li>
</ul>
</li>
<li>Note the services that are currently running. Are there more services with this command as opposed to issuing the chkconfig command? How to you issue the systemctl command to list the current run-level?</li> <li>Refer to the tutorial ([[init vs systemd]] ) to learn how to use the systemctl command to stop the service name called named '''udev.serviceiptables'''</li>
<li>Issue the systemctl command to verify that this service has stopped.</li>
<li>Issue If you reboot now - the iptables service will be turned back on. We don't want it on though, it causes students headaches. To turn it off permanently we need to disable the service. Refer to the tutorial ([[init vs systemd]] ) to learn how to use the systemctl command to start disable the service named '''udeviptables''' service, </li> <li>Reboot and verify confirm that this service is it's no longer running.</li>
</ol>
'''Answer the Investigation 6 5 observations / questions in your lab log book.''' 
==Completing the Lab==
# Compressed files: <code>/tmp/archive1.tar.gz</code> and <code>/tmp/archive2.tgz</code>
#<code>nled</code> application is installed
#Application installed from git repository
#Lab5 notes how to use systemctl commands
#VMs backed-up
==Preparing for the Quizzes==
#What is the advantage of disabling services such as bluetooth?
#What is the difference between a .tgz file and a .tar.gz file? What do these stand for?
#What is the purpose of a repository?
#What is the purpose of the git utility?
#What is source code?
#How do you build software from source code?
13,420
edits

Navigation menu