Download presentation
1
Linux Operations and Administration
Chapter Nine Installing Software Packages
2
Objectives Manage software packages with the RPM utility
Handle RPM software dependencies Install, upgrade, and remove software at the command line Add remote software repositories in openSUSE Work with software packages in YaST Software Manager
3
Working with RPM Software Packages
Software packages for Linux and UNIX used to be available in compressed tar archives called tarballs or in cpio (copy in/out) format Problems These formats had no features for upgrading or uninstalling software Installation was tedious Package management utilities developed to address these shortcomings
4
Working with RPM Software Packages (cont’d.)
RPM Package Manager (RPM) Used to install and manage software packages Software package An archive of related files, such as configuration, data, and documentation files, constituting a software application Has a label containing metadata Metadata is descriptive information, such as name, version, size, and description of its contents
5
Working with RPM Software Packages (cont’d.)
RPM utility Open-source software licensed under the GPL Many Linux distributions, including openSUSE, have it installed already Can be used on many OSs, such as OS/2, Solaris, AIX, Sun OS, IRIX, UNIX, and several Linux distributions
6
Working with RPM Software Packages (cont’d.)
Used to build, install, query, verify, update, and uninstall software packages in Linux Can also be used to package a software application in source code or binary form RPM package Contains an archive of: Files Package details: such as name, version, and description
7
Working with RPM Software Packages (cont’d.)
Packages built with RPM have some advantages: Upgrading Uninstalling Verification Querying
8
The RPM Utility rpm command can be used in one of the following modes:
Querying Can be done by any user Installing, upgrading, and removing Can be done only by the root user
9
The RPM Utility (cont’d.)
You might have to specify: Package name Source RPM name Package file Table 9-1 Describes common options used with this command
10
The RPM Utility (cont’d.)
Table 9-1 Common rpm options
11
Querying Packages Querying with rpm command -q option
Gives package details from the RPM database -q option Used to run a query Used to determine version and release information for software packages
12
Installing Packages RPM packages have an .rpm extension and filenaming conventions Example: OpenOffice_org-writer i586.rpm Name Describes the software “OpenOffice_org-writer” in the example
13
Installing Packages (cont’d.)
Version Indicates the package’s version number in the example Release Software release number 1.2.3 in the example Architecture Specifies the architecture (the type of hardware the package is meant to run on) i586 in the example
14
Installing Packages (cont’d.)
Example F-Spot package (version , release for i586 hardware) installed with -i, -v, and -h options Second and third lines show some of command’s output
15
Installing Packages (cont’d.)
Functions performed by RPM utility during installation: Dependency checks Preinstallation tasks Conflicts Unpacking Postinstallation tasks Storage
16
Upgrading Packages Upgrading packages with the RPM utility
Similar to installing them, but you use the -U option Syntax example: rpm -U install-options package–filename Example where a software package is upgraded
17
Upgrading Packages (cont’d.)
Smart update RPM retains previous version’s configuration file –U option also works well when no previous version of the package is on the system It simply installs the package instead of performing an upgrade
18
Upgrading Packages (cont’d.)
-F (freshen) option Also used to upgrade software packages Can be used with a group of packages Especially useful if you have downloaded several packages and want to upgrade only the ones already installed
19
Upgrading Packages (cont’d.)
Example showing use of -F option when a previous version doesn’t exist: Package wasn’t installed because no older version was in place
20
Upgrading Packages (cont’d.)
Example showing use of -F option to upgrade an existing package: Command to upgrade only the packages for which an older version is already installed: # rpm –Fvh *.rpm
21
Uninstalling Packages
RPM makes uninstalling packages fast and easy Use -e option in this format: rpm -e package–name You don’t have to specify package’s full name Example: rpm -q f-spot f-spot i586 rpm -e f-spot
22
Uninstalling Packages (cont’d.)
Activity 9-1: Using the RPM Utility Download an RPM package and install, delete, and upgrade it
23
RPM Dependencies RPM dependencies feature
Determines whether a software package depends on another application to run Indicates what capabilities an installed package provides to other applications
24
RPM Dependencies (cont’d.)
RPM dependencies feature useful in: Trying to delete a package that’s providing capabilities to another application Installing a software package that requires the capabilities of another application
25
RPM Dependencies (cont’d.)
RPM “dependency loop” Solution: a front-end package manager Provides a user interface to make package management more user friendly Table 9-2 Describes a few widely used front-end package managers
26
RPM Dependencies (cont’d.)
Table 9-2 Front-end package managers
27
Working with Software Packages in OpenSUSE
After openSUSE is installed: Software packages are installed Repositories used to install or update packages are installed Repository A storage location for software packages Usually a Web server, but can also be on the local system
28
Working with Software Packages in OpenSUSE (cont’d.)
Software in openSUSE is indexed You can search for software by using patterns Patterns are collections of packages that define a type of function Such as server packages
29
The yast Command Can be used to configure: Table 9-3 Hardware
Network connections and clients Services General system options Such as language, partitioning, and boot loaders Table 9-3 Describes some common options used with yast command
30
The yast Command (cont’d.)
Table 9-3 Common yast options
31
The yast Command (cont’d.)
Activity 9-2: Using the yast Command Use the yast command to install and remove a package
32
Software Repositories
openSUSE Configured Software Repositories tool Another resource for working with software packages To open: Use yast --gtk command as the root user Click Software Repositories icon
33
Software Repositories (cont’d.)
Figure 9-1 The Configured Software Repositories tool © Cengage Learning 2013
34
Software Repositories (cont’d.)
If yast command is used to install software that can’t be located in one of the repositories: Error similar to Figure 9-2 is shown To prevent this problem: Use Configured Software Repositories tool to add software repositories
35
Software Repositories (cont’d.)
Figure 9-2 An install error © Cengage Learning 2013
36
Software Repositories (cont’d.)
Three types of software repositories for version 11.2 that are available automatically: OSS (Open Source Software) NON-OSS (Not Open Source Software) Update (official security and bug-fix updates)
37
Software Repositories (cont’d.)
Table 9-4 Describes some common repositories that are available for download Activity 9-3: Using a Third-Party Software Repository Add a third-party software repository to your list of trusted repositories
38
YaST Software Manager OpenSUSE has a graphical utility for installing, updating, and removing software To open Software Manager On a KDE machine Click the Kickoff Application Launcher button Click the Applications tab Click System Click YaST
39
YaST Software Manager (cont’d.)
Another method to open Software Manager Issue yast --gtk command (logged in as root) Click Software Management icon Buttons at the top of Software Manager window Available Displays packages that can be installed based on existing repositories Upgrades Displays packages for which newer versions are available
40
YaST Software Manager (cont’d.)
Figure 9-3 YaST Software Manager © Cengage Learning 2013
41
YaST Software Manager (cont’d.)
Installed Displays all packages installed on your system All Displays the combined results of the Available, Upgrades, and Installed lists
42
YaST Software Manager (cont’d.)
Filter list box has the following selections: Groups Displays software packages by category, such as Admin Tools or Education Patterns Lists packages grouped by function, such as Base Technologies or Graphical Environments Languages Contains all language package files Repositories Filters packages based on the repository to which they belong
43
YaST Software Manager (cont’d.)
Search field You can enter the name of a software package to see the RPM name and a summary of its attributes Activity 9-4: Working with the YaST Software Manager Use the YaST Software Manager to install, upgrade, and remove packages
44
Summary RPM Package Manager (RPM) Software package
A utility used to install and manage software packages Software package An archive of related files constituting a software application RPM packages have several advantages over traditional packages rpm command is used to query the RPM database and install, remove, and upgrade packages
45
Summary (cont’d.) RPM dependencies feature Software repositories
Determines whether a package relies on another application to run Software repositories Storage locations for software packages YaST Software Manager An easy-to-use GUI package manager yast command Used to install, update, and uninstall software packages along with their dependencies
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.