100% Painless Tryout!

Creating an OpenPKG instance (including installing arbitrary packages into it) is totally non-intrusive to the underlying Unix operating system (OS)!

OpenPKG uses just six small OS connection points (a presence file /etc/openpkg, three entries in the system passwd database, three entries in the system group database, entries in the root cron table, a single run-command script and the top-level directory of the OpenPKG instance).

Beside those six connection points, OpenPKG does not touch anything else on the underlying OS. Everything touched is below the chosen filesystem prefix only.

Notice also that an OpenPKG installation at any time can be residue-freely removed with the command "openpkg rpm -e `openpkg rpm -qa`".

Documentation: Tutorial

This tutorial helps you to get started with OpenPKG by guiding you through the first steps in software deployment with OpenPKG.

1. System Preparation (optional)

Before you start, the Unix system optionally should be prepared. Here especially the necessary disk space requirements of OpenPKG have to be taken into account.
optionally direct /openpkg to at least 150MB free disk space:
$ mkdir /storage/openpkg
$ ln -s /storage/openpkg /openpkg

optionally direct temporary directory to at least 250MB free disk space:
$ TMPDIR=/var/tmp
$ export TMPDIR

switch to temporary directory:
$ cd $TMPDIR

2. Instance Bootstrapping

The next step is to bootstrap the OpenPKG instance. Here we are using the standard /openpkg filesystem prefix. An arbitrary prefix can be used as long as at least the "Bootstrap From Source" approach is used.

Bootstrap From Source

download bootstrap source shell package:
$ ftp ftp.openpkg.org
ftp> bin
ftp> cd /SRC/CORE
ftp> get openpkg--.src.sh
ftp> bye

build bootstrap binary shell package from source shell package:
$ sh openpkg--.src.sh \\
  --prefix=/openpkg --tag=openpkg \\
  --user=openpkg --group=openpkg 

install bootstrap binary script package:
$ sh openpkg--.platform-openpkg.sh

stay on OpenPKG  instead of OpenPKG 2-STABLE:
$ echo "TAG=" >/openpkg/etc/openpkg/release

build and install tool chain via source RPM packages:
$ /openpkg/bin/openpkg build openpkg-tools | sh

Bootstrap From Binary (alternatively)

download bootstrap binary script package:
$ ftp ftp.openpkg.org
ftp> bin
ftp> cd /BIN/platform/CORE
ftp> mget openpkg-*.sh \\
     make-*.rpm binutils-*.rpm gcc-*.rpm perl-[0-9]*.rpm \\
     openpkg-tools-*.rpm
ftp> bye

install bootstrap binary script package:
$ sh openpkg-*.platform-openpkg.sh

install tool chain binary RPM packages:
$ /openpkg/bin/openpkg rpm -Uvh *.platform-openpkg.rpm

stay on OpenPKG  instead of OpenPKG 2-STABLE:
$ echo "TAG=" >/openpkg/etc/openpkg/release

optionally upgrade to latest versions via updated source RPM packages:
$ /openpkg/bin/openpkg build -Ua | sh

3. Registration (optional)

In order to access all OpenPKG download resources a simple one-time free-of-charge registration at the central OpenPKG Registry plus a simple identification during download is required. This is still not required for the simple software deployment which follows under "Software Deployment". But if you want to perform larger deployments or use the automated build tool (which automatically picks up update packages) you need to perform the following two steps:

User Registration

Follow the simple one-time free-of-charge registration procedure and register yourself under your valid Email address (say foo@example.com, although this example address is not a valid one ;-) at the central OpenPKG Registry. Registration requires just a few minutes and supports the OpenPKG project. As a result your Email address is now a valid download identification and grants you access to all download resources.

Instance Registration

send instance registration information:
$ /openpkg/bin/openpkg register \\
  --mode=post --user=foo@example.com
After this command the instance is still not approved for association to your Email address. Please login to your OpenPKG Registry account and manually approve the association of the instance to your account.

If you want to just quickly test-drive OpenPKG anonymously, you can alternatively register with a time-limited token which is valid for registration within 7 days:

temporarily register instance
$ /openpkg/bin/openpkg register \\
  --mode=post --user=

4. Software Deployment

Now you can install arbitrary OpenPKG software packages by either using the lower-level OpenPKG RPM command or the higher-level OpenPKG tool chain build command. As a simple illustration example the GNU Bash package of OpenPKG is installed.

Manual Deployment

build GNU Bash binary RPM package from source RPM package:
$ /openpkg/bin/openpkg rpm --rebuild \\
  ftp://ftp.openpkg.org//SRC/CORE/bash--.src.rpm

install GNU Bash binary RPM package:
$ /openpkg/bin/openpkg rpm -Uvh \\
  /openpkg/RPM/PKG/bash--.platform-openpkg.rpm

Automated Deployment (alternatively)

build and install GNU Bash:
$ /openpkg/bin/openpkg build bash | sh
5. Software Usage Finally, you can use the deployed software. Either through explicit paths (reasonable if leveraging OpenPKG's multiple-instance feature) or implicitly by merging the OpenPKG instance into the local environment.

Explicit Usage

$ /openpkg/bin/bash --version

Implicit Usage (alternatively)

$ eval `/openpkg/bin/openpkg rc --eval all env`
$ bash --version

6. Go Ahead!

Want to know more now? Please read the manual pages of at least the deployment commands and then proceed by deploying even more software into your OpenPKG instance...

Read Manual Pages

$ /openpkg/bin/openpkg man rpm
$ /openpkg/bin/openpkg man build

Deploy Even More

$ /openpkg/bin/openpkg rpm \\
  --rebuild [--with name] \\
  ftp://ftp.openpkg.org//SRC/class/package-...
$ /openpkg/bin/openpkg rpm -Uvh \\
  /openpkg/RPM/PKG/package-...
$ /openpkg/bin/openpkg build \\
  [-Dpackage1::with_name] \\
  [-Dpackage2::with_name] \\
  package1 package2 ... | sh

7. Cleanup

OpenPKG has not convinced you? Well, it's a pity, but no problem. You can easily get rid of anything you installed at once (both the OpenPKG instance and any of its OpenPKG packages) with the following simple command:
$ /openpkg/bin/openpkg rpm -e \\
  `/openpkg/bin/openpkg rpm -qa`