System Administration Guide, Volume I

How to Add Packages to a Server

  1. Log in to the server as superuser.

  2. Make sure the server has the OS services necessary for its diskless and AutoClient systems.

    Use Host Manager to verify the OS services available on the server. If you need to add OS services, you can do that using the "Add Services" capability of Host Manager. For detailed information, see Chapter 4, Managing Server and Client Support (Tasks).

  3. Determine your next step based on whether the server and the diskless or AutoClient systems are the same Solaris release and the same hardware platform.

    If the Diskless or AutoClient Systems and Server Are ... 

    Then ... 

    The same Solaris release and the same hardware architecture 

    Do not use this procedure. Instead, use the procedure "How to Add Packages to a Standalone System".

     

    Either different Solaris releases or different hardware platforms (for example, a Solaris 2.5 server of Solaris 7 diskless clients, or an x86 server of SPARC diskless clients) 

    Go to Step 4.

  4. Make a copy of the default administration file.


    # cp /var/sadm/install/admin/default
    /var/sadm/install/admin/admin-file
    
  5. Edit the new administration file and set the basedir keyword.

    Use a text editor to edit the new administration file and set the basedir keyword to the correct path for the OS services supporting the client.


    basedir=/export/exec/Solaris_2.7_platform.all/usr

    Solaris_2.7

    Is the Solaris version number: for example, Solaris_2.7

    platform

    Is the hardware architecture of the client: for example, i386or sparc, as in Solaris_2.7_i386.all or Solaris_2.7_sparc.all.

  6. Add a software package to the server.

    The administration file will specify to install the package into the /usr file system appropriate for the client.


    # pkgadd -a admin-file -d device-name pkgid ... 

    -a admin-file

    (Optional) Specifies an administration file pkgadd should consult during the installation. By default, pkgadd looks in the /var/sadm/install/admin directory for the specified administration file. You can also specify an absolute path to an administration file.

    -d device-name

    Specifies the absolute path to the software packages. device-name can be the path to a device, a directory, or a spool directory. If you do not specify the path where the package resides, pkgadd checks the default spool directory (/var/spool/pkg). If the package is not there, the package installation fails.

    pkgid

    (Optional) Is the name of one or more packages (separated by spaces) to be installed. If omitted, pkgadd installs all available packages.

    If the pkgadd command encounters a problem during installation of the package, it displays a message related to the problem, followed by this prompt:


    Do you want to continue with this installation?

    Respond with yes, no, or quit. If more than one package has been specified, type no to stop the installation of the package being installed. pkgadd continues to install the other packages. Type quit to stop the installation.

  7. Verify that the package has been installed, using the pkginfo command.


    # pkginfo pkgid*
    

    The pkginfo command will return all instances of the installed package. Typically, pkgadd installs duplicate versions of an already installed package as pkgid.1, pkgid.2, and so on.

  8. Verify that the package has been installed successfully, using the pkgchk command.


    # pkgchk -v pkgid
    

    If the pkgchk command determines there are no errors for the specified package instance, it returns a list of installed files. Otherwise, it reports the error.

Example--Installing Software From a Mounted CD

The following example shows a command to install a fictitious package SUNWtoolu, which will install files into a /usr file system. Assume that the package resides on a mounted product CD, which is mounted on /cdrom/cdrom0 by default. The pkgadd command uses an administration file named new-basedir, which specifies a new installation directory for the package. The example also shows use of pkgchk to verify that the package's files were installed properly.


# pkgadd -a new-basedir /cdrom/cdrom0 SUNWtoolu
	.
	.
	.
Installation of <SUNWtoolu> complete.
# pkgchk -v SUNWtoolu
/usr
/usr/bin
/usr/bin/toolconvert
/usr/bin/toolplay
/usr/bin/toolrecord