Specifications

Red Hat Enterprise Linux to Oracle Solaris Porting Guide
95
TABLE 10-2. SYSTEM ADMINISTRATION
RHEL ORACLE SOLARIS 11
To install or upgrade a package, use the -U command-line
option:
#rpm -U filename.rpm
The --test option tells the rpm command to test the
installation or upgrade process but not to install the file:
#rpm -U --test filename.rpm
For installing package, use the following:
#pkg install
To preview an installation without actually doing it, use the
following:
# pkg install -nv package_name
To update and automatically accept license agreements, if
there are any, use the following:
#pkg update --accept
To remove a package (erase in RPM terminology), use the –e
command-line option:
#rpm e package_name
To remove a package, use the following:
#sudo pkg uninstall package_name
To list every RPM package installed on your system, use a
command like the following.
#rpm qa
To list packages, use the following:
#pkg list
Use the rpm q command to quickly verify a package has
been installed:
#rpm q package_name
To verify whether a package is installed, use the following:
#pkg verify -v package_name
The –i option with an rpm query command tells the rpm
command to output descriptive information about the package.
#rpm -qi package_name
To get information about a package, use the following:
#pkg info package_name
The –l (ell) option queries all the files in a package:
#rpm ql package_name
To list files in a package, use the following:
#pkg contents package_name
Building a Package in Oracle Solaris
To understand the implementation-level differences between the two operating systems, let’s look at
the sequence of steps you need to follow while creating and publishing a new package. Table 10-3
shows the steps required for creating a package and Table 10-4 shows the steps for publishing a
package.