pkg-get tool will automatically download the appropriate version for your architecture and OS revision and install the package in Solaris OS just like apt-get and yum in Debian and Red hat systems respectively.
Download
http://sunfreeware.com/pkg-get.html
# pkg-get
pkg-get SCCS rev @(#) pkg-get 1.56.1.2@(#)
from http://www.bolthole.com/solaris/pkg-get is used to install free software packages
pkg-get
Need one of ‘install’, ‘upgrade’, ‘available’,'compare’
‘-i|install’ installs a package
‘-u|upgrade’ upgrades already installed packages if possible
‘-a|available’ lists the known available packages
‘-c|compare’ shows installed package versions vs available
‘-d|download’ just download the package, not install
‘-D|describe’ describe available packages
‘-f’ dont ask any questions: force default behaviour
Normally used with an override admin file
See /var/pkg-get/admin-fullauto‘-s ftp://site/dir’ temporarily override site to get from
(change /etc/pkg-get.conf for perm)
‘-U|updatecatalog’ updates download site inventory
Example:
Install apache in Solaris 10 with apt-get tool
bash-3.00# cat /etc/release
Solaris 10 6/06 s10s_u2wos_09a SPARC
Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 09 June 2006
bash-3.00# uanme -a
bash: uanme: command not found
bash-3.00# uname -a
SunOS newsystem 5.10 Generic_118833-17 sun4u sparc SUNW,Sun-Blade-100
bash-3.00# pkg-get install apache2
ERROR: apache2 unrecognized
Perhaps you need to run pkg-get -U
bash-3.00# pkg-get install apache
Sorry, there are multiple versions possible
Please specify one, in the following syntax
pkg-get install apache-1.3.34
pkg-get install apache-2.0.52
pkg-get install apache-2.0.53
pkg-get install apache-2.0.54
pkg-get install apache-2.0.55
pkg-get install apache-2.0.59
pkg-get install apache-2.2.0
pkg-get install apache-2.2.4
pkg-get install apache-2.2.6
pkg-get install apache-2.2.8
(pkg-get will list all the available versions to be installed in the system)
#pkg-get install apache-2.2.8 <- to install apache-2.2.8
To remove package using pkg-get
bash-3.00# pkginfo | grep apache
application SMCap228 apache
bash-3.00# pkg-get remove apache
WARNING: the remove option is not very intelligent.
If there are multiple versions of a package with the same
PKG style name, it will remove the first one it can
(will continue in 5 seconds)
Starting remove operations now…
ERROR: information for “SMCapache” was not found
ERROR: information for “SMCapach2″ was not found
ERROR: information for “SMChttpd” was not found
ERROR: information for “SMCapache” was not found
ERROR: information for “SMCaph2″ was not found
ERROR: information for “SMCap2059″ was not found
ERROR: information for “SMCapch22″ was not found
ERROR: information for “SMCap224″ was not found
ERROR: information for “SMCap226″ was not found
Sorry, there are multiple SysV pkgs installed
This is usually not possible, if pkg-get is used.
You will have to resolve this by hand, [with pkgrm]
or try being more specific about the version of software
The following related SysV packages have been detected
SMCapache SMCapach2 SMChttpd SMCapache SMCaph2 SMCap2059 SMCapch22 SMCap224 SMCap226 SMCap228 SMCap228
bash-3.00# pkgrm SMCap228
The following package is currently installed:
SMCap228 apache
(sparc) 2.2.8
Do you want to remove this package? [y,n,?,q]
apg-get will give you detail information if it could not remove the package.












