Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
craigcmehil
Community Manager
Community Manager
I've used Digital Ocean for quite awhile now to spin up servers for web projects and the like, but it was not until I was at the OSCON 2017 event in Austin, Texas the other week where SAP had a booth next to one from Digital Ocean that I realized that I had never taken the time to document the simple steps to get HXE up and running there.



Therefore I decided to put together a few steps today to document the process.

Disclaimer


SAP HANA, express edition (HXE) is officially supported on SLES and RHEL. SAP Community members have been successful in running HXE on other Linux operating systems that are not formally supported by SAP, such as Ubuntu, openSUSE and Fedora. SAP is not committing to resolving any issues that may arise from running HXE on these platforms.

From your dashboard in Digital Ocean, click on Create Droplet:



Pick an image for your Droplet. Then a region to run your Droplet.

 

The minimum requirements for HANA Express Edition, server-only are:

  • 4 CPU cores

  • 8 GB RAM

  • 100 GB Disk




Then scroll down and be sure to enter a name for the Droplet. This name will also be the name of the host and the example used in this tutorial is ubuntu-hxe-server.
The minimum requirements for HANA Express Edition with XS Advanced installation are:
- 4 CPU cores
- 24 GB RAM
- 120 GB Disk

Now create the Droplet.

Upload the HXE installation packages to your Droplet (/tmp). Upload the files hxe.tgz and hxexsa.tgz for server + applications:

To do this you can use a FTP program or from the command line you can execute
scp hxe.tgz root@207.154.xxx.xxx:/tmp

Now to prep your server. Go to the download page for the Java Runtime Environment. Accept the license agreement and download the tar.gz file:



Right-click on the file with extension .tar.gz for x64 Linux and copy the link.

Now upload this to your server with the command:
scp jre-8u131-linux-x64.tar.gz root@207.154.xxx.xxx:/tmp

Now on the server itself, create a new directory called /usr/java and copy the downloaded installation package into a new folder. The name of the installation package may be different from the example, so replace jre-8u121-linux-x64.tar.gz with the package you have just downloaded:
sudo su –
mkdir /usr/java
chmod 777 /usr/java
cp ./jre-8u121-linux-x64.tar.gz /usr/java/jre-8u121-linux-x64.tar.gz
cd /usr/java
tar -zxvf jre-8u121-linux-x64.tar.gz

This is what the console would look like:



After it finishes extracting the files, if you list the directory you will see a new folder created by the extraction process:



Set the JVM path with the following command, where /usr/java is the directory you created to extract the JRE installation package and jre1.8.0_131 refers to the directory that has just been created during extraction. Replace these references accordingly:
update-alternatives --install /usr/bin/java java /usr/java/jre1.8.0_131/bin/java 100

Now to install some additional libraries.
apt-get update
apt-get install openssl
apt-get install libpam-cracklib
apt-get install libltdl7
apt-get install libaio1
apt-get install unzip

The last one is specific for XSA.

This is a command (create an alias for chkconfig and install curl) that is not available in Ubuntu. You will download its equivalent and create an alias so it can be called by the installation script.
apt-get install sysv-rc-conf
alias chkconfig='sysv-rc-conf'

Once the upload of the installation package is finished, execute the following commands from a console. Replace the home directory accordingly if you have uploaded the files into a different location.
cd /tmp
chmod -R 777 hxe.tgz
tar -xvzf hxe.tgz

If you are also installing XS Advanced applications, execute the following commands:
chmod -R 777 hxexsa.tgz
tar -xvzf hxexsa.tgz

You will see the list of files that have been extracted. These are the files you will later use for installation.

From the command line of your Droplet you will run the following commands.
sudo ufw enable

This will enable the Firewall in Ubuntu.
sudo ufw allow ssh
sudo ufw allow 8090/tcp
sudo ufw allow 8000/tcp
sudo ufw allow 4300/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 1128:1129/tcp
sudo ufw allow 51002:51027/tcp
sudo ufw allow 30000:30100/tcp
sudo ufw allow 50000:50050/tcp

If you are installing the XS Advanced tools, you also need to add the following rules:
sudo ufw allow 38326/tcp
sudo ufw allow 39228/tcp
sudo ufw allow 49000:49100/tcp
sudo ufw allow 55752/tcp
sudo ufw allow 53001:53100/tcp
sudo ufw allow 51000:51100/tcp
sudo ufw allow 55742/tcp

You can confirm all the rules have been processed using command
sudo ufw status

This step applies ONLY if you are installing the XS Advanced tools.

Before you launch the installation, you need to perform a minor modification on the script register_cockpit.sh which is executed at the end of the XS Advanced installation. This script has been extracted from the XS Advanced .tar.gz into a directory called HANA_EXPRESS_20.

Open the file for edition with the following command. Adjust accordingly with your username or if you extracted the installation files into a different directory:
 nano /tmp/HANA_EXPRESS_20/register_cockpit.sh

Look for a line containing variable local_hostname=hostname -f and replace it with hostname, i.e., remove the -f from this line.

Now just in case, you could end up with a Python error during install to work around that just run the following commands.
export PYTHONHOME=/usr/local/lib/python3.5/
export PYTHONPATH=/usr/local/lib/python3.5/

You have finally got to the most important and exciting part! Go into your home directory or wherever you have extracted the installation files into.
IMPORTANT: As this process should not be interrupted, use a separate SSH client that handles connection intermittence, instead of the web client.

sudo su –
cd /tmp
./setup_hxe.sh

The script will prompt for different parameters:

  • Installer root directory


This is the directory where the files have been extracted, plus HANA_EXPRESS_20, for example /tmp/HANA_EXPRESS_20.

Paste this value and press Enter.

  • Components you want to install
    Choose all to include XS Advanced tools (provided you have uploaded them) or server for the server-only installation:

  • In this example, ubuntu-hxe-server:

  • System ID:
    The system ID you want to use. As you will probably use the tutorials on the many things you can do in HANA Express Edition, you may want to use HXE as proposed:

  • Enter Instance Number:
    The firewall rules have been created for instance 00, so please update them accordingly if you choose a different instance number. Also, bear this in mind as the usual instance number used in tutorials is also 00.

  • Master Password:
    This will be the password for administrator users such as SYSTEM or ADM. You will definitely need to remember this password.


If you are installing the Applications package, this password is also used for the XSA_ADMIN, XSA_DEV, and XSA_SHINE users.

Hit Enter.

Review the Installation summary and hit Y.

After you hit Enter the script will verbosely inform what it is doing. Avoid disconnecting the terminal or interrupting the execution.

Wait until the command prompt in the console is available for input again.

You can also check the log by running command ls -ltr in the directory
/var/tmp and open the latest installation log file using commands such as more <name of the file> or cat <name of the file>.

Finally, the command-line Lifecycle Management program can check the installation for you: /hana/shared/HXE/hdblcm/hdblcm.
Hint: You can start the database again with command ./HDB start and check if the services are running with ./HDB info

Remember: SAP HANA Express Edition license is free up to 32 GB of RAM.

Remember to set you hosts file in your local computer with the pair «external IP» «host name». You will generally fins these files in folders /etc/hosts or in C:\Windows\System32\drivers\etc, and the configuration would look like the following example:
207.154.xxx.xxx	ubuntu-hxe-server

Where the 207.154.XXX.XXX stands for the external IP and the ubuntu-hxe-server value stands for the name of the host that you have set up in the server.

The whole process is honestly quite simple and takes quite a bit less than the 60 minutes total that the tutorials indicate. In fact I threw up another instance today just to document the steps. It's also very similar to the steps documented by Lucia.

Not really a whole lot of reasons not to actually give HXE a go is there?
4 Comments