Skip to Content
Author's profile photo Rafael Zanetti

How to install SAP Hana Express Edition 2.0 on Ubuntu 18.04 (Bionic Beaver)

Introduction

Warning: this version of Ubuntu was not tested by SAP HANA Express Edition engineers as a valid platform for HXE. The latest version confirmed by the HXE developers is 17.04. The process described here is not recommended or supported by SAP.

SAP Hana Express Edition 2.0, or simply hxe, is a free version of the in-memory database of SAP that can be installed both locally (on-premise) or in the cloud.

Two variants are available for installation:

  • Server Only - that requires a minimum of 8GB RAM (recommended 16GB RAM)
  • Server + Applications - minimum of 16GB RAM, recommended is 24GB

It is also required that you have 120GB of free disk space.

Each version is available either as as application you install on top of your Linux OS or as a preconfigured VMWare image.

The on-premisse installation of hxe is supported by SAP only in SUSE Enterprise Linux or Red Hat Enterprise, but it is works with other Linux distributions.

As my Ubuntu laptop only have 8GB RAM, I decided to go with the Local Server Only installation and this is the configuration I will be using in this tutorial.

Download

Go to https://www.sap.com/developer/topics/sap-hana-express.html, click on Free Download (or visit https://www.sap.com/cmp/ft/crm-xu16-dat-hddedft/index.html).

Register, and in the new screen, download the Download manager for your OS.

Run the Download manager and in the screen, select the image Binary Installer from the dropdown box and set the location where you want to download the files.

Make sure that Server Only Installer is checked, then click on Download.

Installation

After the download is finished, you will have a new file called hxe.tgz in the download directory you selected in the previous step.

Now execute:

$ tar zxfv hxe.tgz

Before continuing with the installation, we need to run some commands to make sure that the  system can run the installer.

First, we need to change the sh binary to point to bash

$ sudo cp /bin/sh /bin/sh/orig
$ sudo ln -s /bin/bash /bin/sh

Also, on Ubuntu 18.04, update-rc.d script no longer contain the -n flag, that is used by the hxe installer when it calls update-rc.d .

Due to this, the installation would fail with:

Installation of SAP HANA Express Edition System failed.
01:32:45.346 – ERR : Installation of SAP HANA Database failed
01:32:45.345 – INFO: Installation failed
01:32:45.346 – INFO: error installing
01:32:45.346 – INFO: Cannot create system
01:32:45.346 – INFO: Error checking sapinit
01:32:45.346 – INFO: Starting external program update-rc.d
01:32:45.346 – INFO: Command line is: update-rc.d -n sapinit defaults
01:32:45.346 – INFO: Output line 1: update-rc.d: error: unknown option
01:32:45.346 – INFO: Output line 2: usage: update-rc.d [-f] <basename> remove
01:32:45.346 – INFO: Output line 3: update-rc.d [-f] <basename> defaults
01:32:45.346 – INFO: Output line 4: update-rc.d [-f] <basename> defaults-disabled
01:32:45.346 – INFO: Output line 5: update-rc.d <basename> disable|enable [S|2|3|4|5]
01:32:45.346 – INFO: Output line 6: -f: force
01:32:45.346 – INFO: Output line 7:
01:32:45.346 – INFO: Output line 8: The disable|enable API is not stable and might change in the future.
01:32:45.346 – INFO: Program terminated with exit code 1

As a temporary workaround for this, run these commands:

$ sudo cp /usr/sbin/update-rc.d /usr/sbin/update-rc.d.orig
$ sudo sed -i "321i if (/^-n$/) { next }" /usr/sbin/update-rc.d

Finally, now you can now execute the setup script:

$ sudo ./setup_hxe.sh

The installer will make some questions about the installation, that you can leave the default values, and ask you to choose a password that will be used by OS users hxeadm, sapadm and HANA SYSTEM user.

The installer should finish after some time, and you HANA DB will be up and running.

You can confirm that by running these commands after the installation is finished:

$ su - hxeadm
Password:

hxeadm@hanadb01:/usr/sap/HXE/HDB90> HDB info

HDB info should show something similar to this:

And that’s it.

