If I have a Solaris host without a direct Internet access, how can I install OpenCSW packages on it. Do I have to manually copy all the .pkg.gz files, gunzip them by hand and run pkgadd on them one by one in the right order? Or is there a better way?

This question is marked "community wiki".

asked 27 Mar '12, 00:08

automaciej's gravatar image

automaciej ♦♦
accept rate: 55%

edited 21 Mar '15, 15:26

cgrzemba's gravatar image

cgrzemba ♦♦

There are two better, general ways. One is to create a mirror of the OpenCSW catalog (e.g. using rsync), transfer it to the internal network, and serve it over HTTP (e.g. with Apache or lighttpd). You can then configure pkgutil on the restricted machines to use your internal package mirror.

The second option is to build a single package stream file containing the package(s) you want to install, with all the dependencies. You do need one machine with Internet access, and a way to transfer files from it to the machines with restricted access.

Let's assume you have a working Solaris host that has Internet access - this is not your target machine, it's an intermediate host. You bootstrap OpenCSW on it, for completeness shown below:

pkgadd -d http://get.opencsw.org/now
export PATH
pkgutil -U -u pkgutil

Now that you have a functional pkgutil, you can use it to build your package stream with dependencies. You can then use the following command (split into multiple lines for readability), as a regular user:

pkgutil \
  --stream \
  --target=sparc:5.10 \
  --output imagemagick-and-others.pkg \
  --yes \
  --download \
  imagemagick coreutils vim ggrep gsed

You'll see how pkgutil downloads many different packages and repacks them into a single package stream. You can then transfer it to your target machines and install packages from it. You need to install the packages in the right order; pkgutil will print that order out when it finishes creating the package stream.

The resulting package stream will be placed in the ~/.pkgutil/packages directory.

permanent link
This answer is marked "community wiki".

answered 28 Mar '12, 22:24

automaciej's gravatar image

automaciej ♦♦
accept rate: 55%

edited 19 Apr '12, 11:47

Dagobert's gravatar image

Dagobert ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 27 Mar '12, 00:08

question was seen: 42,098 times

last updated: 21 Mar '15, 15:26

powered by OSQA