Installing SAP NW AS ABAP 7.52 SP04 on Ubuntu VM on Microsoft Azure

Create an Ubuntu Server 18.04 LTS VM

image-1589179709447.png
Basic Settings

Size: Standard D2s v3 (2 vcpus, 8 GiB memory) should be enough
No need to allow any public inbound ports

Disk Settings

Add 2 data disks:

  1. Premium SSD with at least 128 GiB for SAP instance data - to be mounted at /sybase
  2. Standard HDD with at least 16 GiB for installation files - to be mounted at /media/sf_s4installer
Networking Settings

No public IP is required as we are going to use Bastion

Setup Bastion

Follow this guide to create Bastion Host in the same virtual network as your VM.

This guide also shows how to connect to your VM using Bastion.

Prepare Your Ubuntu

Update Your Ubuntu

sudo apt update && sudo apt upgrade -y
sudo reboot now

Prepare Ubuntu

Install tmux (Optional)

sudo apt-get install tmux

Set Locale

sudo vim /etc/default/locale

And replace content with the following:

LANG=en_US.UTF-8

Set Hostname

sudo vim /etc/hostname

And replace content with the hostname you wish to use e.g. vhcalnplci

Set Host file

sudo vim /etc/hosts

Add the line below. Replace IP with your VM's private IP address. (Use command ip addr show to see IP)

172.20.0.4 vhcalnplci vhcalnplci.dummy.nodomain

Check All Again

cat /etc/default/locale
cat /etc/hostname
cat /etc/hosts

Firewall

Verify local firewall. It should be inactive. If not, use command sudo ufw disable to turn off.

sudo ufw status

Restart

sudo reboot now

Init and Mount Disk

List available disks connected to this VM

sudo fdisk -l | grep "Disk /dev"

You should see your data disks by recognizing their sizes (128GB and 32GB)

Disk /dev/sda: 128 GiB, 137438953472 bytes, 268435456 sectors
Disk /dev/sdc: 16 GiB, 17179869184 bytes, 33554432 sectors
Disk /dev/sdb: 32 GiB, 34359738368 bytes, 67108864 sectors
Disk /dev/sdd: 30 GiB, 32213303296 bytes, 62916608 sectors

Partition disk (replace with your drive path)

sudo parted /dev/sdb

Use following commands to init disk

mklabel gpt
mkpart primary 0GB 32GB
quit
GNU Parted 3.2
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt                                                      
(parted) mkpart primary 0GB 32GB                                         
(parted) quit                                                             
Information: You may need to update /etc/fstab.

Format disk

sudo mkfs.ext4 /dev/sdb
mke2fs 1.44.1 (24-Mar-2018)
Found a gpt partition table in /dev/sdb
Proceed anyway? (y,N) y
Discarding device blocks: done                            
Creating filesystem with 8388608 4k blocks and 2097152 inodes
Filesystem UUID: 660c2379-d35f-41dd-861c-b788c513a88c
Superblock backups stored on blocks: 
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
4096000, 7962624

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (65536 blocks): done
Writing superblocks and filesystem accounting information: done

Repeat the same for the other disk (/dev/sda in this case).

Get the disk UUIDs we will use for mounting.

sudo fdisk -l | grep "Disk /dev"
sudo blkid | grep UUID=
Disk /dev/sda: 128 GiB, 137438953472 bytes, 268435456 sectors
Disk /dev/sdc: 16 GiB, 17179869184 bytes, 33554432 sectors
Disk /dev/sdb: 32 GiB, 34359738368 bytes, 67108864 sectors
Disk /dev/sdd: 30 GiB, 32213303296 bytes, 62916608 sectors

/dev/sda: UUID="5772387e-e620-44b2-9027-d28915b45722" TYPE="ext4"
/dev/sdc1: UUID="0256efb8-dd06-4787-8d9d-8796946738ea" TYPE="ext4" PARTUUID="dcb710c8-01"
/dev/sdb: UUID="660c2379-d35f-41dd-861c-b788c513a88c" TYPE="ext4"
/dev/sdd1: LABEL="cloudimg-rootfs" UUID="bdf328db-9606-49ba-8e44-5e1299ae56f0" TYPE="ext4" PARTUUID="179b1e79-bd71-4241-9557-8be63cbb8857"
/dev/sdd15: LABEL="UEFI" UUID="54D1-0F3A" TYPE="vfat" PARTUUID="ec4144dd-3a40-4774-bfc2-73488a3f8e39"
/dev/sdd14: PARTUUID="bddfd6d3-8ef9-40d2-8fda-0083f3e0df9b"

Mount disks

sudo mkdir /media/sf_s4installer
sudo mount UUID="660c2379-d35f-41dd-861c-b788c513a88c" /media/sf_s4installer
sudo mkdir /sybase
sudo mount UUID="5772387e-e620-44b2-9027-d28915b45722" /sybase

Verify mounts. You should see /sybase and /media/sf_s4installer mounted properly.

df
Filesystem     1K-blocks     Used Available Use% Mounted on
udev             4044560        0   4044560   0% /dev
tmpfs             812572      684    811888   1% /run
/dev/sdd1       30309264  7644532  22648348  26% /
tmpfs            4062844       24   4062820   1% /dev/shm
tmpfs               5120        0      5120   0% /run/lock
tmpfs            4062844        0   4062844   0% /sys/fs/cgroup
/dev/sdd15        106858     3668    103190   4% /boot/efi
/dev/sdc1       16447292    45084  15547020   1% /mnt
tmpfs             812568        0    812568   0% /run/user/1000
/dev/sda       131062788 33565296  90770224  27% /sybase
/dev/sdb        32765712 13318240  17753368  43% /media/sf_s4installer

Make /sybase auto-remounted at system start

sudo vim /etc/fstab

Add the following line:

UUID=5772387e-e620-44b2-9027-d28915b45722     /sybase      ext4        defaults      0       0

Install Required Components

Install csh, libaio, and uuid.

sudo apt install csh libaio1 uuid -y

Start uuid daemon.

sudo systemctl start uuidd

Verify status. It should active (green).

systemctl status uuidd

Copy Installation Files

This assumes you already downloaded installation files from SAP, unrar them and re-archived it as sap752sp04.tgz and uploaded to your Azure Storage account container.

Install AzCopy

Download binary. (Get the latest link from here)

cd /mnt
sudo wget https://azcopyvnext.azureedge.net/release20200501/azcopy_linux_amd64_10.4.3.tar.gz

Decompress

sudo tar -xvzf azcopy_linux_amd64_10.4.3.tar.gz

Move binary

sudo mv azcopy_linux_amd64_10.4.3/azcopy /usr/local/bin
sudo chmod +x /usr/local/bin/azcopy

Clean up

sudo rm -r azcopy_linux_amd64_10.4.3

Verify

which azcopy
/usr/local/bin/azcopy

Download Installation Archive

Download archive from Azure Storage container using azcopy with SAS key.

cd /mnt
sudo azcopy copy "<file_url_with_sas_token>" sap752sp04.tgz

Extract Files

sudo tar -xvzf sap752sp04.tgz -C /media/sf_s4installer

Execute Installation

Run the install script

cd /media/sf_s4installer
chmod +x install.sh
sudo ./install.sh -s

Answer `yes` and assign a password to start installation.

Grab and drink a cup of coffee. This will take a while...

If the script finishes with the message Instance on host vhcalnplci started and  Installation of NPL successful , it means installation is successful.

Check Server Statuses

sudo -i -u npladm sapcontrol -nr 00 -function GetProcessList

You should see everything in GREEN like below then everything is ready.

GetProcessList
OK
name, description, dispstatus, textstatus, starttime, elapsedtime, pid
disp+work, Dispatcher, GREEN, Running, 2020 05 11 10:13:59, 0:48:15, 57594
igswd_mt, IGS Watchdog, GREEN, Running, 2020 05 11 10:13:59, 0:48:15, 57595
gwrd, Gateway, GREEN, Running, 2020 05 11 10:14:00, 0:48:14, 57614
icman, ICM, GREEN, Running, 2020 05 11 10:14:00, 0:48:14, 57615

Start the Server

sudo -i -u npladm startsap ALL

Stop the Server

sudo -i -u npladm stopsap ALL

Auto-start at System Start

By default, the SAP servers are not started when you start the VM. To make them started automatically, follow steps below.

sudo vim /etc/rc.local

Input the following content

#!/bin/sh
sudo -i -u npladm startsap ALL

Make it executable

sudo chmod +x /etc/rc.local

Try to stop and start the VM and check if the SAP servers have been started properly.

Install License

Follow Post-Installation Steps in this guide to register a new license key file.

Install abapGit

Before you can push/pull codes from Git repositories like GitHub. You need to install server's certificates on SAP server trust store.

Download Certificates

Go to GitHub and view site's certificates.

image-1589352726532.png

Download all certificates in the chain as Base-64 format (.cer).

image-1589352752070.png

Install Certificates

Go to transaction STRUST.

Click Import certificate icon.

image-1589352953623.png

Select the certificate that you saved and click Add to Certificate List.

image-1589353018238.png

Repeat the same until you imported all certificates and see them in the list. Click Save.

image-1589353126309.png

 

Install abapGit

Create the package $ABAPGIT and create the program ZABAPGIT.

Copy the source codes from GitHub and activate the program.

image-1589352267449.png

Execute the program and click Install abapGit repo to sync abapGit with GitHub.

image-1589353308978.png

Click Continue and follow until finish.

You may choose NOT to override ZABAPGIT program first. Once you import everything else then you Pull the repo again and choose to override. This make the import/upgrade goes smoother.

Don't forget to restart the program to recompile after the import/update.

References

Useful Commands