a)首先在windows下下載下傳top,下載下傳位址: ftp://ftp.sunfreeware.com/pub/freeware/sparc/10/top-3.6.1-sol10-sparc-local.gz
b) 用cuteftp上傳到我的伺服器上,注意如果上傳不成功,并提示目錄不可寫,這通常是因為目前目錄權限設定的原因,而不是因為FTP權限設定原因。
#mkdir /opt/tmp
上傳後,就可以在上述目錄中看到檔案top-3.6.1-sol10-sparc-local.gz
c) 解壓縮
root@ # cd tmp/
root@ # ls
top-3.6.1-sol10-sparc-local
root@ # ls -alrt
total 502
-rw-r--r-- 1 root root 242688 Mar 2 16:29 top-3.6.1-sol10-sparc-local
drwxr-xr-x 73 root sys 1536 Mar 2 16:30 ..
drwxr-xr-x 2 root root 512 Mar 2 16:31 .
root@ # chmod 755 top-3.6.1-sol10-sparc-local
root@ # ls -alrt
total 502
-rwxr-xr-x 1 root root 242688 Mar 2 16:29 top-3.6.1-sol10-sparc-local
drwxr-xr-x 73 root sys 1536 Mar 2 16:30 ..
drwxr-xr-x 2 root root 512 Mar 2 16:31 .
root@ # pkgtrans top-3.6.1-sol10-sparc-local
usage: pkgtrans [-ionsg] [-k keystore] [-a alias] [-P password] srcdev dstdev [pkg [pkg...]]
root@ # 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
root@ # ls -alrt
total 504
-rwxr-xr-x 1 root root 242688 Mar 2 16:29 top-3.6.1-sol10-sparc-local
drwxr-xr-x 73 root sys 1536 Mar 2 16:30 ..
drwxr-xr-x 3 root root 512 Mar 2 16:35 .
drwxr-xr-x 3 root root 512 Mar 2 16:35 SMCtop
root@ # 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]:
Processing package instance <SMCtop> from </opt/tmp>
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.
The following files are already installed on the system and are being
used by another package:
* /usr/local/bin <attribute change only>
* - conflict with a file which does not belong to any package.
Do you want to install these conflicting files [y,n,?,q] y
## 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.
root@ #
root@ #
root@ # su - testUser
Oracle Corporation SunOS 5.10 Generic Patch January 2005
$ bash
bash-3.00$ vi .profile
".profile" 7 lines, 212 characters
# This is the default standard profile provided to a user.
# They are expected to edit it to meet their own needs.
PATH=$PATH:/usr/local/bin/
export
~
~
~
".profile" 10 lines, 246 characters
bash-3.00$
bash-3.00$
bash-3.00$ exit
exit
$ exit
root@ # su - testUser
Oracle Corporation SunOS 5.10 Generic Patch January 2005
export PATH
$ top
load averages: 16.2, 15.8, 19.3; up 105+22:19:50 16:38:20