Install and configure SAP Hana Express 2.0 with XSA on an old laptop
There are tons of installation and configuration documents of Hana Express 2.0 on SAP website, official tutorials, guides, blogs, etc. What is the initiative for me to write this blog? I do not intend to write another step-by-step guide, instead I am sharing the bunkers and traps I have gone through, and how I got over them.
Let me introduce myself, I am a BW/HANA/BOBJ developer with 14 years experience, I have limited experience in system administration and I am a Linux newbie, frankly, I do know command
ls and that’s it. I have an unused old laptop Thinkpad T430s with 8G ram, so I decided to install my own Hana box.
Native Linux or VM installation
There are 2 installation methods, Native Linux Machine, or Virtual Machine (VM). I chose Native Linux based on 2 reasons, first of all, my laptop is very old with only 8G ram, I want to save as much resource as possible for Hana server, second, this is an opportunity for me to enrich my self-learning skills.
Prepare Linux system
I picked up CentOS Linux 8, the community supported edition of Red Hat Enterprise Linux (RHEL). I decided to install Command Line Interface (CLI) only, so I have chosen Minimal option during installation, and kept everything else as default. This has caused a big trouble later when I start to install Hana Express, the setup program created 2 partitions in the hard drive, 50GB for root, 65GB for home (My hard drive is a 120GB SSD).
No wireless? Yes that’s linux, wifi is not included in Minimal install. It is not a big deal, just missing a file
NetworkManager-wifi, find the rpm file in the installation image and install it, we are now ready to install Hana Express.
Install Hana Express without XSA
I followed this tutorial, https://developers.sap.com/group.hxe-install-binary.html, make sure the following things are done before your installation.
- Install Java on CentOS Linux, run the following command in terminal,
$sudo yum install java
- Install SAP compatible C++ libraries
Unfortunately, the command
yum install compat-sap-c++-6in the tutorial does not work for me, and I also found it needs both version 6 and 7. It took me a while to find the files, below are the links.
To install the package, run the following command in terminal,
$sudo rpm -i compat-sap-c++-6-6.3.1-1.el7_3.x86_64.rpm
$sudo rpm -i compat-sap-c++-7-7.2.1-2.el7_4.x86_64.rpm
Since I only have 8GB ram, I installed Hana Express without XSA, it was partially successful. HDB (Hana Database) was installed successfully, but XSC (XS Classic) was failed. After a quick search I found it was failed because I am running out of space on my root partition (More accurate term is logical volume). I need to figure out a way that I can alter the size of root partition, the following commands did the job,
$sudo lvreduce --resizefs -L -64G /dev/cl/home #Reduce home by 64GB $sudo lvextend -L +8G /dev/cl/swap #Increase swap by 8GB $sudo lvextend -L +56G /dev/cl/root #Increase root by 56GB $sudo xfs_growfs /dev/cl/root #Required for root before space can be used
Now the challenge is how to continue the XSC installation without starting it over again, I tried to search but could not find an answer, so I decide to analyze the main shell script
setup_hxe.sh and found the below part,
installServer installXSC installXSA installTelClient execOptimized
I guess installServer is the script to install HDB, so I commented out installServer and XSC was installed successfully. Below image shows that Eclipse is connected to the Hana server successfully.
http://<hxehost IP address>:8090 in browser and XS Engine is running.
To my surprise, I found that SDI/SDQ is working without install the optional SDI module.
Install XSA on top of Hana Express
After Hana database and XS classic is up and running, I am thinking I should install XS advanced, without XSA, a lot of new functions such as Web IDE, Hana Cockpit, HDI are not available. So I ordered 16GB ram from Amazon right away and it was delivered the other day, I could not wait to see how XSA looks like. I modified shell script
setup_hxe.sh again and commented out installXSC and installXSA, ran
setup_hxe.sh and the installation takes about one hour to finish.
top to check the processes that consume most memory and cpu in Linux server,
However, when I tried to open any service, e.g. xsa-cockpit, it threw an user authentication error, when I looked at the URL I noticed that the service replaced with a link generated by xsuaaserver that contains the hostname before the installation started, in my case, I left it the default hostname localhost.localdomain, I know I can modify hosts file to route an IP to a host, however, localhost is a special name, it has a loopback address 127.0.0.1 that I can’t change, so it did not work. I had to rename the hostname for XSA on the fly,
- Modify hostname in Linux server,
$sudo vi /etc/hostname # Replace local.localadmin with your own # :wq to save and quit vi
- Create a password file used by the rename system process
cd /tmp vi pwd.xml # Below is the content of pwd.xml <?xml version="1.0" encoding="UTF-8"?> <Passwords> <password><![CDATA[your_pwd]]></password> <source_password><![CDATA[your_source_pwd]]></source_password> <system_user_password><![CDATA[your_system_pwd]]></system_user_password> <sapadm_password><![CDATA[your_sapadm_pwd]]></sapadm_password> </Passwords> # :wq to save and quit vi
- Rename hostname on the fly
sudo cat ./pwd.xml | sudo /hana/shared/HXE/hdblcm/hdblcm --action=rename_system --nostart --skip_hostagent_calls -certificates_hostmap=localhost=<new_hostname> -xs_domain_name=<new_hostname> --read_password_from_stdin=xml -b
- Modify hostname in Linux server,
Another issue I had is SSL certificate error, all XSA services have been designed to be secured http connection https. Since I built this server for practice purpose, I just simply turned SSL validation off.
xs api https://<new_hostname>:39030 --skip-ssl-validation
xs apps to check apps currently running in XS and URLs to access, I noticed that URLs have been updated to my own <hostname>,
Now clicked on xsa-cockpit button on the main XSA web page, entered xsa_admin as user, XSA cockpit showed up,
Going back to XSA cockpit, add WEBIDE_DEVELOPER role to the user, however, XSA does not allow you to add role directly to users, so I created a role connection that contains WEBIDE_DEVELOPER role and then assigned to the user, finally Web IDE is working,
I have installed and configured my own Hana Express 2.0 with XSA successfully on an old laptop. To save more resources in the Linux server, I can turn off the services I do not need for now, and then turn them back on when I need them. The benefit to have my own Hana box is that I can practice a lot of administration tasks that I do not usually have access to, and I do not need to worry that I may break the system. With Hana Express 2.0, SAP has made it possible to build my own box with minimal or no extra investment. Now it is time to explore all the new features of Hana Express 2.0!