Sie sind auf Seite 1von 49

Compression, back-up, and software installation

Unit objectives
 Use compression utilities to compress
Course ILT

and decompress files


 Perform system back-ups and view
and extract archives
 Compile and install software packages
from source code and use the Red
Hat Package Manager
 Compress binary files and image files
Topic A
 Topic A: Compression
 Topic B: System back-up
Course ILT

 Topic C: Software installation


 Topic D: Compressing binary and
image files
Compression
 Process in which files are reduced in
size by a compression algorithm
Course ILT

 Compression algorithm
– Instructions used to reduce the contents
of a file
Common compression utilities
 compress
 gzip
Course ILT

 bzip2
The compress utility
 Uses an algorithm to make file smaller
 Average ratio: 40-50%
Course ILT

 zcat
– Used to view the contents of archive
created with compress or gzip
 zmore
– Used to view page-by-page
 uncompress
– Decompresses files that were processed
with compress
Common options with the compress utility
Course ILT
GNU zip (gzip)

 Algorithm varies slightly from that


Course ILT

used by compress
 Yields better compression
 Typical ratio: 60-70%
Course ILT Common options with gzip

continued
Course ILT Common options with gzip, continued
The bzip2 utility
 Uses a different algorithm than
compress or gzip
Course ILT

 zcat and zmore cannot be used


 Average ratio: 50-75%
 bzcat
– Used to view the contents of archive
created with bzip2
 bunzip2
– Used to decompress files
Course ILT Common options with bzip2
Course ILT Activity A-1

Compressing and uncompressing


files
Topic B
 Topic A: Compression
 Topic B: System back-up
Course ILT

 Topic C: Software installation


 Topic D: Compressing binary and
image files
System back-up
 Process of copying files to an archive
 Archive
Course ILT

– Location (file or device) that contains a


copy of files
– Typically created by a back-up utility
Course ILT Device files for different tape devices
magnetic tape (mt) command
 Used to control tape devices
Course ILT
Course ILT Activity B-1

Discussing back-up media


Back-up utilities

 tar
 cpio
Course ILT

 dump/restore
Tape archive (tar)
 One of the oldest and most common
back-up utilities
Course ILT

 Accepts options to determine the


location of the archive and the action
to perform on the archive
Course ILT Common options with tar

continued
Course ILT Common options with tar, continued
Tarballs

 A gzip-compressed tar archive


Course ILT

 Used for software distribution as well


and back-up
Course ILT Activity B-2

Using the tar utility


The copy in/out (cpio) utility

 Common back-up utility


Course ILT

 Options similar to tar with added


features
– Can back up device files and long
filenames
 Uses absolute pathnames by default
Course ILT Common options with cpio
The dump/restore utility
 Full back-up
– Archives an entire filesystem
Course ILT

 Incremental back-up
– Archives only files modified since the last
full back-up
 Works only with files on ext2 and ext3
filesystems
Course ILT A sample back-up strategy
Course ILT Options with dump/restore
restore command
 Extracts archives created with the
dump command
Course ILT
Course ILT Activity B-3

Using cpio and dump utilities


Topic C
 Topic A: Compression
 Topic B: System back-up
Course ILT

 Topic C: Software installation


 Topic D: Compressing binary and
image files
Forms of software distribution
 Binary program files
– Pre-compiled to run on specific hardware
Course ILT

 Source code
– Must be compiled on the local
architecture
 RPM package
– Use Red Hat Package Management
system
Package manager

 Defines a standard package format


Course ILT

 Can be used to install, query, and


remove packages
 Red Hat Package Manager (RPM)
– The most commonly used
Compiling source code into programs

 The procedure for compiling source


code into binary programs is
Course ILT

standardized today among most open


source software developers
 GNU C Compiler (gcc)
– Command used to compile source code
into binary programs
Course ILT Activity C-1

Discussing forms of software


distribution
Installing from source code
1. Uncompress and extract files
2. Run configure
Course ILT

3. Run make
4. Run make install
Course ILT The LTRIS program
Course ILT Activity C-2

Compiling and installing a program


from source code
RPMs
 Filenames indicate hardware
architecture the software was
Course ILT

compiled for
 rpm command
– Command used to install, query, and
remove RPM packages
Course ILT Common options with RPM
Red Hat Package Manager
 Graphical tool that may be used to
install RPM packages available with
Course ILT

the GNOME/KDE desktop


environment
Course ILT The RPM interface
Course ILT Activity C-3

Using RPM to install and remove


software
Topic D
 Topic A: Compression
 Topic B: System back-up
Course ILT

 Topic C: Software installation


 Topic D: Compressing binary and
image files
gzexe
 Compresses binary programs
Course ILT
Course ILT Activity D-1

Using the gzexe utility


Compressing images
 Use the cjpeg program to compress
.tga image files and convert them to
Course ILT

JPEG format
 The cjpeg program converts a .jpeg
image file to grayscale
Course ILT Activity C-2

Using the cjpeg utility


Unit summary
 Compressed and decompressed files
using compression utilities
Course ILT

 Performed system back-ups and


viewed and extracted archives
 Compiled and installed software from
source code, and use the Red Hat
Package Manager
 Compressed binary and image files

Das könnte Ihnen auch gefallen