Pkg-get: Setting up a Repository System for Solaris
Introduction
Package installation in Solaris is quite basic by default, and recompiling sources is not always simple or fast. This is why I suggest using pkg-get, which is a very practical utility that allows you to install your desired packages for Solaris (SPARC or x86) in just a few seconds or minutes.
Installation
New Method
The new method makes things much simpler:
|
|
Then add /opt/csw/bin
to your path:
|
|
And that’s it :-)
Old Method
First, you need wget! I suggest downloading it from these URLs:
Then place it in the /usr/bin/
directory of your Solaris. Rename it to wget to simplify the task:
|
|
Next, add /opt/csw/bin
to your path:
|
|
This is obviously a temporary solution for your PATH, but I recommend adding it to the /etc/profile
file:
|
|
You should also have gzip installed (normally it’s included by default, but I prefer to specify it…). Now that wget is installed, we just need to download pkg_get:
|
|
And let’s proceed with the installation:
|
|
In response to the questions, answer all and yes every time :-).
Configuration
Let’s edit the /opt/csw/etc/pkg-get.conf
file to select the most appropriate mirror from this list.
Usage
Now that everything is set up, we can use it. First, update the list of available packages using pkg-get or pkgutil (depending on the version of opencsw you have):
|
|
or
|
|
To search (for example, for vim), use this command:
|
|
And then to install it:
|
|
or
|
|
It’s not complicated and saves a tremendous amount of time :-)
Last updated 23 Jan 2013, 10:54 +0200.