Download the repository DVD image
Get the repo image from http://genunix.org.
Download osol-repo-0906-full.iso to /src
I recommend verifying the checksums with md5sums_repo_0906.txt
Take a look at README.osol-repo while you’re downloading for more information.
(Optional) Create a compressed ZFS filesystem
We don’t need access time, hence -o atime=off
.
1 | pfexec zfs create -o atime=off -o compression=on rpool/repo |
Mount the image and copy the repo directory
1 | pfexec bash |
Unmount the iso:
1 | umount /mnt/cd |
(Optional) Set ZFS filesystem as readonly
1 | pfexec zfs set readonly=on rpool/repo |
Configure pkg server
1 | pfexec bash |
Specify a port that will not conflict with another service, see http://www.iana.org/assignments/port-numbers
1 | svccfg -s pkg/server setprop pkg/port=4 |
Copy the config file:
1 | cp /rpool/repo/cfg_cache /etc/0906_cfg_cache |
Edit the server config file
From http://genunix.org/dist/indiana/README.osol-repo:
Then, using a text editor of your choice, change the following line in the above file [/etc/0906_cfg_cache]:
origins = http://pkg.opensolaris.org/release
Replace everything after ‘ = ‘, to the end of the line, with the network-accessible hostname of the system that the depot server will be hosted on as follows (if you changed the port number above, you would include it using :, after ‘.com’ in the example below):
I used:
1 | origins = http://localhost:4/ |
Refresh and start the pkg server
1 | pfexec bash |
Configure your pkg client
1 | pfexec bash |
Double check pkg publisher is set:
1 | pkg publisher |
No errors? Great! now you can “pkg install” whatever you need from your machine instead of from the net.