Chapter 3. Installing SAP application server instances
3.1. Configuring the IPs for the virtual instance hostnames Copy linkLink copied to clipboard!
Virtual IPs for the virtual instance hostnames are mandatory for highly available SAP application server setups. You must configure the virtual IP per instance in a non-persistent way to make it available at instance installation time. Ensure that the IP configuration is only temporary, because the cluster manages the same addresses as part of the instance resource groups.
Prerequisites
- You have reserved IP addresses for the virtual hostname of each instance that you plan to configure in the cluster.
Procedure
Temporarily configure each IP on its initial target node, for example, add the IP for the ASCS instance on node1 and add the IP for the ERS instance on node2:
[root]# ip address add <ip>/<netmask> dev <nic>-
Replace
<ip>with the virtual IP of the instance, for example,192.18.200.101. -
Replace
<netmask>with the netmask of the subnet, for example,32. -
Replace
<nic>with the network device name on which the IP should run, for example,eth0.
-
Replace
Verification
Check on each node that the virtual IP is up, for example:
[root]# ip address show dev eth0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP group default qlen 1000 … inet 192.168.200.101/32 scope global eth0 …
3.2. Configuring the virtual instance hostnames Copy linkLink copied to clipboard!
In an SAP environment you must configure virtual hostnames for the instances that you make highly available. See Using Virtual Host Names in the SAP documentation.
Prerequisites
- You have reserved IP addresses for the virtual hostname of each instance that you plan to configure in the cluster.
Procedure
Add the virtual hostnames of the instances to all cluster nodes:
[root]# cat /etc/hosts ... 192.168.200.101 s4hascs.example.com s4hascs 192.168.200.102 s4hers.example.com s4hersAlso add the PAS or AAS virtual hostnames if you configure the application server instances on the same systems.
Verification
Check that you can ping the virtual hosts, when you have also configured the virtual IPs. This step is optional and an example only for a basic verification. The system resolves entries in
/etc/hostswhen you use thepingcommand:[root]# ping s4hascs PING s4hascs.example.com (192.168.200.101) 56(84) bytes of data. 64 bytes from s4hascs.example.com (192.168.200.101): icmp_seq=1 ttl=64 time=0.017 ms …
3.4. Creating the SAP administrative user and group Copy linkLink copied to clipboard!
In a high-availability environment where the application can move between different systems, you must configure the application user and groups with identical numerical values for their user ID (UID) and group ID (GID). Different IDs for the same application users or groups cause access conflicts and prevent you from switching the application between the cluster nodes.
Prepare the following operating system group:
-
sapsys
Prepare the following operating system users:
-
sapadm -
<sid>adm, using your target SID
Prerequisites
- You have reserved identical user and group IDs for the required groups and users, for example, in your central identity management system for application users.
Procedure
Create the
sapsysgroup. Use the prepared group ID, for example, ID10001:[root]# groupadd -g 10001 sapsysCreate the
sapadmuser as a member of thesapsysgroup. The user does not need a login shell. Use the prepared user ID, for example, ID10200:[root]# useradd -u 10200 -g sapsys sapadm \ -c 'SAP Local Administrator' -s /sbin/nologinCreate the
<sid>admuser as a member of thesapsysgroup. Use the prepared user ID, for example, ID10201for users4hadm:[root]# useradd -u 10201 -g sapsys s4hadm \ -c 'SAP System Administrator' -s /bin/shAs the user shell, we recommend that you either use
/bin/shor/bin/csh. SAP installations provide user profiles and useful shell aliases in these shells.- Repeat the steps on all nodes.
Verification
Check that the users
sapadmand<sid>admexist and have the correct groups and IDs configured, for example:[root]# id sapadm s4hadm uid=10200(sapadm) gid=10001(sapsys) groups=10001(sapsys) uid=10201(s4hadm) gid=10001(sapsys) groups=10001(sapsys)Check that the users have the correct description, home directory and shell defined:
[root]# grep -E 'sapadm|s4hadm' /etc/passwd sapadm:x:10200:10001:SAP Local Administrator:/home/sapadm:/sbin/nologin s4hadm:x:10201:10001:SAP System Administrator:/home/s4hadm:/bin/sh- Repeat the check on all nodes and verify that the names and IDs are identical.
3.5. Installing the ASCS instance Copy linkLink copied to clipboard!
Install the SAP application server instance according to the SAP documentation. See Running Software Provisioning Manager for more details about the SAP software installation.
Prerequisites
- You have installed and configured the HA cluster nodes according to the recommendations from SAP and Red Hat for running SAP application server instances on RHEL 9. See Operating system requirements.
- You have configured the virtual IP address for the ASCS instance on node1.
You have mounted the following filesystems on the HA cluster node where you install the ASCS instance, for example, node1:
-
/sapmnt -
/usr/sap/trans -
/usr/sap/<SID>
-
-
The virtual hostname for the ASCS instance resolves to the reserved virtual IP of the ASCS instance on all nodes. You have tested with the command
getent hosts <virtual_hostname>, for example,getent hosts s4hascs, and it must return the correct IP address. - You have the installation media available on the system.
Procedure
On the node where you install the ASCS instance, go to the directory where you have extracted the installation media:
[root]# cd <software_path>-
Replace
<software_path>with the path to your unpacked media, for example, /sapmedia/SWPM20_SP19/.
-
Replace
Run the installer command and specify the virtual hostname of your ASCS instance, for example,
s4hascs:[root]# ./sapinst SAPINST_USE_HOSTNAME=s4hascs- Open the web installer UI using the link provided in the terminal.
- Open the SAP product you want to install and enter the installation option. Expand the High-Availability System option and select ASCS Instance for the installation of the ASCS instance. Click Next.
Provide the requested installation information on each page and click Next to move forward.
Some steps, like extracting SAP packages, can take a while. Keep an eye on the terminal in which you started the installer for details of the ongoing process that are not displayed in the web UI.
Verification
Switch to the
<sid>admuser:[root]# su - s4hadmCheck the instance status. Ensure that the service status is
GREENfor all service components:s4hadm $ sapcontrol -nr 20 -function GetProcessListThe following example shows a minimal setup with ENSA1:
name, description, dispstatus, textstatus, starttime, elapsedtime, pid msg_server, MessageServer, GREEN, Running, YYYY MM DD 15:34:05, 0:05:38, 45041 enserver, EnqueueServer, GREEN, Running, YYYY MM DD 15:34:05, 0:05:38, 45042The following example shows a minimal setup with ENSA2:
name, description, dispstatus, textstatus, starttime, elapsedtime, pid msg_server, MessageServer, GREEN, Running, YYYY MM DD 15:43:49, 0:01:51, 5460 enq_server, Enqueue Server 2, GREEN, Running, YYYY MM DD 15:43:49, 0:01:51, 5461
3.6. Installing the ERS instance Copy linkLink copied to clipboard!
Install the SAP application server instance according to the SAP documentation. See Running Software Provisioning Manager for more details about the SAP software installation.
Prerequisites
- You have installed and configured the ASCS instance on the first node, for example, node1.
- You have configured the virtual IP address for the ERS instance on the second node, for example, node2.
You have mounted the following filesystems on node2:
-
/sapmnt -
/usr/sap/trans -
/usr/sap/<SID>
-
-
The virtual hostname for the ERS instance resolves to the reserved virtual IP of the ERS instance on all nodes. You have tested with the command
getent hosts <virtual_hostname>, for example,getent hosts s4hers, and it must return the correct IP address. - You have the installation media available on the system.
Procedure
On the node where you install the ERS instance, go to the directory where you have extracted the installation media:
[root]# cd <software_path>-
Replace
<software_path>with the path to your unpacked media, for example,/sapmedia/SWPM20_SP19/.
-
Replace
Run the installer command and specify the virtual hostname of your ERS instance, for example,
s4hers:[root]# ./sapinst SAPINST_USE_HOSTNAME=s4hers- Open the web installer UI using the link provided in the terminal.
- Open the SAP product you want to install and enter the installation option. Expand the High-Availability System option and select ERS Instance for the installation of the ERS instance. Click Next.
Provide the requested installation information on each page and click Next to move forward.
Some steps, like extracting SAP packages, can take a while. Keep an eye on the terminal in which you started the installer for details of the ongoing process that are not displayed in the web UI.
Verification
Switch to the
<sid>admuser:[root]# su - s4hadmCheck the instance status. Ensure that the service status is
GREENfor all service components:s4hadm $ sapcontrol -nr 29 -function GetProcessListThe following example, shows a minimal setup with ENSA1:
name, description, dispstatus, textstatus, starttime, elapsedtime, pid enrepserver, EnqueueReplicator, GREEN, Running, YYYY MM DD 16:34:05, 0:00:26, 11484The following example, shows a minimal setup with ENSA2:
name, description, dispstatus, textstatus, starttime, elapsedtime, pid enq_replicator, Enqueue Replicator 2, GREEN, Running, YYYY MM DD 11:47:34, 0:33:14, 15623
3.7. Installing PAS or AAS instances Copy linkLink copied to clipboard!
You can install a Primary Application Server (PAS) or an Additional Application Server (AAS) instance on the same systems and also configure them in the same cluster as your ASCS/ERS HA setup.
Install the SAP application server instance according to the SAP documentation. See Running Software Provisioning Manager for more details about the SAP software installation.
Skip the PAS or AAS setup if you do not need it.
Prerequisites
- You have installed and configured a database instance and you can connect to the database instance from the application server system.
- You have installed and started the ASCS and ERS instances.
- You have installed the DB client on the application nodes.
- You have configured the virtual IP address for the application server instance on the installation node.
You have mounted the following filesystems on the installation node:
-
/sapmnt -
/usr/sap/trans -
/usr/sap/<SID> -
The virtual hostname for the application server instance resolves to the reserved virtual IP of the respective instance on all nodes. You have tested with the command
getent hosts <virtual_hostname>, for example,getent hosts s4hpas, and it must return the correct IP address.
-
- You have the installation media available on the system.
Procedure
On the node where you install the application server instance, go to the directory where you have extracted the installation media:
[root]# cd <software_path>-
Replace
<software_path>with the path to your unpacked media, for example,/sapmedia/SWPM20_SP19/.
-
Replace
Run the installer command and specify the virtual hostname of your application server instance, for example,
s4hpas:[root]# ./sapinst SAPINST_USE_HOSTNAME=s4hpas- Open the web installer UI using the link provided in the terminal.
- Open the SAP product you want to install and enter the installation option. Expand the High-Availability System option and select Primary Application Server Instance for the installation of the PAS instance, or select Additional Application Server Instance for the installation of an AAS instance. Click Next.
Provide the requested installation information on each page and click Next to move forward.
Some steps, like extracting SAP packages, can take a while. Keep an eye on the terminal in which you started the installer for details of the ongoing process that are not displayed in the web UI.
Verification
Switch to the
<sid>admuser:[root]# su - s4hadmCheck the instance status. Ensure that the service status is
GREENfor all service components:s4hadm $ sapcontrol -nr 21 -function GetProcessList name, description, dispstatus, textstatus, starttime, elapsedtime, pid disp+work, Dispatcher, GREEN, Running, YYYY MM DD 16:40:47, 68:02:08, 17973 igswd_mt, IGS Watchdog, GREEN, Running, YYYY MM DD 16:40:47, 68:02:08, 17974 gwrd, Gateway, GREEN, Running, YYYY MM DD 16:40:50, 68:02:05, 18326 icman, ICM, GREEN, Running, YYYY MM DD 16:40:50, 68:02:05, 18327
3.8. Verifying the SAP Host Agent installation Copy linkLink copied to clipboard!
The SAP Host Agent is typically installed as part of the application server installation. It must have the same version and meet the minimum version requirements for the intended setup.
Check that the /usr/sap/hostctrl/ path is present and that the version is the same on each cluster node:
[root]# /usr/sap/hostctrl/exe/saphostexec -version
If you configure spare cluster nodes where you do not run the software installation of an instance, you must install the SAP Host Agent separately.
Also, update the SAP Host Agent if the versions do not match between the cluster nodes.
Refer to SAP Note 1031096 - Installing Package SAPHOSTAGENT for information and instructions.
3.9. Verifying the /etc/services file Copy linkLink copied to clipboard!
The SAP software installation for application servers appends various standard ports for SAP applications to the /etc/services file on the host on which you run the installation.
Procedure
Check that all nodes have the SAP ports in the services file. For example, count the entries that contain
SAP Systemin their port description and compare the result on all nodes:[root]# grep -i "SAP System" /etc/services | wc -l 401-
Update the
/etc/servicesfile on any node that is missing entries.