LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Blogs > Kashif Aziz Awan
User Name
Password

Notices



Rate this Entry

Install & Update packages (Solaris-9) How to

Posted 04-28-2011 at 06:50 AM by kashifazizawan

OS: SunOS
Distribution: Solaris-9
System: X86
Date: January 23, 2011
Author: Kashif Aziz Awan
kashif_khb@yahoo.com
Version: 5.9 Generic


download package to
/var/spool/pkg
and run the commands

$cd /var/spool/pkg
$pkgadd package_name-pkg
Package will be installed.
Package installation through pkg-get:
The Solaris pkg-get utility simplifies retrieval and installation of Solaris packages from repositories such as Sunfreeware. The tool is similar to Debian's apt-get, although pkg-get repositories have to be configured to support dependencies. The Community Software Packages site at opencsw.org supports dependencies; Sunfreeware does not.
How pkg-get Works
Pkg-get connects to an online software repository,
such as sunfreeware.com or blastwave.org, and downloads a list of
all available software for the specific version of Solaris installed on your
server.
You specify which application you want to install and
pkg-get will download and install the correct version of this application,
along with any pre-requisites and other dependencies.
Anything pkg-get installs can be easily and safely
backed out using pkgrm.
Installing pkg-get
1.Check on your Solaris server if /opt/csw/bin/pkg-get
exists. If it does, then you already have pkg-get installed on your
machine.
2.Download the pkg-get package from http://www.blastwave.org/pkg_get.pkg
and put it in /tmp on your Solaris machine.
3.Type: pkgadd –d /tmp/pkg_get.pkg and answer “yes”
to all prompts.

Homepage:
http://www.bolthole.com/solaris/pkg-get.html

Download:
http://www.opencsw.org/pkg-get
pkg-get configuration
1.Edit the /opt/csw/etc/pkg-get.conf file and add the
following lines:
ftp_proxy=proxy.domainort
http_proxy=proxy.domainort
export http_proxy ftp_proxy
1.Run /opt/csw/bin/pkg-get –U to update the software
catalog.
copy pkg-get's configuration file from /opt/csw/etc.

# cp /opt/csw/etc/pkg-get.conf /etc

I prefer to use the Sunfreeware repository instead of the default CSW repository, so I make the following change in /etc/pkg-get.conf:

From:
# default site, in USA:
url=http://ibiblio.org/pub/packages/solaris/opencsw/current/

To:
# default site, in USA:
url=http://ftp.uni-erlangen.de/pub/mirrors/csw/stable/
or
url=ftp://mirrors.secsup.org/pub/solaris/freeware/

Or more mirrors
http://www.opencsw.org/get-it/mirrors/
http://www.sunfreeware.com/ftp.html

pkg-get commands
Update list of available packages (retrieve latest list):
pkg-get -U

List available packages (uses last downloaded copy):
pkg-get -a

Download (do not install) package:
pkg-get -d package

Download and install package:
pkg-get -i package

Download & Install all software available:
pkg-get install all

Upgrade package:
pkg-get -u package

Upgrade all installed packages:
pkg-get -u

Note: if multiple versions of a package are available, specify the version number with a hyphen.

Example:

$ pkg-get -a | grep lsof
lsof 4.33
lsof 4.68

# pkg-get install lsof-4.68

Uninstalling Software Installed by pkg-get
You can use pkgrm to uninstall any or all software
installed with pkg-get. Here’s an example of how to uninstall Ethereal:
1.All packages installed by pkg-get will begin with
the “CSW” string. You can list all packages installed by pkg-get
by running this command: pkginfo | grep CSW
2.In this example, Ethereal package is called CSWethereal.
So to remove it, simply do: pkgrm CSWethereal
3.This is a standard Solaris way of uninstalling software.
It does not involve running pkg-get.
Posted in Uncategorized
Views 1807 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 06:01 AM.

Main Menu
Advertisement

Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration