Installing apache karaf on debian

Until the RFP (Request For Packaging) bug for karaf in the debian bug tracker is resolved, here is an APT archive with a karaf package for debian (architecture “all”).  The package is created using native debian packaging tools, and built from a source tarball and the APT archive itself is created, using aptly.

The package has been tested on Debian 9 “stretch” (the current stable), amd64.

Do the following commands as root on a debian GNU/linux system:

  1. Add the keys for the APT archive (Edit: needed to sign with the first key in the keyring because of an aptly bug, must add this key as well, if using the repository)
    wget -O - https://apt.bang.priv.no/apt_pub.gpg | apt-key add -
    wget -O - https://apt.bang.priv.no/maven_pub.gpg | apt-key add -
  2. Open the /etc/apt/sources.list file in a text editor, and add the following lines:
    # APT archive for apache karaf
    deb http://apt.bang.priv.no/public stable main
  3. Install karaf with apt-get
    apt-get update
    apt-get install openjdk-8-jdk karaf
  4. Log in with SSH (password is “karaf” (without the quotes)) and try giving some commands:
    ssh -p 8101 karaf@localhost

 

8 thoughts on “Installing apache karaf on debian”

  1. Note! Because the home directory of the karaf user has been changed to satisfy lintian it is recommended to purge karaf and reinstall, if you’re currently on karaf 4.1.4-8~9.30.

    To purge, do the following as root:

    apt-get purge karaf
    mv /home/karaf/.m2 /var/lib/karaf/
    mv /home/karaf/.karaf /var/lib/karaf/
    apt-get update
    apt-get install karaf
    

  2. Karaf 4.1.7 has been packaged and deployed to the repository.

    This will probably be the last 4.1.x version I’ll package. I plan to package a 4.2.x version as the next version of the debian package.

  3. Karaf 4.2.6 has been packaged and deployed to the repository.

    I have tested that the packaged karaf runs with both openjdk-8 and openjdk-11.

    Note that even though the package can be upgraded from 4.1.x with “apt-get dist-upgrade”, the old /etc/karaf/host.key won’t work, and need to be removed and karaf restarted before ssh can be used.

  4. Karaf 4.2.8 has been packaged and deployed to the repository.

    The package has been testet with openjdk-11.

    Note! I needed to sign with a different gpg key because of an aptly bug, so this key must be added to apt. I have added install of maven_pub.gpg to the apt-key command example in the blog post above

    Note2! There is a bug in karaf 4.2.8 that makes paste not work in an ssh login. This means that e..g. copy/pasting in config examples and install command examples does not work in karaf 4.2.8

  5. Karaf 4.2.9 has been packaged and deployed to the repository.

    The package has been testet with openjdk-11 on debian 10.5 “buster” on amd64.

    Note! The release have been signed with the same key as karaf 4.2.8. If you added this key to apt with 4.2.8 you don’t’ have to do anything, but if not the key must be added (adding the key is part of the apt-key command example of the blog post).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.