HANA 2.0 Installation on RHEL

SAP HANA 2.0 is a high-performance, in-memory database platform built to handle real-time analytics and transactional workloads. Deploying it on Red Hat Enterprise Linux (RHEL) requires not only a supported OS version but also careful system tuning, file system configuration, network optimization, and kernel parameter adjustments to meet SAP’s stringent operational requirements.

HANA 2.0 Database Installation

This guide provides a complete walkthrough of the SAP HANA 2.0 installation process on RHEL, including validated practices from real-world enterprise environments. It integrates SAP’s recommendations and covers all critical areas—from preparing the operating system and configuring system resources, to executing the installer, validating the deployment, and tuning performance for production-readiness.

Prerequisites for HANA 2.0 on RHEL

  • RHEL Version: 7.6 or 8.x (64-bit only)
  • Minimum RAM: 16GB for development systems
  • Disk Space: 120GB for installation files + data storage
  • Supported CPUs: Intel Nehalem or newer (AMD EPYC recommended)
  • SAP Host Agent: 7.22 or higher
# Register and enable required repositories
sudo subscription-manager register
sudo subscription-manager attach --auto
sudo subscription-manager repos --enable=rhel-8-for-x86_64-sap-solutions-rpms
        

System Preparation and Configuration

Kernel Parameters

cat <> /etc/sysctl.conf
kernel.sem = 1250 256000 100 8192
vm.max_map_count = 2000000
net.ipv4.ip_local_port_range = 1024 65000
vm.swappiness = 10
EOF
sysctl -p

Filesystem Setup

SAP HANA requires specific mount points to be manually created before installation. Below is a recommended layout and setup for these file systems, along with descriptions of each mount point:

  • /hana/shared – Shared directory for binaries, configurations, and client/studio installations. Accessible by all hosts in a HANA cluster.
  • /usr/sap – Contains local instance-specific files. Do not use it as a mount point for subdirectories like /usr/sap/<SID>.
  • /hana/data – Stores persistent data files for the SAP HANA database.
  • /hana/log – Stores transaction logs for recovery and persistence operations.
  • /lss/shared – Optional; stores files for the SAP HANA Local Secure Store (LSS), used in secure multi-host systems.
# Create physical volume
pvcreate /dev/sdb

# Create volume group
vgcreate vg_hana /dev/sdb

# Create logical volumes
lvcreate -n lv_hana_shared -L 100G vg_hana
lvcreate -n lv_hana_usr_sap -L 50G vg_hana
lvcreate -n lv_hana_data -L 500G vg_hana
lvcreate -n lv_hana_log -L 100G vg_hana
lvcreate -n lv_lss_shared -L 10G vg_hana

# Format volumes as XFS
mkfs.xfs /dev/vg_hana/lv_hana_shared
mkfs.xfs /dev/vg_hana/lv_hana_usr_sap
mkfs.xfs /dev/vg_hana/lv_hana_data
mkfs.xfs /dev/vg_hana/lv_hana_log
mkfs.xfs /dev/vg_hana/lv_lss_shared

# Create mount points
mkdir -p /hana/shared /usr/sap /hana/data /hana/log /lss/shared

# Mount filesystems
echo "/dev/vg_hana/lv_hana_shared /hana/shared xfs defaults 0 0" >> /etc/fstab
echo "/dev/vg_hana/lv_hana_usr_sap /usr/sap xfs defaults 0 0" >> /etc/fstab
echo "/dev/vg_hana/lv_hana_data /hana/data xfs defaults 0 0" >> /etc/fstab
echo "/dev/vg_hana/lv_hana_log /hana/log xfs defaults 0 0" >> /etc/fstab
echo "/dev/vg_hana/lv_lss_shared /lss/shared xfs defaults 0 0" >> /etc/fstab

mount -a

Ensure all directories are mounted correctly and accessible from all HANA cluster nodes as required. Avoid storing additional files or creating sub-mounts under /usr/sap/<SID>, as this path is managed exclusively by the SAP HANA lifecycle manager.

Operating System Settings

  • Disable SELinux:
    sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
  • Disable THP:
    echo never > /sys/kernel/mm/transparent_hugepage/enabled
  • Activate sap-hana tuned profile:
    yum install tuned-profiles-sap-hana
    systemctl enable --now tuned
    tuned-adm profile sap-hana
  • Disable kdump and ABRT:
    systemctl disable --now kdump
    systemctl disable --now abrtd abrt-ccpp
  • Disable numad:
    systemctl disable --now numad

Network Configuration Settings

Recommended for inter-node/service communication:

