Package administration in solaris 10
Administering Packages
pkgadd Installs software packages to the system
pkgrm Removes a package from the system
pkginfo Displays software package information
pkgchk Checks package installation state
pkgtrans Translates packages from one format to another
# more /var/sadm/install/contents ==> to list all installed software packages
# pkginfo | more ==> to display information about installed software packages
# pkginfo -l | more ==> to view additional information
# pkginfo -l SUNWman ==> to view information of a specific package
# pkginfo | wc -l ==> to find how many packages are currently installed
To view information about packages that are located on the DVD
# pkginfo -d /cdrom/cdrom0/s0/Solaris_10/Product | more
# pkginfo -d /cdrom/cdrom0/Solaris_10/Product | more
Checking a Package Installation
pkgadd Installs software packages to the system
pkgrm Removes a package from the system
pkginfo Displays software package information
pkgchk Checks package installation state
pkgtrans Translates packages from one format to another
# more /var/sadm/install/contents ==> to list all installed software packages
# pkginfo | more ==> to display information about installed software packages
# pkginfo -l | more ==> to view additional information
# pkginfo -l SUNWman ==> to view information of a specific package
# pkginfo | wc -l ==> to find how many packages are currently installed
To view information about packages that are located on the DVD
# pkginfo -d /cdrom/cdrom0/s0/Solaris_10/Product | more
# pkginfo -d /cdrom/cdrom0/Solaris_10/Product | more
Checking a Package Installation
The pkgchk command checks to determine if a package has been installed on the system. If the pkgchk command does not display a message, it indicates the package was installed successfully and that no changes have been made
to any files or directories in the package.
# pkgchk SUNWladm ==> to check the contents & attributes of a currently installed package
# pkgchk -v SUNWladm ==> to list the files contained in a software package
# pkgchk -p /etc/shadow ==> to find if the contents & attributes of a file have changed since it was installed with its software package
# pkgchk -l -p /usr/bin/showrev ==> to list information about selected files that make up a package
# pkgchk -l -P showrev ==> to find if a particular file is installed & to find the directory in which it is located
If -p option is used, the full path must be typed to get information about the file. If -P option is used, a partial path name can be used.
Adding a Software Package from DVD
Example: To transfer the SUNWvts software package from CD-ROM & install it
# cd /cdrom/cdrom0/Solaris_10/ExtraValue/CoBundled/SunVTS_6.0/Packages
# pkgadd -d . SUNWvts
Adding Packages by Using a Spool Directory
The pkgadd command, by default, looks in the /var/spool/pkg directory for any packages specified on the command line.
The default directory for packages that have been spooled, but not installed is /var/spool/pkg.
To copy a package from the Solaris DVD into the /var/spool/pkg directory
# pkgadd -d /cdrom/cdrom0/s0/Solaris_10/Product -s spool SUNWauda
The -s option with the keyword spool copies the package into the /var/spool/pkg directory by default.
# ls -al /var/spool/pkg ==> to verify if the package exists in the spool directory
# pkgadd SUNWauda ==> to add the package from the spool area
# pkgrm -s spool SUNWauda ==> to remove a package from the spool area
To use an alternative spooling directory
# pkgadd -d /cdrom/cdrom0/s0/Solaris_10/Product -s /export/pkg SUNWauda
# pkgrm -s /export/pkg SUNWauda ==> to remove a package from the
spool directory
Removing a Software Package
Caution – Be cautious of the dependency warnings you receive when removing a package. The system allows you to remove these packages even though they may be required by a different package.
# pkgrm SUNWauda
PACKAGE FORMATS
File system (or Directory) format: Multiple files and directories.
A package (SUNWrsc) in file system format:
# ls -ld SUNWrsc
# cd SUNWrsc
# ls -l
Data stream format: Single file.
A package in data stream format:
# ls -l SUNWrsc.pkg
# file SUNWrsc.pkg
# head SUNWrsc.pkg
Translating Package Formats
To translate a package from file system format in /var/tmp to data stream format
# pkgtrans /var/tmp /tmp/SUNWrsc.pkg SUNWrsc
First argument is the directory where file system format package is stored. Second argument is the package data stream file.
Third argument is the package to translate.
If no package name is given a list of all packages in the directory is displayed
# pkgadd -d /tmp/SUNWrsc.pkg all ==> to install packages in a data
stream format
Example:
To create a data streamed package
# cd /cdrom/cdrom0/s0/Solaris*
# pkgtrans -s Product /var/tmp/stream.pkg SUNWzlib SUNWftpr SUNWftpu
# file /var/tmp/stream.pkg
# head -5 /var/tmp/stream.pkg
# pkgadd -d /var/tmp/stream.pkg
1 comment:
Best 8 Casino (New Mexico) Apps & Rates | Mapyro
Looking 남원 출장마사지 for 수원 출장샵 the best 8 casino 광주 출장마사지 apps 대구광역 출장마사지 in New Mexico? Check out 인천광역 출장샵 our reviews, find promo codes & get the best rate.
Post a Comment