Changes

Jump to: navigation, search

Lab 3 Warnings / Debrief

4,278 bytes added, 07:59, 13 October 2015
no edit summary
<u>== Rescuing Your System</u>==
{| width="50%" align="right" cellpadding="10"
:Not being able to start your '''c7host''' due to '''Kernel Panic''' or some sort of '''catastrophic disk failure''' is not as easy to fix. You might be able to boot from your '''Centos LIVE DVD, open a terminal and mount the partition''' via command line and look for possible problems (setup files like '''/etc/fstab'''). '''Lab5''' will discuss more about mounting and the /etc/fstab file. The "worst-case scenario" would be to purchase a new hard disk, '''perform lab1 completely, perform lab2 to install and set-up virtualization software''', then '''restore your VM image and xml file backups''' (eg. decompressing images, issuing virsh define commands for .xml files). That is why consistently '''performing backups of ALL of your VMS at the end of each lab is absolutely essential! You have been warned!'''
 
 
== Installing Application Software ==
 
There are many different methods and utilities for installing application software depending on the type of Linux distribution you have.
For example:
 
* Debian-based Linux distros: apt-get, debi, gdebi, synaptic package manager, Ubuntu Software Center
* Redhat / Centos / Fedora distros: yum, rpm, gnome-packagekit
 
 
 
We will concentrate on the installing applications for the Centos Linux distribution, and focus on command-line application installation utilities (since centos3 VM is text-based only).
 
 
We will look at a couple methods of installing software: A traditional method ('''compiling source code''') and a more modern method ('''yum install''')
 
 
<u>'''Install Method #1: Compiling Source Code'''</u>
 
This is the original way of installing software in Linux / Unix.
 
 
'''Advantages''':
* Although it seems "out-dated", it may be useful with installing very old or "leading edge" software that are not contained in repositories, and cannot be installed using the ''yum'' utility.
 
 
'''Limitations''':
* Does not automatically resolve "dependency issues". This may require that you first install applications or development libraries before installing the software. This can be cumbersome.
* Cannot use rpm or yum utility to provide information database of installed software.
 
 
'''Steps to Compile Source Code''':
# Obtain compressed file containing source code (usually a "zipped tarball")<br>eg. '''wget [ URL of zipped tarball ]'''
# Decompress zipped tarball. For example '''tar xzvf [ filename.tar.gz | filename.tgz ]'''<br> Note: You can compress (create archives) by using the tar command as well.<br>For example: '''tar czvf [ filename.tar.gz ] [ directories or files to archive ]'''
# Change to directory containing source code. You may need to run a script called '''./config''' (if present) to check for some dependency issues.
# Usually good idea to check for installation instructions in a file called INSTALL and/or README
# Issue the command: '''make''' to compile. This will create an executable file in the source-code directory (usually as a file named after the application).
# As root, issue the command: '''make install''' to make command available to run from any directory. If the ''make install'' command does not work, you can copy the compiled program to '''/bin''', '''/usr/bin''', or '''/usr/local/bin'''.
 
 
<u>'''Install Method #2: Using the '''yum''' Utility'''</u>
 
This is a newer and more preferred method of installing software by command-line on a Redhat / Centos / Fedora Linux distribution. The yum utility is a program which is a <u>'''wrapper'''</u> for the rpm command. A wrapper program simply means a program that uses another utility (in this case, the rpm command). We have used the rpm command to query or determine information regarding installed applications on our Linux systems. When your Linux operating systems were installed, the installation DVD or network media contained rpm files that were installed on the system. Rpm files are simply pre-compiled programs that make it easier to install applications for a Linux system.
 
 
'''Advantages''':
* yum program can install rpm files on a Linux repository (online Linux distribution database) or from local media
* yum program automatically determines "dependency issues", and has them installed first, then install the intended application
* yum program uses rpm utility which can provide rpm queries to determine install application information
 
 
'''Limitations''':
* May not be used for installing very old or "leading edge" software that are not contained in repositories, and cannot be installed using the ''yum'' utility.
 
 
'''Steps to Install using yum Program''':
# List available repositories that you are connected to using the command: '''yum repolist''' (you can use the yum install command to manually add repositories)
# To clean-up the repository list (including downloading new applications in added repositories), issue the command: '''yum clean all'''
 
# To install of remove applications, issue the commands as root: '''yum install packagename''' or '''yum remove packagename'''
# To install applications contained on local media (eg. installation DVD), issue the command: '''yum localinstall [ full_pathname_to_xchat_rpm_file ]'''
# To provide information regarding installed application, issue the command: '''yum info packagename''' or '''rpm -qi packagename'''
 
 
== Common Mistakes / Warnings ==
* '''FOLLOW THE INSTRUCTIONS CAREFULLY''' in terms of access safe mode, or changing root's password.<br><br>
* You need to be root in order to use '''yum''' utility!
* Remember to backup your VMs after you have completed lab3! Perhaps you can use that shell script to backup all VMs!<br><br>
* Remember to backup your VMs after you have completed lab3! Perhaps you can use that shell script to backup all VMs!<br><br>
* If need to start-over, you can right-click on VM in Virtual Machine Manager, and remove (Make certain "delete files" is also selected, so you can re-use VM name).
13,420
edits

Navigation menu