cat <> /etc/sysctl.conf
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_slow_start_after_idle = 0
net.core.wmem_max = 4194304
net.core.rmem_max = 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_window_scaling = 1
net.core.somaxconn = 4096
net.ipv4.tcp_tw_reuse = 1
EOF
sysctl -p

HANA 2.0 Installation Process

Installation Methods Overview

SAP HANA can be installed using multiple interfaces provided by the SAP HANA Database Lifecycle Manager (HDBLCM). Each method caters to different deployment scenarios, user preferences, and automation requirements:

1. GUI-Based Installation (hdblcmgui)

This method launches a graphical wizard to guide users through the installation process. It requires X11 forwarding or a desktop environment.

cd /hana/shared/HANA_DB
./hdblcmgui

During installation, users are prompted for the system ID (SID), instance number, passwords, and component selection. This method is user-friendly and ideal for those unfamiliar with the command line, or for one-off installs in environments where GUI access is available.

Note: If running on a remote server, ensure X11 forwarding is enabled via SSH (ssh -X user@host).

2. Command-Line Interactive Installation (hdblcm)

This method launches a terminal-based wizard where installation options are provided interactively. It’s suitable for environments without a graphical interface.

cd /hana/shared/HANA_DB
./hdblcm

The installer will prompt for input such as installation paths, SID, instance number, and password details. It also allows for optional components like the HANA Studio client, XS Engine, or AFL libraries to be selected during the process.

This approach offers flexibility while ensuring user input is validated in real time.

3. Silent Installation Using a Response File

This is the preferred method for automated or large-scale deployments. All required input parameters are defined in a response file, and the installation runs non-interactively.

./hdblcm --configfile=/path/to/response.cfg

Example response file content:

SAP_SID=HDB
INSTANCE_NUMBER=00
SYSTEM_USER_PASSWORD=Manager1
SAPADM_PASSWORD=Manager1
INSTALL_COMPONENTS=server
ROOT_USER=root
ROOT_USER_PASSWORD=yourRootPassword

To generate a template response file:

./hdblcm --dump_configfile_template

Silent installation is ideal for DevOps, repeatable builds, and CI/CD scenarios. Ensure the response file is stored securely as it contains sensitive credentials.

Monitoring Installation

Regardless of the method used, installation logs are generated under:

/var/tmp/hdb_install_*/

To monitor in real time:

tail -f /var/tmp/hdb_install_*/trace*

Check the hdbinst.log and trace files for detailed output and troubleshooting.

Post-Installation Configuration

Verify HANA services:

HDB info

Expected output:

USER      PID   PPID %CPU    VSZ   RSS COMMAND
hdbadm    1234     1  0.1 123456 78900 /usr/sap/HDB/HDB00/exe/sapstartsrv ...

Configure HANA Studio connection:

  1. Open HANA Studio
  2. Add system: hana01:30015
  3. Use SYSTEM user with installation password

System Validation and Testing

Run HANA hardware check:

SELECT * FROM M_HOST_RESOURCE_UTILIZATION

Perform filesystem validation:

df -h | grep -E 'hana|shared'

Check for successful installation:

sudo -i -u hdbadm
HDB info

Troubleshooting Common Issues

Port Conflicts

If installation fails with port errors:

# Check port usage
netstat -tuln | grep 3[0-9]15

# Resolve conflicts
sudo systemctl stop <conflicting_service>

Permission Errors

Correct filesystem permissions:

chown -R hdbadm:sapsys /hana
chmod -R 775 /hana/shared

Performance Optimization Tips

  • NUMA Configuration: Enable in /etc/default/grub:
    GRUB_CMDLINE_LINUX="... numa_balancing=disable transparent_hugepage=never"
  • I/O Scheduler: Set to noop or deadline
    echo 'deadline' > /sys/block/sdb/queue/scheduler
  • HANA Parameters: Adjust global.ini:
    [memorymanager]
    preload_column_tables = true
  • Max Connections: Set maxchannels to 20000-40000 in global.ini
  • CPU C-State Performance:
    GRUB_CMDLINE_LINUX="... processor.max_cstate=1 intel_idle.max_cstate=1"

Final Thoughts

This guide, incorporating SAP Notes 2777782 and 2382421, ensures a production-grade HANA 2.0 deployment on RHEL. Always validate with latest SAP notes before rollout.



Rate Your Experience

: 0 : 0


Last updated in Feb, 2025

Useful Tools


Read more | Learn more

Cloud Technology


Read more | Learn more

Oracle Database


Read more | Learn more

MSSQL Database


Read more | Learn more

PostGres Database


Read more | Learn more

Linux


Read more | Learn more

ASP/C#


Read more | Learn more

Online Tests


Read more | Learn more