OpenPKG Project: Documentation: Tutorial (original) (raw)
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.
$ mkdir /storage/openpkg $ ln -s /storage/openpkg /openpkg
$ TMPDIR=/var/tmp $ export TMPDIR
$ 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
$ wget http://openpkg.org/go/download/openpkg.src.sh
$ *sh openpkg.src.sh * **--prefix=/openpkg --tag=openpkg ** --user=openpkg --group=openpkg
$ sh openpkg--.*-openpkg.sh
3. 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.
$ /openpkg/bin/openpkg build bash | sh
4. 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
5. 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 build *
[-D*package1::with_ name]
[-Dpackage2**::**with_ name]
package1 package2 … | sh
6. 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