Installing SAP NW AS ABAP 7.52 SP04 on Ubuntu VM on Microsoft Azure
Create an Ubuntu Server 18.04 LTS VM
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:
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...
The installation is successful when the script finishes with the following messages:
starting database NPL ...
Log file: /sybase/NPL/startdb.log
parse level 0: identified message 'Database 'master' is now online.'
parse level 1: identified message 'Database 'tempdb' is now online.'
parse level 2: identified message 'Database 'sybsystemprocs' is now online.'
parse level 3: identified message 'Recovery complete.'
Recovery Complete
startdb completed successfully
Starting Startup Agent sapstartsrv
OK
Instance Service on host vhcalnplci started
-------------------------------------------
starting SAP Instance ASCS01
Startup-Log is written to /home/npladm/startsap_ASCS01.log
-------------------------------------------
/usr/sap/NPL/ASCS01/exe/sapcontrol -prot NI_HTTP -nr 01 -function Start
Instance on host vhcalnplci started
Starting Startup Agent sapstartsrv
OK
Instance Service on host vhcalnplci started
-------------------------------------------
starting SAP Instance D00
Startup-Log is written to /home/npladm/startsap_D00.log
-------------------------------------------
/usr/sap/NPL/D00/exe/sapcontrol -prot NI_HTTP -nr 00 -function Start
Instance on host vhcalnplci started
Installation of NPL successful
Reinstall
In case, the installation failed and you want to reinstall, you need to do some clean up before executing the script again.
- Remove directory /sapmnt -
rm -rf /sapmnt
- Remove everything in /sybase -
rm -rf /sybase/*
- Remove directory /usr/sap -
rm -rf /usr/sap
- Remove all sap users i.e. sapadm, npladm, sybnpl -
sudo userdel <username>
- You may need to kill running process by such user first -
sudo kill -s 15 <process id>
- You may need to kill running process by such user first -
- Delete last lines beginning with
sap
in/etc/services
- aaa
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.
Download all certificates in the chain as Base-64 format (.cer).
Install Certificates
Go to transaction STRUST.
Click Import certificate icon.
Select the certificate that you saved and click Add to Certificate List.
Repeat the same until you imported all certificates and see them in the list. Click Save.
Install abapGit
Create the package $ABAPGIT and create the program ZABAPGIT.
Copy the source codes from GitHub and activate the program.
Execute the program and click Install abapGit repo to sync abapGit with GitHub.
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
- How to Install SAP ABAP 7.52 SP01 Ubuntu 16.04 using Hyper-V - chairat.me
- AS ABAP 752 SP04, developer edition: NOW AVAILABLE - SAP Blogs
- AS ABAP 7.52 SP04, Developer Edition: Concise Installation Guide - SAP Blogs
- Installing SAP NetWeaver Developer Edition on an Ubuntu desktop VM – the non-concise guide - SAP Blogs
- Partitioning, Formatting, and Mounting a Hard Drive in Linux Ubuntu 18.04 (2020) - medium.com
- Create an Azure Bastion host using the portal - Microsoft Docs
- Connect to a Windows virtual machine using Azure Bastion - Microsoft Docs
- Start up commands - Ask Ubuntu
Useful Commands
- List all running processes -
ps -aux
- List all processes on specific user -
ps -U tom
- Kill a process -
sudo kill -s 15 2358
(SIGTERM) orsudo kill -9 3553
(SIGKILL) - List all local users -
cut -d: -f1 /etc/passwd
- Delete a user -
sudo userdel username
- References: