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 key for the APT archive
    wget -O - | 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 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


6 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.

Leave a Reply

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

You are commenting using your 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.