home work
Instructions
Answer all questions directly in this document. You will save and upload this completed document as your homework submission.
Overview
In this assignment you will install software using the repository, install software from source and finally evaluate Linux distributions for a specific need then install the selected distribution.
Task 1—software maintenance using the repository
This task will explore software maintenance using the Debian packaging system and apt. You will need internet connectivity for this to work!
1) Viewing the repository. The repository list is contained in the file /etc/apt/sources.list.
a) View sources.list using the cat command
cat /etc/apt/sources.list
from the output answer the following questions
b) What version of Debian repository is being used (hint the version is just after the url)?
here to enter text.
c) View the urls, list the unique urls. Click here to enter text.
2) Updating your catalog of software. Before performing software installation it is a good idea to
update the catalog of packages available for your system.
a) To update your sources enter:
sudo apt-get update
Click
b) How many files were downloaded? Click here to enter text.
3) Upgrading the software installed on your system. Now you will upgrade all the installed software on
your system to the latest version in the repository, this may include the kernel itself. a) Enter the command:
sudo apt-get upgrade
this may take quite some time, just be patient.
©Craig Lindstrom 2013-2015 all rights reserved, use or duplication without permission is prohibited. 1
4) Viewing what is installed on your system. It is kind of weird but apt does not provide a nice way to see what is installed on your system. To view the installed packages you must use the Debian package manager directly.
a) Enter the command:
dpkg --get-selections
Whoa, that list is pretty long, use less to make it easier to browse
dpgk --get-selections|less
b) Is the ispell package installed? Click here to enter text.
c) How many packges are in the list? Click here to enter text. Record the command(s) you
used to get that number. Click here to enter text.
5) Searching the repository. Since there is local copy of the repository’s catalog cached on your
system, you can easily search through it to find and install software. You are interested in a better editor to write scripts and a simple pdf viewer. The apt-search command allows you to search for packages in the cache, in its simplest form you just enter the search words you want.
a) First find a pdf viewer.
i) Enter:
apt-cache search pdf
ii) The resulting list is rather large, take some time and view the list of packages. You may want to pipe the command through less to make it easier to view. Notice that not all the results are pdf viewers, it contains all kinds of things from documentation in pdf files to pdf creators. Try to modify the search with additional words that might refine the list. Try adding the word viewer to the search:
apt-cache pdf viewer
iii) Choose a pdf viewer to install, the package name is the first part of the line, it may contain
“-“ characters. Record your choice here. Click here to enter text.
b) Now find a better script editor. Somewhere you heard of a script editor named kate, to install it you need to know the package name and if it is available in the repository. Find the package for
kate.
i) Is the kate editor in the repository?
ii) What is the package name for the editor?
iii) What is the description of the package?
6) Installing software
a) Now that you have located software you would like to install installation is really easy. To install
software you use the command apt-get install <package> (where <package> is the name of the
package you want to install). Hint: you need root privileges to install software.
b) Install the pdf view you chose.
i) Enter the complete command you used. Click here to enter text.
ii) How much additional disk space is needed? Click here to enter text.
c) Test the installation
©Craig Lindstrom 2013-2015 all rights reserved, use or duplication without permission is prohibited. 2
i) Get a pdf document to test the view with. cd ~
wget http://classfiles.esage.com/lintro/labfiles/intro-linux.pdf
ii) Make sure you got the document using the ls command.
iii) Open the pdf document with the software you installed. Try a command similar to
<programname> intro-linux.pdf so if I had installed zathura I might enter zathura intro- lunux.pdf. The installer may have added a menu item for the program as well. See if you can find one.
(1) Whatcommanddidyouusetoopenthepdfdocument? Clickheretoentertext. (2) The installer may have added a menu item for the program as well. See if you can find
one. Did the installer add a menu item?
it? Click here to enter text. d) Install the kate text editor
i) Enter the complete command you used.
ii) How much additional disk space is needed?
Task 2—installing from source
Click here to enter text.
Click here to enter text. Click here to enter text.
If so where was
Now you will download the source code to a program, compile and install it. Since you have the source code you will modify the program and recompile your changes. The source code will be for the looper program you have been using in class.
1) Getting the source code
a) First you need to get a copy of the source code. Enter the following commands:
cd ~
wget http://classfiles.esage.com/lintro/labfiles/looper.tar
b) Since the author provided a MD5 has you will now download that
wget http://classfiles.esage.com/lintro/labfiles/looper.md5
2) Verify the contents of the tarball with a MD5 hash.
a) Compute the MD5 hash for your downloaded file
md5sum looper.tar
Record the hash. Click here to enter text.
b) View the hash as recorded on the source web site
cat looper.md5
Record the hash. Click here to enter text.
c) Do the hashes match? Click here to enter text. What does that mean? Click here to
enter text.
3) Extract the contents of the tarball.
a) Enter the command:
tar -xf looper.tar
©Craig Lindstrom 2013-2015 all rights reserved, use or duplication without permission is prohibited. 3
b) When you extract the tarball it creates the directory looper. What files are in the looper
directory? Click here to enter text. 4) Install looper using the provided script
a) Attempt to install the looper program via the provided install script. looper/install.sh
i) What was the output? Click here to enter text.
ii) Fix the problem then try again. What did you do to fix the problem?
iii) After you have successfully installed looper into /usr/bin continue.
b) Run the looper program with the help option looper help
i) What version is the looper program? Click here to enter text.
5) Modifying the looper program: Since you have the source code to the looper program you will now
use the fancy new kate editor to modify the source and reinstall. The program is written in c but don’t work you will only change one little thing.
a) Open the source code with the kate editor
kate looper/looper.c
b) Close the tips.
c) Edit the version information. Look for a line that starts with minor=, there will be a number
after the equals sign and a semicolon will follow that. Replace the number with a number that is
one greater that the number that was there. If the line was minor=0; change it to minor=1;
d) Save the file and close kate.
e) Reinstall the program
sudo looper/install.sh
f) After successful installation the looper program is run with the help option. You should see your new version number change. If not figure out what went wrong and fix itJ
6) Congratulations! You have installed from source.
Task 3—installing Linux
1) Assessing your needs:
a) Consider your computing needs. You are to come up with a computing need you have for Linux
then evaluate different distributions. You may choose any need you have (or could have) to base your homework on. Some types to consider, Full desktop, Server, Appliance (such as firewall or media center), minimal install.
b) Describe your usage scenario (include hardware requirements/limitations):
Click here to enter text.
2) Evaluate at least 3 distributions
a) Research and evaluate at least 3 distributions that may fulfill your scenario. Define criteria for
selection (minimum of 5), consider things such as cost, capabilities, ease of use, ease of maintenance, support etc. Create an analysis matrix that compares the alternative. Weight your criteria and score each alternative. An example table might look like this. An example may look like this:
©Craig Lindstrom 2013-2015 all rights reserved, use or duplication without permission is prohibited. 4
Criteria (max points)
Option 1 (dist x)
Option 2 (dist y)
Option 3 (dist z)
1. Ease of use (3)
2
1
3
2. Hardware footprint (3)
2
2
2
3. Support (3)
0
1
2
4. Media support (1)
0
1
1
Score
4
5
8
You may use this table for your evaluation matrix, If this table will is not sufficient for your needs create another document in word and upload both documents as your assignment submission.
3) Task 3—install the winning distribution:
a) From the results of your analysis in Task 2 install the selected distribution either on physical
hardware or in a virtual machine. I you are interested in a server on the internet Digital Ocean has great prices, their small droplet is only $5/month. If you use this link you will get a $10 free credit. https://www.digitalocean.com/?refcode=86b63200b05a
b) Take a screen shot of your system after installation and paste it here.
Criteria (max points)
Option 1
Distribution.
Option 2
Distribution
Option 3
Distribution
Criteria
score
score
score
4) Record your observations:
a) Write a paragraph describing your evaluation and installation experience, include things such as
how easy was it to identify your distribution? How easy was the installation? Do you think your choice will meet your objectives? Click here to enter text.