SunOS6_10安装第三方软件参考

准备工作

检查操作系统环境

1
2
3
4
5
6
7
8
9
# showrev
Hostname: xmds13
Hostid: 860faf96
Release: 5.10
Kernel architecture: sun4v
Application architecture: sparc
Hardware provider: Oracle Corporation
Domain:
Kernel version: SunOS 5.10 Generic_148888-01

准备第三方软件安装包

Solaris操作系统也可以安装多种开源软件,比较为人熟知的第三方软件源是www.sunfreeware.com。

文件名:
top-3.6.1-sol10-sparc-local.gz

MD5校验码:
1F1425479B2A1CAAA69C6E92B7C95CA0

将安装包上传到/tmp/top目录下。

安装top-3.6.1

  1. 解压安装包
1
2
3
4
# gunzip top-3.6.1-sol10-sparc-local.gz
#
# ls
top-3.6.1-sol10-sparc-local
  1. 转换软件包格式
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# pkgtrans top-3.6.1-sol10-sparc-local .

The following packages are available:
1 SMCtop top
(sparc) 3.6.1

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:
Transferring <SMCtop> package instance
#
# ls -l
total 496
drwxr-xr-x 3 root root 306 Feb 16 10:44 SMCtop
-rw-r----- 1 root root 242688 May 28 2007 top-3.6.1-sol10-sparc-local
  1. 安装软件包
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# pkgadd -d ./

The following packages are available:
1 SMCtop top
(sparc) 3.6.1

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:
## Verifying package <SMCtop> dependencies in zone <xmds13-1>
## Verifying package <SMCtop> dependencies in zone <xmds13-2>
## Verifying package <SMCtop> dependencies in zone <xmds13-3>

Processing package instance <SMCtop> from </tmp/top>
## Installing package <SMCtop> in global zone

top(sparc) 3.6.1
LeFebvre et al
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

Installing top as <SMCtop>

## Installing part 1 of 1.
/usr/local/bin/sparcv7/top
/usr/local/bin/sparcv9/top
/usr/local/bin/top
/usr/local/doc/top/Changes
/usr/local/doc/top/FAQ
/usr/local/doc/top/INSTALL
/usr/local/doc/top/LICENSE
/usr/local/doc/top/README
/usr/local/doc/top/Y2K
/usr/local/man/man1/top.1
[ verifying class <none> ]

Installation of <SMCtop> was successful.
## Installing package <SMCtop> in zone <xmds13-1>

top(sparc) 3.6.1
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
17 package pathnames are already properly installed.

Installing top as <SMCtop>

## Installing part 1 of 1.
[ verifying class <none> ]

Installation of <SMCtop> on zone <xmds13-1> was successful.
## Installing package <SMCtop> in zone <xmds13-2>

top(sparc) 3.6.1
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
17 package pathnames are already properly installed.

Installing top as <SMCtop>

## Installing part 1 of 1.
[ verifying class <none> ]

Installation of <SMCtop> on zone <xmds13-2> was successful.
## Installing package <SMCtop> in zone <xmds13-3>

top(sparc) 3.6.1
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
17 package pathnames are already properly installed.

Installing top as <SMCtop>

## Installing part 1 of 1.
[ verifying class <none> ]

Installation of <SMCtop> on zone <xmds13-3> was successful.
  1. 安装已经完成,测试
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# ./top
last pid: 6063; load avg: 0.09, 0.05, 0.04; up 1+16:11:49 10:46:06
208 processes: 207 sleeping, 1 on cpu
CPU states: 99.9% idle, 0.0% user, 0.1% kernel, 0.0% iowait, 0.0% swap
Memory: 128G phys mem, 117G free mem, 98G total swap, 98G free swap

PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND
739 root 32 59 0 110M 91M sleep 19:12 0.02% fmd
4680 root 69 59 0 1305M 668M sleep 8:44 0.01% java
4732 root 44 1 0 2540M 826M sleep 8:27 0.00% java
4140 root 40 1 0 196M 173M sleep 6:17 0.00% fglam
6062 root 1 59 0 4288K 3304K cpu/113 0:00 0.00% top
991 noaccess 18 59 0 200M 165M sleep 1:34 0.00% java
3992 noaccess 18 59 0 164M 125M sleep 1:10 0.00% java
4404 root 30 1 0 195M 173M sleep 3:38 0.00% fglam
2069 root 71 59 0 136M 93M sleep 1:09 0.00% java
299 root 1 59 0 2832K 1952K sleep 0:42 0.00% in.mpathd
3605 noaccess 18 59 0 160M 121M sleep 1:05 0.00% java
4094 noaccess 18 58 0 160M 121M sleep 1:06 0.00% java
313 daemon 1 59 0 10M 6272K sleep 7:40 0.00% rcapd
3129 root 29 59 0 6800K 4448K sleep 0:03 0.00% nscd
1152 root 1 59 0 13M 8832K sleep 0:00 0.00% cl_pnmd

增补资料

pkgtrans

pkgtrans [-inosg] [-k keystore] [-a alias] [-P passwd] device1 device2
[pkginst]…

–a alias
使用与友好名称别名相关联的公钥证书以及对应的私钥。有关更多信息,请参见 pkgadd(1M) 中的证书位置与密钥库和证书格式。

–g
对结果数据流进行签名。

–i
仅复制 pkginfo(4) 和 pkgmap(4) 文件。

–k keystore
使用密钥库检索用于生成签名的私钥。如果未指定此选项,将搜索缺省位置来查找由 –a 指定的指定私钥。如果没有给定别名且密钥库中存在多个密钥,则 pkgtrans 将中止。有关搜索位置和格式的更多信息,请参见 pkgadd(1M) 中的密钥库位置与密钥库和证书格式。

当以非 root 用户运行时,用于证书搜索的缺省基目录是 ~/.pkg/security,其中 ~ 是调用 pkgtrans 的用户的起始目录。

–n
如果目标设备上已存在该软件包的任何实例,则会创建软件包的新实例,最大实例数由 pkginfo(4) 文件中的 MAXINST 变量指定。

–o
覆盖目标设备上的相同实例。如果软件包实例已经存在,将覆盖现有实例。

–P passwd
提供用来解密密钥库的口令。有关此选项参数的语法的详细信息,请参见 pkgadd(1M) 中的口令短语参数。

–s
指示软件包应该作为数据流(而不是作为文件系统)写入到 device2。缺省行为是以文件系统格式写入到支持这两种格式的设备中。

pkgadd

pkgadd [ -d Device] [ -r Response] [ -n ] [ -a Admin] [ Pkginst1 [ Pkginst2 [. . .]]]

-d Device 从 Device 安装或复制软件包或集合。Device 可以是到目录、文件或指定的管道的全路径名,或者是“-”,它指定为从标准输入中读取的数据流格式的软件包。缺省的设备是安装假脱机目录( /var/spool/pkg )。
-r Response Response,标识文件或目录,它包含在先前的 pkgask 会话中被“request script”提出的问题的答案,这个会话在交互式模式中管理〔 参见 pkgask 命令〕。 当 Pkginst 是软件包时, Response 可以是全路径名或目录;当 Pkginst 是 SIP 时, Response 必须是目录。
-n 指定安装在非交互式模式下运行。缺省模式是交互式的。
-a Admin 定义安装管理文件, Admin,这些文件被用来替换指定执行安装检查(如对空间数量、系统状态等的检查)的缺省管理文件。标记“none”覆盖对任何 admin 文件的使用,从而强制与用户的交互。除非给定全路径名,否则 pkgadd 在 /var/sadm/install/admin 目录中寻找文件。缺省情况下,在那个目录中的 default 文件被使用。default 指定不做检查,除了要检查是否有足够的空间来安装软件包,以及是否与其它的软件包有依赖关系。 -a 标志不能使用,如果 Pkginst 是 SIP 的话。