Help & Support
Installing an operating system package
Installing an operating system package
Introduction
After installing the operating system, you may want to add or remove packages from the system set. This page provides an annotated example of the installation and removal of a package.
The example packages we will be using here are the Java packages:
| SUNWdthj | HotJava Browser for Solaris |
| SUNWjvdem | JavaVM demo programs |
| SUNWjvdev | JavaVM developer's package |
| SUNWjvjit | Java JIT compiler |
| SUNWjvman | JavaVM man pages |
| SUNWjvrt | JavaVM run time environment |
Installing Solaris packages
Suppose we want to install the Java manual pages and the HotJava program on a Solaris system that lacks them. First of all we will need access to the Sun CD that has them all. Then we will need to install them from that CD.
Access to the Sun CD
If your Sun is on the Unix Support access list for the Sun CDs, then you can access it over NFS. See Restricted Access Software for details of the access list. Change directory to /net/nfs-uxsup.csx.cam.ac.uk/sun for all the Sun CDs.
# cd /net/nfs-uxsup.csx.cam.ac.uk/sun # ls README sol_7_doc ddk_2_5_1 sol_7_sparc_sun_srvr devpro_v5n1_sol1 solaris7_599_suppcd devpro_v5n1_sparc solaris7_899_suppcd devpro_v6n1_sparc solaris7_suppcd flash_answerbook solaris_2_5_1_desktop_1_1 jdc1_1_5 solaris_2_5_1_server_1_1 jws2_js1_tnb solaris_2_5_1_sparc misc solaris_2_5_desktop_1_0 netscape solaris_2_5_server_1_0 netscape_4_5 solaris_2_5_sparc netscape_4_51 solaris_2_6_documentation patchdiag.xref solaris_easy_access_srvr_2_0 patches_4_0_7_d1 solaris_easy_access_srvr_2_0_doc patches_4_0_7_d2 solaris_easy_access_srvr_3_0 patches_4_0_7_d3 solaris_easy_access_srvr_3_0_doc sdk_2_5 solaris_srvr_intranet_ext_1_0 sol_2_6_hw2_sparc_smcc_dt sun_sevm_2_5_sparc sol_2_6_sparc_smcc_svr sunpro.lic,sp sol_7_599_doc sunpro.lic,sp-old sol_7_599_sparc_sun_srvr sunsolve_4_0_7 sol_7_899_doc supp_sol_2_6_smcc sol_7_899_sparc_sun_srvr symon_2_0_1
You need to know which CD is which. For operating system packages the following are what you need:
| Solaris | CD name | Path to the packages |
|---|---|---|
| 2.6 | sol_2_6_sparc_smcc_svr |
|
| 7 | sol_7_899_sparc_sun_srvr |
In this example, we will be using Solaris 7, but the changes for Solaris 2.6 are pretty obvious.
First we change directory to the directory containing all the packages.
# cd sol_7_899_sparc_sun_srvr/s0/Solaris_2.7/Product/ # ls FJSVhea SUNWdtdte SUNWgsdhx SUNWluxlx SUNWsvdst FJSVvplr.u SUNWdtezt SUNWgss SUNWluxop SUNWsvdte FJSVvplr.us SUNWdthe SUNWgssdh SUNWm64.u SUNWsvhe ... many, many packages ... SUNWdtdem SUNWfxplt SUNWluxdx.u SUNWstltk TWSvplu.u SUNWdtdmn SUNWglmr.u SUNWluxdx.us SUNWsutl locale SUNWdtdst SUNWglmx.u SUNWluxl SUNWsvbas
Finally we add the packages we want.
# pkgadd -d . SUNWdthj SUNWjvman
For each of the two packages being added the system announces thae package being added and warns that it is going to use its superuser privilege to add the files. This is nothing to worry about. It then prompts for confirmation.
Processing package instance <SUNWdthj> from </net/nfs-uxsup.csx.cam.ac.uk/sun/sol_7_899_sparc_sun_srvr/s0/Solaris_2.7/Product> HotJava Browser for Solaris (sparc) 1.0.1,REV=1998.02.13 Copyright 1998 Sun Microsystems, Inc. All rights reserved. Using </usr> as the package base directory. ## Processing package information. ## Processing system information. 10 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 <SUNWdthj> [y,n,?] y
After getting the confirmation to continue, the system then proceeds with the installation, listing every file being added.
Installing HotJava Browser for Solaris as <SUNWdthj> ## Installing part 1 of 1. 21 blocks /usr/dt/appconfig/hotjava/bin/hotjava /usr/dt/appconfig/hotjava/bin/select_runtime ... /usr/dt/appconfig/hotjava/runtime/lib/sparc/green_threads/libsysresource.so /usr/dt/appconfig/hotjava/runtime/lib/sparc/green_threads/libzip.so [ verifying class <runtime> ] Installation of <SUNWdthj> was successful.
The system then repeats that process with the second package.
Processing package instance <SUNWjvman> from </net/nfs-uxsup.csx.cam.ac.uk/sun/sol_7_899_sparc_sun_srvr/s0/Solaris_2.7/Product> JavaVM man pages (sparc) 1.1.7,REV=1999.04.08.14.17 Copyright 1999 Sun Microsystems, Inc. All rights reserved. Copyright 1999 Sun Microsystems, Inc. Tous droits réservés. Using </> as the package base directory. ## Processing package information. ## Processing system information. 4 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 <SUNWjvman> [y,n,?]
Removing Solaris packages
To remove a package, the current working directory is irrelevant. So, we can be anywhere except within the Java file tree for the following stages. We shouldn't be within the Java file tree itself because we are going to be deleting that and deleting the directory we are within can be a problem (for us, not the deletion).
The command to remove a package is called pkgrm and takes the list of packages to be removed as its arguments.
First we tell it what packages to remove.
# pkgrm SUNWdthj SUNWjvrt SUNWjvdem SUNWjvjit SUNWjvman
Package by package, the program identifies the package to be removed and asks for confirmation.
The following package is currently installed:
SUNWdthj HotJava Browser for Solaris
(sparc) 1.0.1,REV=1998.02.13
Do you want to remove this package? y
The program then checks to see if there are any packages that depend on the one being deleted. There aren't in this case.
## Removing installed package instance <SUNWdthj> ## Verifying package dependencies. ## Processing package information. ## Removing pathnames in class <runtime>
The program then lists all the files it is deleting (or might want to but isn't because another package is using them.
/usr/dt/appconfig/hotjava/runtime/lib/sparc/green_threads/libzip.so /usr/dt/appconfig/hotjava/runtime/lib/sparc/green_threads/libsysresource.so ... /usr/dt/appconfig/hotjava /usr/dt/appconfig <shared pathname not removed> /usr/dt <shared pathname not removed>
And finally confirms that it has complte the task and moves on to the next package in the list.
## Updating system information.
Removal of <SUNWdthj> was successful.
The following package is currently installed:
SUNWjvrt JavaVM run time environment
(sparc) 1.1.6,REV=1998.11.04.00.00
Do you want to remove this package? y
## Removing installed package instance <SUNWjvrt>
## Verifying package dependencies.
WARNING:
The <SUNWebnfs> package depends on the package
currently being removed.
WARNING:
The <SUNWjvdev> package depends on the package
currently being removed.
WARNING:
The <SUNWjvjit> package depends on the package
currently being removed.
Dependency checking failed.
This time the package dependency cchecks fail. Note that two of the packages that depend on SUNWjvrt are ones we are deleting later in the list. The other, SUNWebnfs, is something we need to think about. In this instance we will decide that we need to keep it and therefore keep the SUNWjvrt package. We will, therefore, answer NO to the confirmation question below.
Do you want to continue with the removal of this package [y,n,?,q] n Removal of <SUNWjvrt> was terminated due to user request. No changes were made to the system. There are 3 more packages to be removed.
We do, however, want to continue with the removal of the other packages.
Do you want to continue with package removal [y,n,?,q] y
The following package is currently installed:
SUNWjvdem JavaVM demo programs
(sparc) 1.1.6,REV=1998.11.04.00.00
Do you want to remove this package? y
...
This procedure continues for the remainder of the packages in the list. There are no more dependency clashes.
