Building a Solaris 11 repository without network connection

Solaris 11 has been released and is a fantastic new iteration of Oracle's rock solid, enterprise operating system.  One of the great new features is the repository based Image Packaging system.  IPS not only introduces new cloud based package installation services, it is also integrated with our zones, boot environment and ZFS file systems to provide a safe, easy and fast way to perform system updates.

My customers typically don't have network access and, in fact, can't connect to any network until they have "Authority to connect."  It's useful, however, to build up a Solaris 11 system with additional software using the new Image Packaging System and locally stored repository. The Solaris 11 documentation describes how to create a locally stored repository with full explanations of what the commands do. I'm simply providing the quick and dirty steps. 

The easiest way is to download the ISO image, burn to a DVD and insert into your DVD drive.  Then as root:

  • pkg set-publisher -G '*' -g file:///cdrom/sol11repo_full/repo solaris

Now you can to install software using the GUI package manager or the pkg commands.  If you would like something more permanent (or don't have a DVD drive), however, it takes a little more work.

  • After installing Solaris 11, download (on another system perhaps) the two files that make up the Solaris 11 repository from our download site
  • Sneaker-net the files to your Solaris 11 system
  • Cat the two files together to create one large ISO image. The file is about 6.9 GB in size
  • mount -F hsfs sol-11-11-repo-full.iso /mnt

You could stop here and set the publisher to point to the /mnt/repo location, however, this mount will not be persistent across reboots. Copy the repository from the mounted ISO image to a permanent, on disk location.

  • zfs create -o atime=off -o compression=on rpool/export/repoSolaris11
  • rsync -aP /mnt/repo /export/repoSolaris11
  • pkgrepo -s /export/repoSolaris11/repo refresh
  • pkg set-publisher -G '*' -g /export/repoSolaris11/repo solaris

You now have a locally installed repository for adding additional software packages for Solaris 11.  The documentation also takes you through publishing your repository on the network so that others can access it.



Comments:

Good afternoon.

Great post.
Very helpful.
Thank you.

One question:
Should "pkgrepo -s /export/repoSolaris11 refresh" be "pkgrepo -s /export/repoSolaris11/repo refresh" ?

Thanks again.
Tim ..

Posted by guest on November 12, 2011 at 05:52 AM EST #

The lofiadm step isn't needed since mount will do that automatically now if you just pass it the iso image file.

Posted by Darren J Moffat on November 12, 2011 at 11:10 PM EST #

Thanks. I've updated that line, reorganized and optimized the steps.

Posted by Jim Laurent on November 14, 2011 at 02:31 AM EST #

I believe that two repository files in the solaris 11 download site are broken. My collegue and I tried to download them several times from 11/11 to Nov 18. Would you check it?

Posted by guest on November 16, 2011 at 05:58 PM EST #

The original repository files were ZIP format and apparently, early versions of ZIP were not "large file" aware. Solaris eng. has posted non-zipped versions.

Please try again.

Posted by Jim Laurent on November 17, 2011 at 02:21 AM EST #

Thanks Laurent, good post. It seems u miss '-o' before 'compression=on' in your 'zfs create' command.

Posted by guest on November 30, 2011 at 01:20 AM EST #

good

Posted by guest on September 03, 2013 at 11:08 PM EDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Jim Laurent is an Oracle Sales consultant based in Reston, Virginia. He supports US DoD customers as part of the North American Public Sector hardware organization. With over 17 years experience at Sun and Oracle, he specializes in Solaris and server technologies. Prior to Oracle, Jim worked 11 years for Gould Computer Systems (later known as Encore).

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today