Você está na página 1de 36

Software package

administration
DAY-7
Software package administration

Software administration involves adding and
removing software from systems.
Sun and its third-party vendors deliver products in a
form called a software package.
The term package In its simplest form,is defined as
under
A package is a collection of files and directories
Packages can be classified in two types
1) Native Packages
2) Third party Packages
Native Packages
The packages provided by the vendor are called as native
packages. (I.e by Sun Microsystems)
All Native packages are present in 2 of 2 CD.
Third party Packages - The packages provided by
other vendors are called as third packages.

NOTE:- All the required software packages are installed
automatically during the Solaris Software installation
process
Packages can be installed in two ways

1) Package administration commands
2) The admintool utility

Package administration commands
pkgadd, pkgrm, pkginfo,and pkgchk

The admintool utility
A graphical front-end tool for adding and removing
packages.

The pkginfo Command
The pkginfo Command
The pkginfo command is used to display information
about the software packages that have been installed on
the local systems disk.
Command Format
pkginfo [ -d [ device | pathname ] ] [ -l ] pkg_name
For example:
# pkginfo
SUNWman
SUNWbash
SUNWaudio

example:
# pkginfo | more
system SUNWman On linue manual pages
system SUNWab2m Solaris Documentation Server Lookup
system SUNWab2r Solaris Documentation Server

The columns of information that are displayed are described
CATEGORY - Is the package category, such as application, system,
PKGINST - Is the software package name;
if it begins with SUNW,it is a Sun Microsystems
product,
otherwise itrepresents a third-party package.
NAME Is a brief description of the software product.
Displaying Detailed Information for a Specific
Package
To view information for a specific software package,
specify its name on the command line, for example:
# pkginfo -l SUNWman
PKGINST: SUNWman
NAME: On-line Manual Pages
CATEGORY: system
ARCH: sparc
VERSION: 41.0,REV=31
BASEDIR: /usr
VENDOR: Sun Microsystems, Inc.
DESC: System Reference Manual Pages
PSTAMP: tinkertoym09133331
INSTRELEASE: May 19 2000 16:50
HOTLINE: Please contact your local service provider
STATUS: Completely Installed
FILES: 6420 installed pathnames
3 shared pathnames
74 directories
73925 blocks used (approx)
#
Displaying Detailed Information for All Packages on CD-ROM
To display information about software packages that resides on
the Solaris Software CD-ROM, use the pkginfo command with the
-d option.
This option defines the device on which the software packages
reside.
# pkginfo -d /cdrom/cdrom0/s0/Solaris_8/Product | more

To determine how many packages are currently installed on
disk,
Use the following command:
# pkginfo | wc -l

Displaying Detailed Information for Selected Package on CD-ROM

# pkginfo -d /cdrom/cdrom0/s0/Solaris_8/Product -l SUNWaudio
PKGINST: SUNWaudio
NAME: Audio applications
CATEGORY: system
ARCH: sparc
VERSION: 3.6.20,REV=1.1999.12.03
BASEDIR: /
VENDOR: Sun Microsystems, Inc.
DESC: Audio binaries
PSTAMP: dtbuild38s19991204142646
INSTDATE: May 19 2000 16:35
HOTLINE: Please contact your local service provider
STATUS: spooled
FILES: 5 spooled pathnames
2 directories
3 executables
4 package information files
681 blocks used (approx)
pkgadd Command
The pkgadd Command
When a software package is added, the pkgadd
command uncompresses and copies files from the
installation media to the local systems disk. This
command will ask for confirmation to continue with
package add process .
Command Format
pkgadd [-d [ device | pathname] ] pkg_name

# pkgadd -d /cdrom/cdrom0/s0/Solaris_8/Product SUNWaudio
Processing package instance <SUNWaudio> from
</cdrom/sol_8_sparc/s0/Solaris_8/Product>
Audio applications
(sparc) 3.6.4,REV=1.98.12.03
Copyright 1999 Sun Microsystems, Inc. All rights reserved.
Using </> as the package base directory.
## Processing package information.
## Processing system information.
2 package pathnames are already properly installed.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
This package contains scripts which will be executed with super-user
permission during the process of installing this package.
Do you want to continue with the installation of <SUNWaudio> [y,n,?] y
Installing Audio applications as <SUNWaudio>
## Installing part 1 of 1.
Installation of <SUNWaudio> was successful.
pkgchk Command
The pkgchk Command
The pkgchk command checks installation completeness,
pathname,file contents, and file attributes of a package.
Command Format
pkgchk [ options ] [-p path ...] [pkg_name]
For example:
The following example checks the contents and attributes
of a software package currently installed on the system.
# pkgchk SUNWaudio
Note If the pkgchk command does not display a
message it indicates that the package was installed
successfully.

pkgrm Command
To list the files contained in a software package, type:

# pkgchk -v SUNWaudio

The pkgrm Command
When a software package is removed from the system, the pkgrm
command deletes all files associated with that package.

Command Format
# pkgrm pkg_name

For example:

# pkgrm SUNWaudio


record of all the software packages
The /var/sadm/install/contents File
The /var/sadm/install/contents file is a complete record
of all the software packages installed on the local system
disk.
It references every file belonging to every software
package, and the configuration of products installed can
be viewed.
# more /var/sadm/install/contents
The pkgadd command updates the contents file
whenever new packages are installed.
The pkgrm command uses the contents file to determine
where files for a software package are located on the
system.
Identifying the Directory Location of a
Command
Use the grep command to search the
/var/sadm/install/contents file to determine if a particular
file was installed, and the directory where it is located.
For example, verify that the command showrev is
installed on the system disk.
# grep showrev /var/sadm/install/contents
/usr/bin/showrev f none 0755 root sys SUNWadmc
/usr/share/man/sman1m/showrev.1m f none 0444 bin bin SUNWman

SPOOLING
OF PACKAGES
Using a Spool Directory
For convenience, frequently installed software packages
can be copied from the Solaris Software CD-ROM to a
spool directory on the system.


Copying packages from the CD-ROM into a spool
directory is not the same as installing the packages on
disk.

Using a Spool Directory
# pkgadd -d /cdrom/cdrom0/s0/Solaris_8/Product -s spool SUNWaudio


The -s option with the keyword spool copies the package into
the /var/spool/pkg directory by default.

# ls /var/spool/pkg
SUNWaudio


Spooling Packages
You can specify a different directory location using the -s option.
# mkdir /export/pkgs
# pkgadd -d /cdrom/cdrom0/s0/Solaris_8/Product -s /opt/pkg SUNWaudio
# ls /opt/pkg
SUNWaudio
#

NOTE:- The pkgadd command, by default, looks in the
/var/spool/pkg directory for any packages specified on the
command line.

Removing Packages From the Spool Directory
You remove software packages from a spool directory using the
pkgrm command with the -s option.
# pkgrm -s spool SUNWaudio
# pkgrm -s /opt/pkg SUNWaudio

ADMIN TOOL

Adding and Removing Packages With admintool
The package administration capabilities provided by the package
commands pkginfo, pkgadd, and pkgrm are also available with
admintool.
To Display Software Package Information
1. As root , start admintool.
# admintool &
The Users window is displayed.

The Users window is displayed.
2. From the Browse menu, select Software. The Software
window is displayed.









Admintool: Software Window
The Software option displays all software packages installed
onthe local systems disk. You can view only the system
packages or the application packages.
3. Select the Audio 1.4. package.
The three lines relating to the Audio 1.4 software are
highlighted.
4. Click on Show Details. The Software Details window is
displayed.


Software Details Window
This window shows limited information about the
package, such as:
Software name
Abbreviated name
Vendor
Description
5. Click on Cancel. The Software window is displayed
again.
Figure Deleting Software.

6. From the Edit menu, select Delete. A confirmation
window is displayed.

Figure Delete Warning Window
7. Confirm this choice by clicking on Delete. The output
of scripts used to remove the software is displayed.
8. Respond with y or yes to all questions regarding the
removal of the package.
9. Press Return to continue.
The final message displayed in the window indicates that the
removal of the package was successful.

Note When a software package is removed by the pkgrm
command, its package name remains in the window. To update
the window, you must close and then reopen the window.

Você também pode gostar