Linux+ Guide to Linux Certification, Third Edition

  • Published on
    10-Feb-2016

  • View
    37

  • Download
    0

Embed Size (px)

DESCRIPTION

Linux+ Guide to Linux Certification, Third Edition. Chapter 11 Compression, System Backup, and Software Installation. Objectives. Outline the features of common compression utilities Compress and decompress files using common compression utilities - PowerPoint PPT Presentation

Transcript

  • Linux+ Guide to Linux Certification, Third EditionChapter 11Compression, System Backup, and Software Installation

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*ObjectivesOutline the features of common compression utilitiesCompress and decompress files using common compression utilitiesPerform system backups using the tar, cpio, and dump commandsView and extract archives using the tar, cpio, and restore commands

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*Objectives (continued)Use burning software to back up files to CD and DVDDescribe common types of Linux softwareCompile and install software packages from source codeUse the Red Hat Package Manager to install, manage, and remove software packagesUse the yum command to obtain software from Internet software repositories

    Linux+ Guide to Linux Certification, 3e

  • CompressionCompression: process in which files are reduced in size by stripping out charactersCompression algorithm: standard set of instructions used to compress a fileCompression ratio: percentage by which the file size was decreasedCommon compression utilities include compress, gzip, and bzip2Linux+ Guide to Linux Certification, 3e*

    Linux+ Guide to Linux Certification, 3e

  • The compress UtilityUse to compress files using the Adaptive Lempel Ziv coding (LZW) compression algorithmAverage compression ratio of 40-50%compress command: used to compress fileszcat command: used to display the contents of an archive created with compressCan use zmore and zless commands to view contents page-by-pageuncompress command: used to decompress files compressed by compress commandLinux+ Guide to Linux Certification, 3e*

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The compress Utility (continued)Table 11-1: Common options used with the compress utility

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The gzip UtilityGNU zip (gzip): used to compress files using the Lempel-Ziv compression algorithm (LZ77)Varies slightly from algorithm used by compressAverage compression ratio of 60-70%Uses .gz filename extension by defaultCan control level of compression via numeric optiongunzip command: used to decompress .gz files

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The gzip Utility (continued)Table 11-2: Common options used with the gzip utility

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The gzip Utility (continued)Table 11-2 (continued): Common options used with the gzip utility

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The gzip Utility (continued)Table 11-2 (continued): Common options used with the gzip utility

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The bzip2 Utilitybzip2 command: used to compress files using Burrows-Wheeler Block Sorting Huffman Coding compression algorithmCannot compress directory full of filesCannot use zcat and zmore to view files Must use bzcat commandCompression ratio is 50% to 75% on averageUses .bz2 filename extension by defaultbunzip2 command: used to decompress files compressed via bzip2

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The bzip2 Utility (continued)Table 11-3: Common options used with the bzip2 utility

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The bzip2 Utility (continued)Table 11-3 (continued): Common options used with the bzip2 utility

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*System BackupSystem backup: process whereby files are copied to an archiveArchive: location (file or device) that contains copy of filesTypically created by a backup utilityShould backup user files from home directories and any important system configuration filesPossibly files used by system services as wellSeveral backup utilities availabletar, cpio, dump/restore, burning software

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*System Backup (continued)Table 11-4: Common tape device files

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The tar UtilityTape archive (tar) utility: one of oldest and most common backup utilitiesCan create archive in a file on a filesystem or directly on a devicetar command: activates tar utilityArguments list the files to place in the archiveAccepts options to determine location of archive and action to perform on archive

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The tar Utility (continued)Table 11-5: Common options used with the tar utility

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The tar Utility (continued)Table 11-5 (continued): Common options used with the tar utility

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The tar Utility (continued)tar utility does not compress files inside archiveTime needed to transfer archive across a network is highCan compress archiveBacking up files to compressed archive on a filesystem is useful when transferring data across a networkUse options of the tar command to compress an archive immediately after creation

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The cpio UtilityCopy in/out (cpio): common backup utilityActivated by the cpio commandHas various optionsIncludes options similar to tar utilityHas added features Ability to back up device files Long filenamesUses absolute pathnames by default when archiving

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The cpio Utility (continued)Table 11-6: Common options used with the cpio command

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The cpio Utility (continued)Table 11-6 (continued): Common options used with the cpio command

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The dump/restore Utilitydump/restore: Used to back up files and directories to device or file on filesystemWorks only with files on ext2 and ext3 filesystemsDesigned to backup entire filesystems to an archive/etc/dumpdates: file used to store information about incremental and full backups

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The dump/restore Utility (continued)Full backup: archiving all data on filesystemIncremental backup: backs up only data that has changed since last backupCan perform up to nine different incremental backups dump command: create archives for full or incremental backuprestore command: extract archives created with dump

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The dump/restore Utility (continued)Figure 11-1: A sample back-up strategy

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*The dump/restore Utility (continued)Table 11-7: Common options used with the dump/restore utility

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*Burning Softwaretar, cpio, and dump utilities copy data to backup medium in character-by-character or block-by-block formatTypically used with tape, floppy, and hard disk mediaDisc burning software: used to write files to CD or DVD mediaBuild CD or DVD filesystem, organize the data, and write it all to CD or DVDFedora 13 comes with Brasero Disc Burner burning software

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*Burning Software (continued)Figure 11-2: The Brasero Disc Burner program

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*Software InstallationSoftware for Linux can consist of: Binary files precompiled to run on certain hardware architectures Source code, which must be compiled before useTypically distributed in tarball formatPackage manager: system that defines standard package format Used to install, query, and remove packagesRed Hat Package Manager (RPM): most common package manager used by Linux systems today

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*Compiling Source Code into ProgramsProcedure for compiling source code into binary programs standardized among most OSS developersmake command: looks for Makefile and it to compile the source code into binary using compilerMakefile: contains most of the information and commands necessary to compile a program, as well as instructions for use of commented areasmake install command: copies complied executable programs to correct location

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*Compiling Source Code into Programs (continued)Figure 11-3: The rdesktop program

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*Installing Programs Using RPMPackages in RPM format have filenames that indicate hardware architecture for which the software was compiledEnd with .rpm extensionTo install an RPM package, use i option to rpm commandCommand used to install, query, and remove RPM packages

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*Installing Programs Using RPM (continued)After installation RPM database is updated to contain information about the installed package and files contained in it-q option: query the full package name-i option: together with q used to display full package information-f option: together with q used to display the package to which a specific file belongs-e option: used to remove a package from the system

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*Installing Programs Using RPM (continued)Figure 11-4: The bluefish program

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*Installing Programs Using RPM (continued)Table 11-8: Common options used with the rpm utility

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*Installing Programs Using RPM (continued)Table 11-8 (continued): Common options used with the rpm utility

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*Installing Programs Using RPM (continued)Most RPM packages are located on Internet ServersCalled software repositoriesyum command: used to search Internet software repositories for RPM packagesInstalls dependent packages if necessaryyum install packagename commandyum update packagename commandKPackageKit: graphical utility for installing or updating packages

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*Installing Programs Using RPM (continued)Figure 11-5: The KPackageKit utility

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*SummaryMany compression utilities are available for Linux systems; each uses a different compression algorithm and produces a different compression ratioFiles can be backed up to an archive using a backup utilityTo back up files to CD-RW or DVD-RW, use burning software instead of a backup utility

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*Summary (continued)tar is the most common backup utility used todayTypically used to create compressed archives called tarballsSource code for Linux software can be obtained and compiled afterward using the GNU C CompilerMost source code is available in tarball format via the Internet

    Linux+ Guide to Linux Certification, 3e

  • Linux+ Guide to Linux Certification, 3e*Summary (continued)Package Managers install and manage compiled software of the same formatThe Red Hat Package Manager is the most common package manager available for Linux systems todayYou can install or upgrade RPM packages using the yum commandyum command obtains RPM packages from software repositories on the Internet

    Linux+ Guide to Linux Certification, 3e

Recommended

View more >