Complete the following steps to install the ASCS10 and ERS20 instances on node-a and node-b.
Prepare for Installation
- On node-a and node-b, increase the available swap space to greater than 1MiB to satisfy the SAP system requirements. In this example we will create a 1GiB swap file to increase the available swap space.
# mkdir /swap # dd if=/dev/zero of=/swap/swapfile.img bs=1024 count=1M # mkswap /swap/swapfile.img # echo “/swap/swapfile.img swap swap sw 0 0” >> /etc/fstab # swapon /swap/swapfile.img
- Ensure that the tcsh package is installed on both node-a and node-b. Modify this command (e.g., to use zypper install) if installing on a SLES server.
# yum install -y tcsh
- On node-a and node-b, create a /sap-install directory which will contain the SAP installation files.
# mkdir /sap-install
- Download SAPCAR, SAP Software Provisioning Manager 2.0 (SWPM20SPxx_x-xxxx.SAR), and all necessary packages (e.g., SAPEXE_xx-xxxx.SAR, SAPHOSTAGENTxx_xx-xxxx.SAR, etc.) to the /sap-install directory on both nodes. Make sure that SAPCAR is executable.
# chmod +x /sap-install/SAPCAR
- Use SAPCAR to extract the files for SWPM 2.0.
# /sap-install/SAPCAR -xvf SWPM20SPxx_x-xxxx.SAR
Before installing the SAP instances, verify that all shared file systems described in Create SAP NFS Shared File Systems are mounted on node-a and node-b and that the LifeKeeper resources providing virtual hostname failover for the ASCS and ERS instances are in-service on node-a and node-b, respectively.
Install the ASCS Instance
Complete the following steps to install the ASCS10 instance on node-a.
- If installing from a remote system, add a firewall rule to allow inbound traffic on TCP port 4237 (the port which exposes the sapinst graphical interface) on node-a.
- Execute the following command on node-a to initiate sapinst with the virtual hostname associated to the ASCS instance:
[root@node-a ~]# /sap-install/sapinst SAPINST_USE_HOSTNAME=sps-ascs
- To access the sapinst graphical interface, use a web browser to navigate to https://<node-a Public IP>:4237/sapinst/docs/index.html.
- Select Software Provisioning Manager 2.0 SP XX → SAP S/4HANA Server 1909 → SAP HANA Database → Installation → Application Server ABAP → High-Availability System → ASCS Instance and click Next.
- Provide the following parameters when installing the ASCS instance. The icon indicates that the default option is chosen.
SAP System ID (SAPSID) | SPS |
SAP Mount Directory | /sapmnt |
Password for All Users | <SAP User Password> |
Password of SAP System Administrator | <SAP Admin Password> |
User ID | Leave empty |
Group ID of sapsys | Leave empty |
Specify path to SAPEXE.SAR | /sap-install |
Specify path to SAPHOSTAGENT.SAR | /sap-install |
ASCS Instance Number | 10 |
ASCS Instance Host Name | sps-ascs |
ABAP Message Server Port | 3610 |
Internal ABAP Message Server Port | 3910 |
Yes, clean up operating system users | Click |
- Review the parameters and proceed with the installation.
- Execute the following command on node-a to clean up SAP installation files:
[root@node-a ~]# rm -rf /root/.sapinst
Modify SAP File System Permissions
Execute the following commands on node-a to set the correct permissions on the SAP file systems:
[root@node-a ~]# chown -R spsadm /sapnfs/usr/sap/SPS /sapmnt/SPS /usr/sap/SPS [root@node-a ~]# chgrp -R sapsys /sapnfs /sapmnt /usr/sap
Install the ERS Instance
Complete the following steps to install the ERS20 instance on node-b.
- If installing from a remote system, add a firewall rule to allow inbound traffic on TCP port 4237 (the port which exposes the sapinst graphical interface) on node-b.
- Execute the following command on node-b to initiate sapinst with the virtual hostname associated to the ERS instance:
[root@node-b ~]# /sap-install/sapinst SAPINST_USE_HOSTNAME=sps-ers
- To access the sapinst graphical interface, use a web browser to navigate to https://<node-b Public IP>:4237/sapinst/docs/index.html.
- Select Software Provisioning Manager 2.0 SP XX → SAP S/4HANA Server 1909 → SAP HANA Database → Installation → Application Server ABAP → High-Availability System → ERS Instance and click Next.
- Provide the following parameters when installing the ERS instance. The icon indicates that the default option is chosen.
Profile Directory | /sapmnt/SPS/profile |
Password of SAP System Administrator (spsadm) | <spsadm User Password> |
Specify path to SAPHOSTAGENT.SAR | /sap-install |
Password of SAP System Administrator (sapadm) | <spsadm User Password> |
User ID | Leave empty |
Group ID of sapsys | Use default value |
Name of the ASCS Instance to be Replicated | ASCS10 |
Number of the ASCS Instance to be Replicated | 10 |
Number of the ERS Instance | 20 |
ERS Instance Host | sps-ers |
Yes, clean up operating system users | Click |
- Review the parameters and proceed with the installation.
- Execute the following command on node-b to clean up SAP installation files:
[root@node-b ~]# rm -rf /root/.sapinst
Modify /usr/sap/sapservices on Both Nodes
Since we only installed the ASCS10 instance on node-a and only installed the ERS20 instance on node-b, the /usr/sap/sapservices file is incomplete on each node. Modify this file on both node-a and node-b so that it contains entries for both the ASCS10 and ERS20 instances.
# vi /usr/sap/sapservices
# cat /usr/sap/sapservices
#!/bin/sh
LD_LIBRARY_PATH=/usr/sap/SPS/ASCS10/exe:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; /usr/sap/SPS/ASCS10/exe/sapstartsrv pf=/usr/sap/SPS/SYS/profile/SPS_ASCS10_sps-ascs -D -u spsadm
LD_LIBRARY_PATH=/usr/sap/SPS/ERS20/exe:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; /usr/sap/SPS/ERS20/exe/sapstartsrv pf=/usr/sap/SPS/SYS/profile/SPS_ERS20_sps-ers -D -u spsadm
Restart the ASCS Instance to Enable Enqueue Replication
Now that the ERS instance has been installed on node-b, the ASCS instance and its corresponding SAP Start Service process must be restarted on node-a in order to enable enqueue replication. Execute the following commands on node-a to restart the ASCS instance and verify that enqueue replication has been enabled.
[root@node-a ~]# su - spsadm -c “sapcontrol -nr 10 -function RestartService SPS” 15.03.2021 00:29:23 RestartService OK
[root@node-a ~]# su - spsadm -c “sapcontrol -nr 10 -function StopWait 60 2” 15.03.2021 00:29:44 Stop OK
[root@node-a ~]# su - spsadm -c “sapcontrol -nr 10 -function StartWait 60 2” 15.03.2021 00:30:07 Start OK
[root@node-a ~]# su - spsadm -c “sapcontrol -nr 10 -function EnqGetStatistic | grep replication_state” replication_state: GREEN
Modify /etc/default/LifeKeeper on Both Nodes
Add the following entries to /etc/default/LifeKeeper on both node-a and node-b:
NFS_RPC_PROTOCOL=tcp SAP_NFS_CHECK_DIRS=/sapnfs
The SAP_NFS_CHECK_DIRS entry allows LifeKeeper to check the availability of the Cloud Volume mount target exporting the cv-sapnfs NFS share before performing SAP-related operations, and the NFS_RPC_PROTOCOL entry tells LifeKeeper to use the TCP protocol when checking availability of the NFS server.
Verify Successful ASCS and ERS Installation
Execute the following commands to verify that the ASCS10 and ERS20 instances are running successfully on node-a and node-b, respectively.
[root@node-a ~]# su - spsadm -c "sapcontrol -nr 10 -function GetProcessList" 01.01.2021 00:00:00 GetProcessList OK name, description, dispstatus, textstatus, starttime, elapsedtime, pid msg_server, MessageServer, GREEN, Running, 2021 01 01 00:00:00, 0:00:00, 8420 enq_server, Enqueue Server 2, GREEN, Running, 2021 01 01 00:00:00, 0:00:00, 8428
[root@node-b ~]# su - spsadm -c "sapcontrol -nr 20 -function GetProcessList" 01.01.2021 00:00:00 GetProcessList OK name, description, dispstatus, textstatus, starttime, elapsedtime, pid enq_replicator, Enqueue Replicator 2, GREEN, Running, 2021 01 01 00:00:00, 0:00:00, 25263
Install PAS and AAS Instances
Once the database (e.g., SAP HANA) has been installed and configured for high-availability, use SWPM 2.0 to install one Primary Application Server (PAS) and one Additional Application Server (AAS) instance on two external application server nodes spread across two availability zones. As application server redundancy is provided by the existence of the AAS instance, the application server instances do not require LifeKeeper protection. Note that the previously created NFS shares containing the /sapmnt/SPS and /usr/sap/trans file systems must be mounted on both the PAS and AAS instance hosts before installation. Please consult SAP documentation for details on the installation of the PAS and AAS instances.
このトピックへフィードバック