Solaris培訓第四章:軟體包管理(轉)

amyz發表於2007-08-10
Solaris培訓第四章:軟體包管理(轉)[@more@]

  所有Solaris系統的軟體都以包的形式出現。

  軟體包包含:

  軟體包的描述檔案

  系統需求的描述檔案

  需要安裝的檔案

  安裝前以及安裝後需要執行的指令碼

  The pkgadd command

  用於安裝軟體包

  pkgadd [ -d ][device | pathname ]] pkg_name

  # pkgadd -d /cdrom/cdrom0/s0/Solaris_2.7/Product SUNWaudio

  Processing package instance from

  Audio applications

  (sparc) 3.6.4,REV=1.98.08.13

  Copyright 1998 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.

  ## Checking for setuid/setgid programs.

  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 [y,n,?] y

  Installing Audio applications as

  ## Installing part 1 of 1.

  Installation of was successful.

  The pkginfo command

  不加任何引數用於檢視系統已經安裝的軟體包

  # pkginfo | more

  application SUNWAxg Solaris XGL 3.3 AnswerBook

  application SUNWaadm Solaris 7 System Administrator Collection

  system SUNWab2m Solaris Documentation Server Lookup

  system SUNWab2r Solaris Documentation Server

  system SUNWab2s Solaris Documentation Server

  system SUNWab2u Solaris Documentation Server

  application SUNWabda Sun Ultra 5/10 Hardware AnswerBook

  application SUNWabe Solaris 7 User Collection

  application SUNWabsdk Solaris 7 Software Developer Collection

  The pkginfo Command

  後面可跟一些引數,顯示特定某個軟體包的資訊

  Command Format

  pkginfo [ -d ][ device | pathname ] ] [ -l ] pkg_name

  引數

  -d device 指定軟體所在的位置,可以是目錄、磁帶機、軟盤等等

  -l 顯示詳細資訊

  pkg_name 軟體包名

  輸出列

  CATEGORY 軟體包的型別,是應用軟體和是系統軟體

  PKGINST 軟體包名,如果是SUNW打頭,則是SUN的產品

  NAME 軟體的簡要描述

  # pkginfo -d /cdrom/cdrom0/s0/Solaris_2.7/Product -l SUNWaudio

  PKGINST: SUNWaudio

  NAME: Audio applications

  CATEGORY: system

  ARCH: sparc

  VERSION: 3.6.4,REV=1.98.08.13

  BASEDIR: /

  VENDOR: Sun Microsystems, Inc.

  DESC: Audio binaries

  PSTAMP: dtbuild37s19980813171753

  HOTLINE: Please contact your local service provider

  STATUS: spooled

  FILES: 9 spooled pathnames

  2 directories

  3 executables

  4 package information files

  700 blocks used (approx)

  The pkgrm Command

  Command Format

  pkgrm package_name

  用於刪除軟體包

  # pkgrm SUNWaudio

  The following package is currently installed:

  SUNWaudio Audio applications

  (sparc) 3.6.4,REV=1.98.08.13

  Do you want to remove this package? y

  ## Removing installed package instance

  ## Verifying package dependencies.

  WARNING:

  The package depends on the package

  currently being removed.

  WARNING:

  The package depends on the package

  currently being removed.

  WARNING:

  The package depends on the package

  currently being removed.

  WARNING:

  The package depends on the package

  currently being removed.

  Dependency checking failed.

  Do you want to continue with the removal of this package [y,n,?,q]

  如果某個檔案被多個包共享,則當最後一個包被刪除時才被刪除。

  The pkgchk Command

  用於檢查已安裝的軟體包

  Command Format

  pkgchk [ -p path1 ][ path2...] ]

  # pkgchk SUNWaudio

  #

  # pkgchk -p /etc/group

  ERROR: /etc/group

  file size <278> expected <282> actual

  file cksum <23586> expected <24038> actual

  pkgchk命令校驗包的屬性和內容是否與系統記錄的一致。

  這個命令能檢測整個包或是某個檔案。沒有輸出表示包已經安裝,但未發現不一致。

  admintool圖形管理工具

  admintool是solaris圖形管理工具,包括管理軟體包、主機名、主機地址、印表機、串列埠、使用者、使用者組等

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10752019/viewspace-941567/,如需轉載,請註明出處,否則將追究法律責任。

相關文章