Solaris > Add / Install new software packages

by nixcraft on February 1, 2005 · 9 comments

Package can be install from CDROM, Network i.e. NFS or downloading from Internet and then add it to system, or from existing location such as /var/spool/pkg directory if frequently required packages are copied to this location.

Solaris: Adding package from CDROM
1) Mount cdrom

2) To add or install GNU tar package from Solaris CD use command
# pkgadd -d /cdrom/cdrom0/Solaris_9/Product SUNWgtar

Where,
-d /cdrom/cdrom0/Solaris_9/Product: Specify package directory
SUNWgtar: Package name

Solaris: Adding packages to spool directory and then install them
1) Copy package to /var/spool/pkg directory first:
# pkgadd -d /cdrom/cdrom0/Solaris_9/Product -s /var/spool/pkg SUNWgtar
Transferring package instance

Where,
-d /cdrom/cdrom0/Solaris_9/Product: Specify package directory
-s /var/spool/pkg : Directory in which package will get stored
SUNWgtar: Package name

2) Install the packages copied to spool directory
# pkgadd SUNWgtar

Solaris: Install downloaded package
1) If your package is in .bz2 format then first uncompress it using bunzip2 command:
# bunzip2 Packagname.bz2

2) Install package:
# pkgadd –d Packagname

Note .bz2 extension will automatically removed by first command.

For example if your package name is SFWqt.bz2
# buzip2 SFWqt.bz2
# pkgadd –d SFWqt

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

We're here to help you make the most of sysadmin work. So, subscribe!

{ 9 comments… read them below or add one }

1 Srki March 3, 2005

Hi.

# pkgadd –d SFWqt

When is allowed not to use
directory name with -d option?

– package located in a current directory or
there is some other exception ?

How generally pkgadd interprets -d option with or without directory name -
when only package name is listed?

Thanks

Reply

2 nixcraft March 13, 2005

pkgadd –d SFWqt

It means package is in current directory which was downloaded from ftp/http sites

Reply

3 yatender February 25, 2011

by this we get an error. if we want to use d option then we use . option it show that we are use the current location directory

Reply

4 naresh April 26, 2009

if you want to use the current directory use ( . ) dot after -d option. then it recognizes to look in current directory

Reply

5 naresh April 26, 2009

pkgadd –d . SFWqt

It means package is in current directory

Reply

6 ankit November 29, 2009

can you tell me how to install drives in opensolaris

Reply

7 saurabh ahuja July 4, 2011

well that is good for zipped files what about .pkg downloaded from internet? How can i install it?

Reply

8 saurabh ahuja July 4, 2011

well .pkg directly worked fine with “pkgadd -d .pkg . Thanks

Reply

9 joshy December 7, 2011

if i want to add additional software….same method is enough or any difference….how i execute that softwares

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 3 + 14 ?
Please leave these two fields as-is:
Are you a human being? Solve the simple math so we know that you are a human and not a bot.



Previous post:

Next post: