Build your own OpenSolaris 2009.06 IPS repository on your laptop

Teknoloji

10 Sep 2009

I was looking for a way of speeding up downloads from the IPS repository, and finding a way for OpenSolaris Parties to quickly install software after fresh install, in case of "no internet connections in this class-room, sorry". This is particularly usefull when many people would like to install simultaneously big packages like OpenOffice, NetBeans, or the AMP stack, or environments where people would like to reduce bandwith usage to the standard opensolaris.org IPS server.

A big thank you to Brian Leonard who wrote the first a good example of the man page of pkg.depotd (1m).

I just added a few lines, and removed the details given by Brian.

So, this procedure works well from a fresh OpenSolaris 2009.06 installation (build 111b).

Be aware that step 1 can be quite time consuming: 7GB of download (here from Switzerland), and 40 minutes are needed to copy approximatly 600′000 files.

If you have an external disk, I would recommand to adapt the below procedure to download the ISO image on an external physical disk (writes faster than on a laptop), mount it, and then do the rsync between your external disk (read faster than on a laptop) and your internal disk. ⁞

Step 1: Get the full ISO image repository

cd /export

pfexec wget http://mirror.switch.ch/ftp/mirror/opensolaris.org/release_isos/2009/06/osol-repo-0906-full.iso

pfexec mount -F hsfs `pfexec lofiadm -a /export/osol-repo-0906-full.iso` /mnt

pfexec zfs create -o compression=on /rpool/repo pfexec rsync -aP /mnt/repo /rpool/repo

Now that we have all the package files of the repository correctly and permanently mounted, let manage the package server service.

Step 2: Configure the package server

You need to add you hostname in two locations:

* add your hostname at the origins line in the /rpool/repo/cfg_cache file

* add you hostname and IP address in the /etc/inet/hosts file.

Be aware that this last file is read-only, so force writing throught vi of change permissions before editing it.

svccfg -s application/pkg/server setprop pkg/inst_root=/rpool/repo

svccfg -s application/pkg/server setprop pkg/readonly=true

svccfg -s application/pkg/server setprop pkg/cfg_file=/rpool/repo/cfg_cache

svcadm refresh application/pkg/server

svcadm enable application/pkg/server

Step 3: Check your new IPS server

You package server should then be up and running on the default port 1000.

You can then open your browser on http://localhost:10000 and see your new IPS server online

Step 4: use/share your owne IPS server

If you want to use it, you can use it as the default pkg server with the "pkg set-publisher -O" command, or as a mirror pkg server with the "pkg set-publisher -m" command.

You can also use the GUI (package manager) to do that.

More details can be found here or through a single "man pkg" command.

Source/Kaynak : http://blogs.sun.com/karim/entry/build_your_own_repository

Comment Form

Content In Different Language


Recent Comments


  • Jim Dougherty: You can fix Solaris 8 named_to_major, path_to_inst, drivers_alias errors on boot by simply installin [...]
  • psha: doesn't work [...]
  • Sebastian: Hi, I don't think using a suite will work either. The order is also random. It is just a coincide [...]
  • Himani: please send the ESB tutorial [...]
  • kevin hill: code 39 dvd will not or be found [...]
  • Our Scores