Skip to content

Instantly share code, notes, and snippets.

@tlinnet
Last active November 3, 2025 02:19
Show Gist options
  • Save tlinnet/4196fd9c7aa43e37ea71e69bdc40a7dd to your computer and use it in GitHub Desktop.
Save tlinnet/4196fd9c7aa43e37ea71e69bdc40a7dd to your computer and use it in GitHub Desktop.

Revisions

  1. tlinnet renamed this gist Jul 26, 2023. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions gistfile1.txt → saphana.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    ### Install SAP HANA 2.0, express edition on Ubuntu

    In the guide [Install SAP HANA 2.0, express edition on a Preconfigured Virtual Machine](https://developers.sap.com/group.hxe-install-vm.html),
    this will be a VM running `SUSE Linux Enterprise Server (SLES) for SAP Applications 12 SP2`. This server needs a license subscription and has no access to software repository.

    @@ -66,6 +68,7 @@ sudo shutdown now
    Then in VBox, in Settings change network to `NAT Network` : `NatNetwork`.
    Then in VBox, File -> Tools -> Network Manager -> NAT Networks -> Port Forwarding. Create rule
    * Name:`SSH`, Protocol:`TCP`, Host IP:`127.0.0.1`, Host Port:`2522`, Guest IP:`10.0.2.23`, Guest Port:`22`.

    Start the VM again. Then SSH from your host: `ssh -p 2522 [email protected]`

    Set DNS
  2. tlinnet created this gist Jul 26, 2023.
    169 changes: 169 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,169 @@
    In the guide [Install SAP HANA 2.0, express edition on a Preconfigured Virtual Machine](https://developers.sap.com/group.hxe-install-vm.html),
    this will be a VM running `SUSE Linux Enterprise Server (SLES) for SAP Applications 12 SP2`. This server needs a license subscription and has no access to software repository.

    Instead we will follow the guide [Install SAP HANA, express edition on a Native Linux Machine](https://developers.sap.com/group.hxe-install-binary.html).

    We only install `server-only virtual machine pack`.
    * The host machine needs minimum 8 GB RAM, 2 cores, and 120 GB Disk space (we will try with 30 GB).
    * `Java JRE 8 64bit` or higher for the SAP download manager. Java can installed from here [adoptium](https://adoptium.net/temurin/releases/), and configure `JAVA_HOME`.

    Then Download SAP HANA, express edition via [registration page](https://www.sap.com/cmp/td/sap-hana-express-edition.html).
    * Get the `Windows DM` and open `HXEDownloadManager_win.exe`

    In the Download Manager window, we download Platform:`Linux/x86-64`, Image:`Binary Installer`, and download `Getting Started` + `Server only installer`, which downloads `Getting_Started_HANAexpress_VM.pdf` and `hxe.tgz`.

    ### Install Ubuntu 22.04 LTS and configure network

    Get the [jammy Server install image](https://releases.ubuntu.com/jammy/)

    Setup machine in VBox
    * Machine -> New....
    * Name: `kerb-hana.test.me`.
    * ISO image: Point to the downloaded image `ubuntu-22.04.2-live-server-amd64.iso`
    * Click Next, which should be an `unattendedly install`
    * user `vboxuserhana` and PW `changeMe1234!`
    * Hostname: `hana`
    * Domain Name: `test.me`
    * Enable Guest editions.
    * Next to set Hardware
    * Give it `8192 MB` RAM and `2 CPUs`. Enable EFI. Give it 30 GB disk.
    * Install with all default. Keyboard layout should match your host system.
    * Name: `Server Hana`
    * Server Name: `hana`
    * username `vboxuserhana` and PW `changeMe1234!`
    * Install ssh, as copy-paste will not work into the terminal. A full GUI is needed for that or use SSH.
    * Dont install other snaps

    Login with `vboxuserhana` and set fixed IP.

    ```bash
    cd /etc/netplan
    sudo nano 00-installer-config.yaml
    ```

    It should look like this
    ```
    network:
    version: 2
    ethernets:
    enp0s3:
    dhcp4: no
    addresses:
    - 10.0.2.23/24
    routes:
    - to: default
    via: 10.0.2.1
    routes:
    - to: default
    via: 192.168.1.1
    ```

    ```bash
    sudo netplan try
    sudo shutdown now
    ```

    Then in VBox, in Settings change network to `NAT Network` : `NatNetwork`.
    Then in VBox, File -> Tools -> Network Manager -> NAT Networks -> Port Forwarding. Create rule
    * Name:`SSH`, Protocol:`TCP`, Host IP:`127.0.0.1`, Host Port:`2522`, Guest IP:`10.0.2.23`, Guest Port:`22`.
    Start the VM again. Then SSH from your host: `ssh -p 2522 [email protected]`

    Set DNS
    ```bash
    nslookup ad1.test.me
    cat /etc/resolv.conf
    # Insert before the line search
    sudo sed -i '/^nameserver 127.0.0.53/i nameserver 10.0.2.20' /etc/resolv.conf
    cat /etc/resolv.conf´
    nslookup ad1.test.me
    nslookup add1.a.test.me
    nslookup aw1.a.test.me
    ```

    ### Install SAP HANA 2.0, express edition on Ubuntu

    In the download folder with `hxe.tgz`, copy the file to the server:

    ```bash
    scp -P 2522 hxe.tgz [email protected]:/home/vboxuserhana/hxe.tgz`
    ```

    Then `ssh -p 2522 [email protected]` and then we follow [Install SAP HANA 2.0, express edition](https://developers.sap.com/tutorials/hxe-ua-installing-binary.html)

    ```bash
    # Fix HANA scripts are not compatible with dash shell. /bin/sh is a softlink to /usr/bin/dash.
    sudo mv /bin/sh /bin/sh.orig
    sudo ln -s /bin/bash /bin/sh
    # Install missing packages. # See which version installed of libstdc++6: 12.1
    sudo apt install libltdl7 zip unzip libstdc++6
    apt-cache policy libstdc++6
    # We need to create the group sapsys with id 79
    # Else you get error: Ensure that no permissions are changed by the umask when extracting or copying the folders.
    # First verify if already exists
    getent group sapsys
    getent group 79
    # Then we create the group and set it as primary group
    sudo groupadd -g 79 sapsys
    sudo usermod -a -G sapsys vboxuserhana
    sudo usermod -g sapsys vboxuserhana
    # Login again and check primary group
    su vboxuserhana
    id
    # Unpack and install
    mkdir hanainstall
    mv hxe.tgz hanainstall
    cd hanainstall
    tar -xvzf hxe.tgz
    # Fix issue pin to libstdc++6-6.2 net in setup_hxe.sh
    sed -i 's/libstdc++6-6.2/libstdc++6/g' ./setup_hxe.sh
    # Before install, check there is 12 GB free on /
    # https://packetpushers.net/ubuntu-extend-your-default-lvm-space/
    df -h # Look for /
    sudo vgdisplay # Look for: Free PE / Size
    sudo lvdisplay # Look for LV Size
    sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
    sudo lvdisplay # Look for LV Size changed
    df -h # Look for /
    sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
    df -h # Look for /
    # Then fix error:
    # Command line is: update-rc.d -n sapinit defaults
    # update-rc.d: error: unknown option
    # https://answers.sap.com/questions/13045107/sap-hana-express-edition-failed-installation-in-ub.html
    # https://blogs.sap.com/2018/07/21/how-to-install-sap-hana-express-edition-2.0-on-ubuntu-18.04-bionic-beaver/
    # Ubuntu 16.04 LTS Xenial : https://manpages.ubuntu.com/manpages/xenial/man8/update-rc.d.8.html#options
    # -n Don't do anything, just show what we would do.
    # Ubuntu 22.04 LTS Jammy : https://manpages.ubuntu.com/manpages/jammy/man8/update-rc.d.8.html#options
    # -n
    sudo cp /usr/sbin/update-rc.d /usr/sbin/update-rc.d.orig
    sudo sed -i '/^ usage("unknown option");/i \ \if (/^-n$/) { next }' /usr/sbin/update-rc.d
    # Then install. Take all defaults.
    sudo ./setup_hxe.sh
    # If any problems, try also
    cd ./HANA_EXPRESS_20/DATA_UNITS/HDB_SERVER_LINUX_X86_64
    sudo ./hdblcm --ignore=check_signature_file
    ```

    This should have installed with options
    ```
    SAP HANA System ID: HXE
    Instance Number: 90
    Local Host Worker Group: default
    System Usage: development
    Location of Data Volumes: /hana/shared/data/HXE
    Location of Log Volumes: /hana/shared/log/HXE
    Directory containing custom configurations: /home/vboxuserhana/hanainstall/HANA_EXPRESS_20/DATA_UNITS/HDB_SERVER_LINUX_X86_64/configurations/custom
    Certificate Host Names: hana -> hana
    System Administrator Home Directory: /usr/sap/HXE/home
    System Administrator Login Shell: /bin/bash
    System Administrator User ID: 1001
    ID of User Group (sapsys): 79
    Restart system after machine reboot?: Yes
    Inter Service Communication Mode: ssl
    Remote Execution: ssh
    Use single master password for all users, created during installation: Yes
    Database Isolation: low
    Install Execution Mode: optimized
    Installation Path: /hana/shared
    Local Host Name: hana
    ```