You can now connect to your hxe instance using eclipse with Hana tools (https://tools.hana.ondemand.com) or your favorite programming language.

Remember that the DB is running at port 3xx15, where xx is the instance number. If you used the default value from the installer, it should be 39015.

Finally, don’t forget to restore the original update-rc.d script:

$ sudo cp -f /usr/sbin/update-rc.d.orig /usr/sbin/update-rc.d

Conclusion

In this howto, I tried to described how I did the installation of HANA Express Edition on a local computer running Ubuntu 18.04 (Bionic Beaver).

Let me know if this method worked for you using the comments section.

Assigned Tags

      25 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Gunter Albrecht
      Gunter Albrecht

      Hi Rafael,

      nice one! I ran into the same problem and added Ubuntu 16.04 LTS as a package source, then downgraded  via

      sudo apt-get install init-system-helpers=1.51

      And later upgraded.

      Unfortunately it seems not to be working with tinc (decentral VPN) together, the hdbdaemon doesn't come up anymore. I think it might be related that a second network interface is up (/dev/net/tun)? Anyway, must explore further. A plain installation works.

      Author's profile photo Palaniappan Sivakumar
      Palaniappan Sivakumar

      Hi Rafael

       

      Excellent documentation

       

      A couple tips to add for future use in Ubuntu folks

       

      1. Ensure that FQDN hostname and entry in /etc/hosts file
      2. Ensure that media install files are not hosted in an external storage such as USB drive.Ideally copy it to locally attached drives, I will most likely avoid NFS mounts too 🙂

       

      Following your steps with two additional hints, I was able to finish.

       

      Two small  issues - Tenant database to add streaming (HXESTR in my case) failed to register with cockpit. I plan to register manually at a later time.

      If autostart is enabled - login response (in Gnome in my case) is slow. Since this is POC, I could start it whenever needed.

       

      Thanks for your tips. 🙂

       

       

       

      Author's profile photo Vivekanandan Ramalingam
      Vivekanandan Ramalingam

      Hello Guys,

      I struck with the SAP Hana Express(Server+Application) binary installation on Ubuntu 18.04. My server installation is successful but XSA installation is failing. (Is it because of RAM I need to upgrade it to 32GB)

      I checked the log file but there is no information captured since it shutdown’s the box once it reaches the XSA installation phase. I am using binary installation with SUSE files.

      I searched a bit on this issue and found RAM as a problem. Can I try different installation options like install VM on Ubuntu with Suse Linux or Windows and then install?

      My system –

      Ubuntu 18.04 (Bionic)

      Intel Core™ i7-8750H

      RAM 16GB DDR4

      SSD – 512 GB NVMe

      I request your help in fixing the above issue.

      Regards,

      Vivek

      Author's profile photo Rafael Zanetti
      Rafael Zanetti
      Blog Post Author

      Hi Vivek,

      XSA requires 16GB of RAM to be installed on top of the OS.

      I haven't tried to install in UBUNTU as my laptop have only 8GB RAM.

      Also, please note that It is required that you have 120GB of free disk space.

      Regading VM, as you only have 16GB RAM, an XSA installation is not possible. You can only run DB in the VM.

      My suggestion would be to either upgrade your RAM or run DB only.

       

      BR,
      Rafael

      Author's profile photo Selvakumar Mohan
      Selvakumar Mohan

      Rafael Zanetti,

      You are a life saver!! Worked like a charm. I would have spent hours if not for this blog. Really appreciate you spending time on helping many people like me. 3 cheers!!

       

      Selvakumar Mohan

      Author's profile photo Pranay Agarwal
      Pranay Agarwal

      My installation is stuck at "Installing SAP Host Agent version 7.21.33..."

      OS: Ubuntu 18.04

      ram: 6 Gigs

       

      I followed all the instructions given above. Please help.

      Author's profile photo Rafael Zanetti
      Rafael Zanetti
      Blog Post Author

      Hi Aditi,

      as described in the post:

      • Server Only - that requires a minimum of 8GB RAM (recommended 16GB RAM)

      6GB is not enough to install and run HANA express.

       

      BR,
      Rafael

      Author's profile photo Mohammed Shariq Muzaffar
      Mohammed Shariq Muzaffar

      I had the same issue on 8GB RAM. increased to 20 GB, no luck.

      Problem solved by increasing the number of cores.

      Author's profile photo Zied NEHDI
      Zied NEHDI

      For Debian flavor OS, like Ubuntu for example, you can refer to a complete guide for beginners here.

      Author's profile photo Andre Offermann
      Andre Offermann

      Hi Rafael,

      i tried this with HANA 2.0 SPS 04 and got the Message

      11:15:23.458 - INFO: Summary of critical errors
      11:15:23.142 - ERR : Installation of SAP HANA Express Edition System failed.
      11:15:22.982 - ERR : Cannot detect command line options dynamically.
      11:15:22.973 - ERR : Cannot parse external program configuration:
      syntax error at line 1, column 0, byte 0 at SDB/Install/Configuration/ExternalProgramConfiguration.pm line 80.

      Enough RAM ( 52 GB ) and diskspace and Ubuntu server 18.04.

      Any suggestions?

      Thanks a lot,

      Andre

       

      Author's profile photo Shuvendu Patel
      Shuvendu Patel

      This is a permission issue on the install directory. You can give full permission on the folder which will get past this error.

      Author's profile photo Petar Aleksandrov
      Petar Aleksandrov

      I’ve try to give 777 permission to the install directory but still have the same problem some other ideas? Im using RHEL 8.1 Shuvendu Patel

      Author's profile photo Petar Aleksandrov
      Petar Aleksandrov

      Hello colegues! We've found solution to our problem. Our problem was we need to install all the packages for lolcale -a because in RHEL 8 install only a lite version of the language you use in the installation.

       

      The command to install:

      yum install -y langpacks-en langpacks-de glibc-all-langpacks

       

      Credits to:

      Daniel Nashed blgo: https://blog.nashcom.de/nashcomblog.nsf/dx/locale-issue-on-linux-centos-rhel.htm

      Author's profile photo Petar Aleksandrov
      Petar Aleksandrov

      Do you find solution to this problem? Im facing the same problem right now, and I have permissions to my instalation folder.

      Author's profile photo Abhishek Anand
      Abhishek Anand

      Hi Rafael,

       

      Awesome....It really helped.

      Thanks for making it precise and simple, and especially for highlighting the expected errors and resolution.

       

      Thanks

      Abhishek

      Author's profile photo Thorsten Höfer
      Thorsten Höfer

      In Ubuntu 20.04 /usr/sbin/update-rc.d has changed.

      I have added line 336:

      if (/^-n$/) { next }

       

      The context is:

      sub main {
          my @args = @_;
          my $scriptname;
          my $action;
          my $force = 0;
      
          while($#args >= 0 && ($_ = $args[0]) =~ /^-/) {
              shift @args;
      if (/^-n$/) { next }        
              if (/^-f$/) { $force = 1; next }
              if (/^-h|--help$/) { usage(); }
              usage("unknown option");
          }
      Author's profile photo Chandra Sripati
      Chandra Sripati

      Thank you very much, you helped us, ateast me, a lot, It went thru fine.

      Author's profile photo Thorsten Niehues
      Thorsten Niehues

      Nice to know you successfully installed it on Ubuntu 20.04.

      I am stuck at the missing library libstdc++6-6.2

      How did you fix the abortion of the script because of different libstdc++ Versions??

      Author's profile photo Peter Strauss
      Peter Strauss

      Hi Thorsten, How did you get around the problems installing libstdc++6-6.2?

      Author's profile photo Jan Gawlik
      Jan Gawlik

      Hi Thorsen, hi Peter, i'm also stuck on :

      Failed to install following package(s): libstdc++6-6.2
      Your software repositories do not have the package(s) and/or the required
      version. Please check with your OS vendor.

      Even though i have installed the newest version...

      Author's profile photo Peter Strauss
      Peter Strauss

      I gave up and installed on VirtualBox using the image file.

      Author's profile photo Thorsten Niehues
      Thorsten Niehues

      Hello and thanks a lot for this tutorial 🙂

      in my case the command

      sudo sed -i "321i if (/^-n$/) { next }" /usr/sbin/update-rc.d

      didn't fix the issue - Ubuntu 20.04.1 So I looked into the script and change the main method in /usr/sbin/update-rc.d Here the first argument - which is in this case the -n will be removed Do NOT forget to restore the backup version of this script after the installation of SAP HANA
      /usr/sbin/update-rc.d
      ## Dependency based
      sub main {
          my @args = @_;
          my $scriptname;
          my $action;
          my $force = 0;
          
          ### Thorsten Niehues debug ###
          my $filename = '/root/messageFromUpdateRc.txt';
          open(my $fh, '>', $filename) or die "Could not open file '$filename' $!";
          print $fh "[$_]\n" foreach @ARGV;
          close $fh;
          ### TNI debug ###
      
          ### Thorsten Niehues remove -n  ###
          ### Do NOT forget to remove this part after SAP HANA installation   
          @args = @args[ 1 .. $#args ];
          ### Thorsten Niehues remove -n  ###   
         
          while($#args >= 0 && ($_ = $args[0]) =~ /^-/) {
      Show%20changes%20of%20/usr/sbin/update-rc.d
      Author's profile photo Gunasekhar Reddy Nalla Gar
      Gunasekhar Reddy Nalla Gar

      Thank you Thorsten.  Needed this for Ubuntu 20.04, finally...

       

      Finalizing installation of SAP HANA Database...
      Finalizing System Installation...
      Starting SAP HANA Database system...
      Updating SAP HANA Express Edition Instance Integration on Local Host...
      Deploying SAP Host Agent configurations...
      Creating Component List...
      SAP HANA Express Edition System installed

      Thank you.

       

      Author's profile photo Werner Dähn
      Werner Dähn

      I installed Hana on Ubuntu 20.04 focal today and got the error at the optimization phase:

      "Fail to retrieve certificate"

      Same happens when running ./HXE_EXPRESS_20/register_cockpit.sh

       

      It turns out that the register cockpit script asks for all tls1 certificates put the installed openssl program does not support these anymore.

      So I changed line 372, the one with the openssl command and replaced -tls1 with -tls1_2. No error and I can login with the XSA_ADMIN user into the cockpit app.

      Just to let you know in case you run into this problem as well.

       

      Author's profile photo Werner Dähn
      Werner Dähn

      Oh, and the setup_hxe.sh script tests if the libstdc++6 is installed for a version that is not available in Ubuntu 20.04.

      So I installed it manually

      sudo apt install libstdc++6

      and modified line 1973, the list of REQUIRE_OS_PACKAGE_UBUNTU, and removed the entry