免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3110 | 回复: 0
打印 上一主题 下一主题

solaris SUN软件包安装(pkgadd) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-09-10 18:22 |只看该作者 |倒序浏览
用命令, pkgadd software_package_name
缺省情况下,从 /var/spool/tmp 下找安装包,也可用 选项 -d 指定位置,注意路径加文件,而不是用来指定目录的

可参考下文:

Previous
Table of Contents
Next


The pkgadd command, by default, looks for packages in the /var/spool/pkg directory. In this context, any packages that you have copied into that directory are "spooled" and waiting for installation. If there are no packages in the /var/spool/pkg directory, installation fails, as shown in the following example:
castle# pkgadd
pkgadd: ERROR: no packages were found in
castle#
To install packages directly from media, such as from a CD-ROM, you must use the -d option to specify a full (absolute) pathname to the directory on the device that contains the packages that you want to install.
If pkgadd encounters a problem, information about the problem appears along with the prompt Do you want to continue with this installation of the package?. Type yes, no, or quit and press Return.Typing yes continues with the installation. If you have specified more than one package, typing no stops the installation of the package that failed, but does not stop the installation of the other packages. Typing quit stops installation of all packages.
In the following example, although the command-line argument specifies a valid directory on the CD-ROM, that directory contains no packages and the pkgadd command returns an error message:
castle# pkgadd -d /cdrom/sol_2_6_sparc/s0/Solaris_2.6
pkgadd: ERROR: attempt to process datastream failed
  - open of  failed, errno=2
pkgadd: ERROR: could not process datastream from
castle#
In the following example, the command-line argument specifies a path to a valid directory on the CD-ROM that contains packages:
castle# pkgadd -d /cdrom/sol_2_6_sparc/s0/Solaris_2.6/Product
The following packages are available:
  1  AXILvplr.c      Axil platform links
                     (sparc.sun4c) 5.6,REV=96.01.21.22.49
  2  AXILvplr.m      Axil platform links
                     (sparc.sun4m) 5.6,REV=96.01.21.22.50
  3  AXILvplr.u      Axil platform links
                     (sparc.sun4u) 5.6,REV=96.01.21.22.49
  4  AXILvplu.c      Axil usr/platform links
                     (sparc.sun4c) 5.6,REV=96.01.21.22.51
  5  AXILvplu.m      Axil usr/platform links
                     (sparc.sun4m) 5.6,REV=96.01.21.22.51
  6  AXILvplu.u      Axil usr/platform links
                     (sparc.sun4u) 5.6,REV=96.01.21.22.51
  7  FJSVvplr.u      Fujitsu platform specific symlinks (Root)
                     (sparc.sun4u) 1.0,REV=97.05.26.01
  8  FJSVvplu.u      Fujitsu platform specific symlinks (user)
                     (sparc.sun4u) 1.0,REV=97.05.26.01
  9  PFUaga.m        AG-10 Device Driver
                     (sparc.sun4m) 1.4.0,REV=0.0.3
10  PFUaga.u        AG-10 Device Driver
                     (sparc.sun4u) 1.4.0,REV=0.0.3
... 298 more menu choices to follow;
for more choices,  to stop display:The following packages
are available:
Alternatively, you can use the cd command to change to the directory that contains the packages, and then type pkgadd -d . and press Return to proceed with installation, as shown in the following example:
castle# cd /cdrom/sol_2_6_sparc/s0/Solaris_2.6/Product
castle@ pkgadd -d .
The following packages are available:
  1  AXILvplr.c      Axil platform links
                     (sparc.sun4c) 5.6,REV=96.01.21.22.49
  2  AXILvplr.m      Axil platform links
                     (sparc.sun4m) 5.6,REV=96.01.21.22.50
  3  AXILvplr.u      Axil platform links
                     (sparc.sun4u) 5.6,REV=96.01.21.22.49
  4  AXILvplu.c      Axil usr/platform links
                     (sparc.sun4c) 5.6,REV=96.01.21.22.51
  5  AXILvplu.m      Axil usr/platform links
                     (sparc.sun4m) 5.6,REV=96.01.21.22.51
  6  AXILvplu.u      Axil usr/platform links
                     (sparc.sun4u) 5.6,REV=96.01.21.22.51
  7  FJSVvplr.u      Fujitsu platform specific symlinks (Root)
                     (sparc.sun4u) 1.0,REV=97.05.26.01
  8  FJSVvplu.u      Fujitsu platform specific symlinks (user)
                     (sparc.sun4u) 1.0,REV=97.05.26.01
  9  PFUaga.m        AG-10 Device Driver
                     (sparc.sun4m) 1.4.0,REV=0.0.3
10  PFUaga.u        AG-10 Device Driver
                     (sparc.sun4u) 1.4.0,REV=0.0.3
... 298 more menu choices to follow;
for more choices,  to stop display:The following packages
are available:
Checking the Installation of a Package
You can use the pkgchk command to check the completeness, specific pathname, file contents, and file attributes of an installed package.
The syntax of the pkgcheck command follows:
pkgchk pkgid
For example, to check the package SUNWman, the online manual pages, type pkgchk SUNWman and press Return. If the prompt comes up without any messages, the package has installed properly.
oak% pkgchk SUNWman
oak%
If you do get messages, however, the package has not installed properly, as shown in the following example:
oak% pkgchk SUNWssoft
WARNING: no pathnames were associated with
oak%
You can specify more than one package identifier by typing a list separated by spaces. If you do not specify a pkgid, the complete list of packages on a system is checked.
You can check the installation completeness of a specific pathname by using the -p option with pkgchk, using the following syntax:
pkgchk -p pathname
If you want to check more than one path, provide the paths as a comma-separated list.
You can check the installation completeness of just the file attributes by using the -a option with the pkgchk command. You can check the installation completeness of just the file contents by using the -c option with the pkgchk command. Here is the appropriate syntax:
# /usr/sbin/pkgchk [ -a | -c ] pkgid
To check the completeness of a spooled package, use the -d option with the pkgchk command. This option looks in the specified directory or on the specified device and performs a check of the package; for example:
# /usr/sbin/pkgchk -d spool-dir pkgA
In this example, the pkgchk command looks in the spool directory spool-dir and checks the completeness of the package named pkgA.
NOTE:  Spooled package checks are limited because not all information can be audited until a package is installed.
Previous
Table of Contents
Next

from:
http://snap.nlc.dcccd.edu/reference/sysadmin/julian/ch13/290-293.html


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/68079/showart_1183338.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP