Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
lina_z
Explorer

Intro


SAP offers a fantastically powerful free ABAP application server for anyone interested in learning about Netweaver systems. However, the installation process can be notoriously challenging and littered with pitfalls, particularly if you are someone like me who went into the endeavour with very limited experience of VMs, Linux, or administrating SAP systems. It took me a very long day and a half of concerted effort to become the proud parent of an ABAP system, and I am writing this blog today to consolidate everything I learned into one guide so that your own installation journey could be easier than mine.

Key Sources


I will begin by sharing a few blogs and guides which I found critical in my installation journey, which I will refer to throughout this post.

Source (A) - Concise Guide to install SAP NetWeaver Developer Edition on Ubuntu VM

Source (B) - Adjusting installer script for SAP NetWeaver Dev Edition for distros with kernel version 5.4 or high...

Source (C) - AS ABAP 7.52 SP04, Developer Edition: Concise Installation Guide

Source (D) - Complete Installation Guide: 752 VMWare

Source (E) - Installing SAP NetWeaver AS ABAP Developer Edition 7.52 (Trial) on Google Cloud Platform **

 

**Note, I am including this source as it is a useful reference for installing NetWeaver on the cloud. Personally, I used Azure rather than Google Cloud Platform so the actual steps are a bit different, however a lot of the concepts (such as firewall rules required) are similar and depending on your choice of hosting platform you may find it a useful read.

Step 0 - Get the source files


You can download the files from the SAP Trials and Downloads page. I have gone for SAP NetWeaver AS ABAP Developer Edition 7.52 SP04 and all advice in this guide pertains to this version.

You need to download all of the rar files, currently consisting of 11 SAP ABAP AS parts and 1 License file. You do not need to unrar these anywhere for now.

Step 1 - Where do I put my SAP System?


The first thing you will note (and possibly balk at) are the hardware requirements to run your developer system:

  • Required: At least 4 GB RAM plus about 8 GB swap space

  • Recommended: At least 8 GB RAM plus about 8 GB swap space

  • About 100 GB free disk space for server installation

  • About 2 GB free disk space for client installation


You will want this running on its own VM so it does not get into a fight with any other systems.

You have two options:

  • Create a VM locally using VMware, VirtualBox or similar

  • Provision a VM on a cloud provider


I tried the former initially, and my poor laptop crashed every time I tried to even launch the VM. Therefore, I ended up opting for the latter, creating a free trial account on Azure and using some of my free $200 of credits spinning up a Virtual Machine.

I opted for a Standard B2as v2 which has 8GB RAM, 2 vCores, and 128GB disk space, but you can chose any option as long as it meets the requirements mentioned above. I wanted slightly more power for installation, though I will now need to figure out how to resize this to a smaller (cheaper) option once my 30 days of free credits run out.

Important Notes / Traps to be wary of:

  • Use a compatible Linux distro. On my second attempt, I used Ubuntu 20.04 which worked successfully. From my first attempt, I can tell you you should NOT use SUSE, despite what the 'Complete' installation guide (source D) mentions - per the notes in source B, there are known compatibility issues with current versions of openSUSE.

  • Name your host vhcalnplci. This avoids pointless errors later on, and if you wanted a more creative name you can always give your system a lovely description in the SAP GUI once its up and running.

  • Ensure you are using a static IP and not DHCP. This will also avoid pointless errors.

  • Language should be English - en_US.UTF-8

  • If you are using a cloud provider, enable ports 4000,8000,44300,3300,3200,8443 as mentioned in source so that your SAP GUI will be able to connect. Ensure SSH connection is also maintained.


 

Step 2 - Sort out Linux


Once your VM is provisioned, you will need to ssh into it. You will do this by opening up Powershell (or your terminal of choice) and running the following:
ssh -o TCPKeepAlive=true -i C:\[PATH TO WHEREVER YOUR PRIVATE KEY IS]

Ensure you do include the TCPKeepAlive option to prevent your terminal from timing out if you leave it unattended to make a cup of tea and/or cry about how bad you are at Linux.

From here, you will navigate using terminal commands. If (like me) you've never earnestly had to operate a system from the terminal before, you may find it helpful to understand the following few commands:

  • sudo - This runs the command as root (basically, with superuser permissions). Use this whenever your terminal gives you authorisation errors, as you are basically telling your system "I made you, now shut up and do as you're told". The natural consequence of this is it will do exactly what you tell it, up to and including completely breaking everything.

  • ufw status, ufw disable - Check the status of or disable your firewall

  • cd - Change Directory. Use this to navigate between different folders

  • mkdir - Create a folder

  • ls - List out what is in the current folder

  • rm - Remove (delete) an object

  • mv - Move or rename an object. Think of renaming something as moving the contents of the file into an empty one with a different name.

  • cp - Copy an object to another file or location

  • ip addr show - Display your system's IP addresses

  • nano or vi - These are both terminal text editors, and typing one of them followed by a file name will open the file for editing. If you are using nano, from there you can just follow the hints on the screen. If you opened vi, open up google in your browser of choice to figure out what additional commands you need to know or hit ESC -> :q -> Enter if you are ready to give up and use nano.

  • unrar x  - Extract files from an archive

  • apt update, apt upgrade, apt search, apt install - Using APT package manager, search for and install packages or run updates

  • systemctl start, systemctl stop, systemctl status - Start, stop, or get the status of a named system service respectively

  • chmod +x - modify a file to become executable

  • ./ [file name] - Look in the current directory and execute [file name]

  • sudo reboot now - Restart Ubuntu


 

First off, look for and run updates:
sudo apt update
sudo apt upgrade

Disable your firewall:
sudo ufw disable

Install some required packages to ensure you don't face issues later on:
sudo apt install csh
sudo apt install tcsh
sudo apt install libaio1
sudo apt install uuid

 

That last one is very critical, as it provides the service which can generate unique ids for SAP. It does not start automatically, so you will need to start the uuid daemon manually:
sudo systemctl start uuidd

NOTE: You will need to start it manually after every reboot. You can always double check if it is running by doing:
systemctl status uuidd

 

Next you will need to map your internal IPv4 address to your hostname.

You can check that by running:
ip addr show

In the section starting with "etho0:", it will be the address immediately following "inet" up to but not including the /.

If your machine is on Azure it will simply be the Private IP (screenshot below, Public IP blurred so that the imaginary infosec team looking after my lovely SAP system do not get upset):

 


We need to map this IP address to your host name so that your SAP system knows how to find itself. You can guide it to inner peace by adding the following line to your file:
<internal IP> vhcalnplci vhcalnplci.dummy.nodomain

If there are any other lines mapping some IP to vhcalnplci, comment them out. If you have issues, source suggests adding the instance name multiple times, though this was not required for me. Please refer to that source for more details if needed.

Since we've just finished installing a bunch of stuff, it is a good point in time to restart to ensure your installation runs cleanly:
sudo reboot now 

P.S. Don't forget to start uuidd service again after the reboot is complete

Step 3 - Can I start installing stuff yet?


Yes. Almost.

We need to upload those rar files you downloaded onto your Ubuntu box. First, from your default user directory in Ubuntu, create some folders for your installation to live in as mentioned in source D:
mkdir abaptrial
mkdir ABAP

Then, the easiest way to upload them will be via winSCP. You can download winSCP here.

This thread describes how you can then establish an ssh remote connection using winSCP and your private key.

Now that you are in, you will be able to browse your Ubuntu box using the graphical interface and upload files. Drag all 12 files you downloaded (including the license) into the directory you created.

Uploading these may take a while - they are quite hefty files and it took ca. 45 mins for me, but this could easily be longer depending on your internet connection.

While these are uploading, we can use the time to sort out our installer script as mentioned in source B. The script provided by SAP conveniently no longer works, so we will apply some modifications to ensure it can execute properly. Grab the install.sh file from the "Part 1" rar file, and open it in your code editor of choice. Source B has a very interesting write up of what the changes are and why they are needed, but it boils down to you needing to replace the following snippet:
    ./saphostexec -install || do_exit $ERR_install_saphost

# TODO: is it ok to remove /tmp/hostctrl?
cd /
rm -rf /tmp/hostctrl || log_echo "Failed to clean up temporary directory"

 

with the following code:
#FIX TAKEN FROM https://blogs.sap.com/2021/06/07/adjusting-installer-script-for-sap-netweaver-dev-edition-for-distro...

#Replace this line with one which tries to continue (this) main script using ‘&’:
#./saphostexec -install || do_exit $ERR_install_saphost
./saphostexec -install &

#Wait for a while so that hopefully the asynchronous call ends:
log_echo "Waiting 30 seconds for asynchronous call to /tmp/hostctrl/saphostexec -install to complete..."
sleep 30
log_echo "30 seconds are up, continuing the main script."

# TODO: is it ok to remove /tmp/hostctrl?
cd /
#Let's not remove the temporary directory, in case saphostexec command
#is still executing. So commenting out:
# rm -rf /tmp/hostctrl || log_echo "Failed to clean up temporary directory"

# Now we modify the RUN_NPL executable (executable permissions are for sybnpl user):
FILENPL=/sybase/NPL/ASE-16_0/install/RUN_NPL
if test -f "$FILENPL"; then
echo "$FILENPL exists. Adding the -T11889 option to config in that file:"
sed -i 's/NPL.cfg \\/NPL.cfg -T11889 \\/g' /sybase/NPL/ASE-16_0/install/RUN_NPL
cat $FILENPL
echo "-T11889 config option added"
sleep 15
else
echo "$FILENPL does not exist. Not modifying what doesn't exist, ontologically seems ok."
fi

#ENDFIX

 

Save a copy of this script, and drop it into the same directory you put your other rars. To indicate it is a custom object, I named mine zinstall.sh.

Once all your files have finished uploading, you need to unzip the first file only.

I did this by executing following command:
unrar x TD752SP04part01.rar

This one command actually takes care of unzipping all of your rar files and putting all the contents where they need to go.

Now, the moment has finally come when you are ready to run the installation. Start by making your custom script executable:
chmod +x zinstall.sh

Give yourself superuser:
sudo -i

And off we go:
./zinstall.sh

 

It will first give you a legal blurb. Scroll through it with your space bar, taking notes of all the ways you will get sued if you misuse your shiny new system, and click Q to close it once you reach the end.

It will ask you if you agree to the T&Cs. Type in yes to proceed.

It will then ask you to type in a password. It will look like it is not responding since it hides the password text, but I promise it is registering what you are typing. Hit enter once you've typed your password, and repeat the same when prompted.

From here, it will start showing you loads of messages as it works on the installation. The mass of text scrolling down your terminal will make you feel like a cool hacker from a 90s film, which will be entertaining for a good 3 minutes before you feel inclined to go off and ponder important questions while it runs. Such as why you even need an ABAP system in the first place.

Step 4 - It failed 😞


################################################
Abort execution because of
Step returns modlib.jslib.caughtException
################################################

DON'T PANIC. This is expected, once.

Due to another issue, mentioned in sources B and E, the license file that comes by default is out of date and needs replacing. We could not pre-empt this error because the file needs to be placed in a directory which the installer gets to create for us before failing.

First, unrar the license downloaded:
unrar x License.rar

Take note of the readme file which appears and gives remarkably clear instructions. It advises to copy your file to /sybase/NPL/SYSAM-2_0/licenses and rename it to SYBASE_ASE_TD.lic.

To do this, execute the following:
cp SYBASE_ASE_TestDrive.lic /sybase/NPL/SYSAM-2_0/licenses
mv SYBASE_ASE_TestDrive.lic SYBASE_ASE_TD.lic

Navigate to the mentioned sybase directory and check that the file is the only thing in there. I noticed something called 'empty' - I am not sure what it was, but I removed it just in case.

After this, kick off the installation again:
./zinstall.sh

Step 5: Success?


From here, the installation will take a while. Possibly several hours.

However, I would recommend checking up on it once in a while, to confirm it is still writing various messages to the console. Before finding out that the execution script needed to be edited, I fell into a trap for a while to wait a very very long time without realising it was completely stuck. It should keep writing messages, or at the very least show some CPU/memory usage.

If you have done everything correctly so far, the stars are aligned, and mercury is not in retrograde, eventually you will see this sweet sweet success message:


 

As you can see, I was so excited that it finally worked I forgot that screenshots were a thing and took a picture with my phone.

If you've gotten that 'Installation of NPL successful' message, congratulations, you now have a running SAP server.

Step 6 - Wait, how do I connect to it?


Do you have a SAP GUI? You need a SAP GUI. I did not have a SAP GUI on my personal device.

You can acquire a SAP GUI from the installation that just completed on your VM. As described in source D, this resides in the folder \client\SAPGUI4Windows. Navigate there through winSCP and download the zip file. Extract this file locally, go to PRES\GUI\Windows\Win32\SetupAll.exe and run
it. This one is a handy installer wizard which seems to work with minimal faff.

Once your GUI is up and running, create a new connection as follows, using your public IP this time as the application server name:


 

Double-click your new connection and you can log in. Start with the logging in as an administrator, username SAP* and the password Down1oad. Note that is a one not an L, and you need the uppercase D.

*This is not a footnote. The asterisk is a part of the username

Step 7 - I thought I was done?


Sorry, you still need to license your product properly.

While logged in as that admin user mentioned previously, go to t-code TLICENSE. Take note of the Active Hardware Key, and go to to https://go.support.sap.com/minisap/#/minisap in order to claim your license. Select NPL — SAP NetWeaver 7.x (Sybase ASE) as the System you are licensing.

Once you've got your new license, flick back to TLICENSE and delete both existing licenses by right clicking them and selecting delete. Yes, you are getting rid of 2. Yes, you only received 1 to upload. This is normal.

Upload your new permanent license and you are finally all set! Going forward you can log on with the user Developer, or create your own user, to avoid doing everything as system admin. Or carry on using SAP*. I'm a blog not a cop.

Conclusion


You should now be the proud owner of a lovely new NPL environment. Everything is yours, so have fun playing Functional Consultant, ABAPer, and Basis Administrator all at once.

The only limit to what you can achieve is your creativity. Well, and your SAP skills. I've only gotten so far as Hello World, creating a table with some data, and making one function module to retrieve data from that table. The latter was achieved by me essentially facilitating an argument between ChatGPT and my NPL system about what constitutes executable ABAP.

 

 
Labels in this area