The creation of a Solaris 11 repository is straight forward. Finding the related documentation isn't (status April 2011). The product name and domain names changed in the last year.
Step 1: Provide a Location in your File System for a IPS Repository
A simple and professional way is to create a new ZFS file system for a repository:
# zfs create /export/repo
We need super user privileges anyhow. The root of the repository will be in /export/repo.
Step 2: Configure the SMF Services for the pkg Server
2.1 Enable the SMF Service for the Server
This is a one time operation. The server will stay up on it's own since it get's managed through SMF. Reboots of the system will not make a difference.
# svcadm enable application/pkg/server
2.2 Configure Properties of the Server
Set the port of the server to 10000 (in this case). The following command configures the SMF property of the service
# svccfg -s application/pkg/server setprop pkg/port=10000
Configure the root file system (here /export/repo) in SMF for the server:
# svccfg -s application/pkg/server setprop pkg/inst_root=/export/repo
The server is by default in read-only mode. Setting the following SMF property allows to post packages:
# svccfg -s application/pkg/server setprop pkg/readonly=false
2.3 Configure a Name for the Repository
It is common to pick the domain name of the server as publisher (here repo.scalingbits.com)
# pkgrepo set -s /export/repo publisher/prefix=repo.scalingbits.com
2.4 Restart the entire Server
Refresh and restart the server for the repository with the hep of SMF:
# svcadm refresh application/pkg/server # svcadm restart application/pkg/server
Step 3: Check the Configuration
Point the browser to your configured hostname and port. The following page should appear:
The root directory of the repository /export/repo should have a sub directory (here repo.scalingbits.com) as well.
The pkgrepo info command allows to check the state of the repository:
nsschneid@solarisB163:~# pkgrepo info -s http://repo.scalingbits.com:10000
PUBLISHER PACKAGES STATUS UPDATED
repo.scalingbits.com 0 online 2011-04-18T13:43:04.374125Z
... shows a healthy repository without any packages installed.
Some more pointers I found:
- OpenSolaris documentation on sun.com
- A youtube.com video from OracleWebVideo
- A blog entry from Michal Pryc on blogs.sun.com
- A blog entry from "swinful" describing the installation of an iso image repository