You are on page 1of 23

Q: How to install /upgrade SAP host agent ?

A: SAP Host Agent is a tool that you can use for monitoring and control of SAP instances and non-SAP instances, operating systems, and databases.

A; This documentation has the latest version. It is valid for SAP Host Agent 7.20 Patch Level 160 and higher. For information about how to check the version of an existing SAP Host Agent installation, see SAP Host Agent Reference - Command Line Options of the saphostexec Executable.

Q: How to install /upgrade SAP host agent ? A: SAP Host Agent is a toolSAP Host Agent Reference - Command Line Options of the saphostexec Executable . See SAP Note 1907566 a bout how to update older versions of this documentation within your local SAP Library installations. SAP Host Agent Usage SAP Host Agent is installed automatically during the installation of new SAP instances with SAP kernel 7.20 or higher. SAP Host Agent is upgraded automatically as part of the SAP instance, when you patch or upgrade the SAP kernel. However, you can also install and upgrade SAP Host Agent independently from an SAP instance. You only need to install SAP Host Agent separately in the following cases: ∑ There is no SAP system or instance on the host. ∑ The SAP system or instance running on the host has a kernel release lower than SAP kernel 7.20 and the host does not yet have an SAP Host Agent. ∑ You have upgraded your SAP system to a release with a kernel release lower than SAP kernel 7.20 and the host of the upgraded system or instance does not yet have an SAP Host Agent. Features SAP Host Agent provides you with the following features: ∑ SAP instance discovery and inventory ∑ SAP instance control ∑ Database monitoring and management ∑ System or instance provisioning: o Hosting the infrastructure of SAP NetWeaver Landscape Virtualization Management (LVM), formerly known as SAP NetWeaver Adaptive Computing Controller (ACC) ∑ Hosting software lifecycle (SL) tools interfaces Operating system monitoring: o o Using saposcol " id="pdf-obj-0-13" src="pdf-obj-0-13.jpg">

about how to update older versions of this documentation within

your local SAP Library installations.

SAP Host Agent Usage

SAP Host Agent is installed automatically during the installation of new SAP instances with SAP kernel 7.20 or higher. SAP Host Agent is upgraded automatically as part of the SAP instance, when you patch or upgrade the SAP kernel. However, you can also install and upgrade SAP Host Agent independently from an SAP instance.

You only need to install SAP Host Agent separately in the following cases:

There is no SAP system or instance on the host.

The SAP system or instance running on the host has a kernel release lower than SAP kernel 7.20 and the host does not yet have an SAP Host Agent.

You have upgraded your SAP system to a release with a kernel release lower than SAP kernel 7.20 and the host of the upgraded system or instance does not yet have an SAP Host Agent.

Features

SAP Host Agent provides you with the following features:

SAP instance discovery and inventory

SAP instance control

Database monitoring and management

System or instance provisioning:

o

Hosting the infrastructure of SAP NetWeaver Landscape Virtualization Management (LVM), formerly known as SAP NetWeaver Adaptive Computing Controller (ACC)

Hosting software lifecycle (SL) tools interfaces Operating system monitoring:

o

o

Using saposcol

Using Common Information Model (CIM) based infrastructures IBM i-specific features:

o

o

Dynamically adopted authorization for SAP kernel 7.20 and higher

o

SAP ILE daemon (SAPILED)

o

SAP Database Performance Collector for IBM i

Downloading the SAPHOSTAGENT Archive

The SAPHOSTAGENT<SP-version>.SAR archive contains all of the required elements for centrally monitoring any host. It is available for all operating system platforms supported by SAP.

Context

It is automatically installed during the installation of SAP systems or instances with SAP kernel 7.20 or higher. You only need to download SAPHOSTAGENT<SP-version>.SAR separately in the following cases:

You want to install or upgrade SAP Host Agent on a host without an SAP system,

instance, or component. You want to install or upgrade SAP Host Agent on a host with SAP systems, instances, or components with SAP kernel version lower than 7.20.

Procedure

∑ Using Common Information Model (CIM) based infrastructures IBM i-specific features: o o Dynamically adopted authorizationhttp://service.sap.com/swdc . 2. Log on with your SAP Service Marketplace ID. 3. In the navigation bar, choose SAP Software Download Center Support Packages and Patches Browse our Download Catalog SAP Technology Components SAP HOST AGENT SAP HOST AGENT 7.20 <operating system> . 4. Select the appropriate SAPHOSTAGENT<SP-version>.SAR archive from the Download tab. 5.  Make sure that the SAPCAR tool is available on the host where you want to install SAP Host Agent. 6. You need the SAPCAR tool in order to be able to decompress the SAPHOSTAGENT<SP-version>.SAR archive. For more information about SAPCAR and how to get it, see SAP Note 212876 . SAP Host Agent Installation " id="pdf-obj-1-53" src="pdf-obj-1-53.jpg">
  • 2. Log on with your SAP Service Marketplace ID.

  • 3. In the navigation bar, choose

∑ Using Common Information Model (CIM) based infrastructures IBM i-specific features: o o Dynamically adopted authorizationhttp://service.sap.com/swdc . 2. Log on with your SAP Service Marketplace ID. 3. In the navigation bar, choose SAP Software Download Center Support Packages and Patches Browse our Download Catalog SAP Technology Components SAP HOST AGENT SAP HOST AGENT 7.20 <operating system> . 4. Select the appropriate SAPHOSTAGENT<SP-version>.SAR archive from the Download tab. 5.  Make sure that the SAPCAR tool is available on the host where you want to install SAP Host Agent. 6. You need the SAPCAR tool in order to be able to decompress the SAPHOSTAGENT<SP-version>.SAR archive. For more information about SAPCAR and how to get it, see SAP Note 212876 . SAP Host Agent Installation " id="pdf-obj-1-59" src="pdf-obj-1-59.jpg">

SAP Software Download Center

∑ Using Common Information Model (CIM) based infrastructures IBM i-specific features: o o Dynamically adopted authorizationhttp://service.sap.com/swdc . 2. Log on with your SAP Service Marketplace ID. 3. In the navigation bar, choose SAP Software Download Center Support Packages and Patches Browse our Download Catalog SAP Technology Components SAP HOST AGENT SAP HOST AGENT 7.20 <operating system> . 4. Select the appropriate SAPHOSTAGENT<SP-version>.SAR archive from the Download tab. 5.  Make sure that the SAPCAR tool is available on the host where you want to install SAP Host Agent. 6. You need the SAPCAR tool in order to be able to decompress the SAPHOSTAGENT<SP-version>.SAR archive. For more information about SAPCAR and how to get it, see SAP Note 212876 . SAP Host Agent Installation " id="pdf-obj-1-63" src="pdf-obj-1-63.jpg">

Support Packages

and Patches

Browse our Download Catalog
Browse our Download Catalog

Browse our Download Catalog

SAP Technology Components

and Patches Browse our Download Catalog SAP Technology Components SAP

SAP

HOST AGENT

SAP HOST AGENT 7.20

<operating system>

.
.
  • 4. Select the appropriate SAPHOSTAGENT<SP-version>.SAR archive from the Download tab.

  • 5.  Make sure that the SAPCAR tool is available on the host where you want to install SAP Host Agent.

  • 6. You need the SAPCAR tool in order to be able to decompress the SAPHOSTAGENT<SP-version>.SAR archive. For more information about SAPCAR and how to get it, see SAP Note 212876

.
.

SAP Host Agent Installation

In many cases SAP Host Agent is installed automatically. However, there are certain cases when you have to install it manually.

SAP Host Agent is installed automatically during the installation of all new SAP system instances or instances with SAP kernel 7.20 or higher.

You only need to install SAP Host Agent separately in the following cases:

There is no SAP system or instance on the host.

The SAP system or instance running on the host has a kernel release lower than SAP kernel 7.20 and the host does not yet have an SAP Host Agent.

You have upgraded your SAP system to a release with a kernel release lower than SAP kernel 7.20 and the host of the upgraded system or instance does not yet have an SAP Host Agent.

The general strategy in high availability (HA) environments is to install the SAP Host Agent locally on each cluster node.

The following sections describe how you can install SAP Host Agent separately:

Installing SAP Host Agent Manually

You can install SAP Host Agent manually by executing the saphostexec executable with option -install from the extracted SAPHOSTAGENT<SP-version>.SAR archive.

Prerequisites

Windows only:You have installed the specified Microsoft security patch in

accordance with the instructions in SAP Note 1375494

accordance with the instructions in <a href=SAP Note 1375494 " id="pdf-obj-2-64" src="pdf-obj-2-64.jpg">

. You also need to install

the latest version of the Microsoft Runtime used by SAP as described in SAP Note

<a href=684106 . IBM i only: Option 33 of the operating system must be installed. Use menu GO LICPGM to check whether the option is installed and install it if required. " id="pdf-obj-2-77" src="pdf-obj-2-77.jpg">

684106 . IBM i only: Option 33 of the operating system must be installed. Use menu GO LICPGM to check whether the option is installed and install it if required.

If option 33 of the operating system was installed during this step, we recommend that you install the latest PTFs for your operating system release according to SAP Note 83292 .

If option 33 of the operating system was installed during this step, we recommend that youSAP Note 83292 . " id="pdf-obj-2-87" src="pdf-obj-2-87.jpg">

IBM i only: The system startup program (specified in system value QSTRUPPGM) must contain the STRSBS command to start subsystem QSYS/QUSRWRK. This is needed because SAPHOSTAGENT will be started as an auto-start job in subsystem QSYS/QUSRWRK.

Procedure

1.

Log on as a user with the required authorization:

Option

Description

Windows As a member of the local Administrators group

UNIX

As a user with root authorization

IBM i

As a user profile with special authorities *SECADM and *ALLOBJ, for example as user profile QSECOFR. If user profile R3GROUP does not exist on your server, it will be created during the installation of SAP Host Agent. If you have already installed SAP systems on other servers, we recommend that you use the same group ID (GID) for all sapsys and R3GROUP groups in the system landscape. To obtain the group ID (GID) for R3GROUP on another IBM i server in your landscape, enter the command DSPUSRPRF USRPRF(R3GROUP) and scroll down until you see the value for Group ID number.

  • 2. IBM i only: Enter the command CALL PGM(QP2TERM) to start a PASE interactive terminal session.

  • 3. Download the SAPHOSTAGENT<SP-version>.SAR archive as described in Downloading the SAPHOSTAGENT Archive

  • 4. Copy the downloaded SAPHOSTAGENT<SP-version.SAR> archive to a temporary directory, for example:

Option

Description

Windows

c:\temp\hostagent

UNIX, IBM i /tmp/hostagent

  • 5. Change to this directory by entering the following command:

Option

Description

Windows

In our example, the temporary directory is c:\temp\hostagent: cd

c:\temp\hostagent

UNIX, IBM

In our example, the temporary directory is /tmp/hostagent: cd

i

/tmp/hostagent

  • 6. Extract the SAPHOSTAGENT<SP-version.SAR> archive with the SAPCAR tool. Take SAP Note 212876

1. Log on as a user with the required authorization: Option Description Windows As a memberDownloading the SAPHOSTAGENT Archive 4. Copy the downloaded SAPHOSTAGENT<SP-version.SAR> archive to a temporary directory, for example: Option Description Windows c:\temp\hostagent UNIX, IBM i /tmp/hostagent 5. Change to this directory by entering the following command: Option Description Windows In our example, the temporary directory is c:\temp\hostagent: cd c:\temp\hostagent UNIX, IBM In our example, the temporary directory is /tmp/hostagent: cd i /tmp/hostagent 6. Extract the SAPHOSTAGENT<SP-version.SAR> archive with the SAPCAR tool. Take SAP Note 212876 i nto account when doing so. Use the following command for extraction, and execute them in the directory of the archive: Option Description <path to SAPCAR> sapcar.exe -xvf SAPHOSTAGENT<SP- version>.SAR <path to SAPCAR> sapcar -xvf SAPHOSTAGENT<SP-version>.SAR <path to SAPCAR> SAPCAR -xvf SAPHOSTAGENT<SP-version>.SAR " id="pdf-obj-3-90" src="pdf-obj-3-90.jpg">

into account when doing so. Use the following command

for extraction, and execute them in the directory of the archive:

Option

Description

Windows <path to SAPCAR> sapcar.exe -xvf SAPHOSTAGENT<SP- version>.SAR

UNIX

<path to SAPCAR> sapcar -xvf SAPHOSTAGENT<SP-version>.SAR

IBM i

<path to SAPCAR> SAPCAR -xvf SAPHOSTAGENT<SP-version>.SAR

7.

Among others, the archive contains the saphostexec program.

  • 8. Start the installation by entering the following command:

Option

Description

Windows

saphostexec.exe -install

If user sapadm does not yet exist, it is automatically created as a local user and you are prompted to enter a password for this user to be created.

Note

In some cases it might be useful to configure sapadm as a domain user instead of a local user, for example if you have multiple Windows hosts in your system landscape each of which has SAP Host Agent. Enter the following command to install saphostexec while specifying sapadm as the domain user:

saphostexec.exe -install -user <domain>\sapadm

UNIX

./saphostexec -install

The administrator user sapadm of the SAP Host Agent is created automatically during the installation, but it does not get assigned a password. You can assign a password after the installation has finished (see next step).

IBM i

./saphostexec -install -gid <gid>

Note If you have already installed SAP systems on other servers, we recommend that you use the same group ID (GID) for all sapsys or R3GROUP groups in the system landscape. To do this, enter your landscape system GID into <gid> on the above command. If user profile R3GROUP already exists, or if you want the saphostcontrol installation to automatically generate a new group ID, enter the command saphostexec -install without the addition -gid <gid> .

  • 9. The progress of the installation is displayed on the command line.

    • 10. UNIX only: If required, assign a password to the sapadm user by entering the following command: passwd sapadm

    • 11. After the installation has finished successfully, you can check whether SAP Host Agent is up and running by executing the following command from the directory of the SAP Host Agent executables:

Option

Description

Windows

%ProgramFiles%\SAP\hostctrl\exe\saphostexec.exe

-status

UNIX and IBM

/usr/sap/hostctrl/exe/saphostexec -status

i

Results

After the installation has finished successfully, SAP Host Agent is up and running.

You have installed and started the following units on your host:

The control program saphostexec

The operating system collector saposcol

The SAP NetWeaver Management agent SAPHostControl ( sapstartsrv in host mode)

IBM i only: The SAP ILE daemon SAPILED

IBM i only: The SAP Database Performance Collector for IBM i, if the /usr/sap/sapservices file contains the related entry as described in SAP Note SAP Note

.
.

Next Steps

You can now delete the temporary directory with all its content.

Installing SAP Host Agent Using Software Provisioning Manager

You can also install SAP Host Agent using software provisioning manager 1.0 (formerly known as SAPinst).

Context

The required files are on the kernel medium for the current release.

Procedure

Proceed as described in section Installing SAP Host Agent Separately in the documentation Installation Guide - SAP Systems Based on the Application Server <ABAP or Java> of SAP NetWeaver on <OS>: <DB> - Using Software Provisioning Manager 1.0 at:

SAP Host Agent Upgrade

As part of the SAP instance, SAP Host Agent is upgraded automatically when you patch or upgrade the SAP kernel. However, we recommend upgrading SAP Host Agent independently from the SAP instance, either by doing this manually or by configuring automated upgrade.

Recommendation If you have a 720_EXT version of SAP Host Agent installed, we recommend that you upgrade it to the latest version of SAP Host Agent 720.

The following sections describe how to do this:

Upgrading SAP Host Agent Manually

You perform the upgrade by running saphostexec -upgrade from the directory to which you extracted the SAPHOSTAGENT<SP-version>.SAR archive before.

Procedure

  • 1. Log on as a user with the required authorization:

Option

Description

Windows As a member of the local Administrators group

UNIX

As a user with root authorization or as a member of the sapsys group, for example <sapsid>adm

IBM i

As a user profile with special authorities *SECADM and *ALLOBJ, for example as user profile QSECOFR.

  • 2. IBM i only: Enter the command CALL PGM(QP2TERM) to start a PASE interactive terminal session.

  • 3. Download the desired target release version of the SAPHOSTAGENT<SP- version>.SAR archive as described in Downloading the SAPHOSTAGENT Archive

  • 4. Copy the downloaded SAPHOSTAGENT<SP-version>.SAR archive to a temporary directory, for example:

Option

Description

Windows

c:\temp\hostagent

UNIX, IBM i /tmp/hostagent

  • 5. Change to the temporary directory by entering the following command:

Option

Description

Windows

Change to the temporary directory with the downloaded SAPHOSTAGENT<SP-version>.SAR archive by entering the following command (in our example, the temporary directory is c:\temp\hostagent):

cd c:\temp\hostagent

UNIX

If you are logged on as a user with root authorization, change to the temporary directory with the downloaded SAPHOSTAGENT<SP-

Option

Description

 

version>.SAR archive by entering the following command (in our example, the temporary directory is c:\temp\hostagent):

cd /tmp/hostagent

IBM i

Change to the temporary directory with the downloaded SAPHOSTAGENT<SP-version>.SAR archive by entering the following command (in our example, the temporary directory is c:\temp\hostagent):

cd c:\temp\hostagent

  • 6. Extract the SAPHOSTAGENT<SP-version>.SAR archive with the SAPCAR tool to this directory. Take SAP Note 212876

Option Description version>.SAR archive by entering the following command (in our example, the temporary directory isSAP Note 212876 i nto account when doing so. Use the following command for decompression, and execute them in the directory of the archive: Option Description <path to SAPCAR> sapcar.exe -xvf SAPHOSTAGENT<SP- version>.SAR <path to SAPCAR> sapcar -xvf SAPHOSTAGENT<SP-version>.SAR <path to SAPCAR> SAPCAR -xvf SAPHOSTAGENT<SP-version>.SAR 7. Among others, the archive contains the saphostexec program. 8. Perform the upgrade by running the following command from the temporary directory: Option Description saphostexec.exe -upgrade UNIX o If you are logged on as a user with root authorization, execute the following command: ./saphostexec -upgrade o If you are logged on as a member of the sapsys group, for example <sapsid>adm, execute the following command: /usr/sap/hostctrl/exe/hostexecstart -upgrade <path to temporary directory with the extracted SAPHOSTAGENT<SP-version>.SAR> ./saphostexec -upgrade 9. The progress of the upgrade is displayed on the command line. 10. After the upgrade has finished successfully, you can check the version of the upgraded host agent by executing the following command from the directory of the SAP Host Agent executables: Option Description %ProgramFiles%\SAP\hostctrl\exe\saphostexec.exe -version " id="pdf-obj-7-27" src="pdf-obj-7-27.jpg">

into account when doing so. Use the

following command for decompression, and execute them in the directory of the

archive:

Option

Description

Windows <path to SAPCAR> sapcar.exe -xvf SAPHOSTAGENT<SP- version>.SAR

UNIX

<path to SAPCAR> sapcar -xvf SAPHOSTAGENT<SP-version>.SAR

IBM i

<path to SAPCAR> SAPCAR -xvf SAPHOSTAGENT<SP-version>.SAR

  • 7. Among others, the archive contains the saphostexec program.

  • 8. Perform the upgrade by running the following command from the temporary directory:

Option

Description

Windows saphostexec.exe -upgrade

UNIX

o

If you are logged on as a user with root authorization, execute the following command: ./saphostexec -upgrade

o

If you are logged on as a member of the sapsys group, for example <sapsid>adm, execute the following command:

/usr/sap/hostctrl/exe/hostexecstart -upgrade <path to temporary directory with the extracted SAPHOSTAGENT<SP-version>.SAR>

IBM i

./saphostexec -upgrade

  • 9. The progress of the upgrade is displayed on the command line.

10. After the upgrade has finished successfully, you can check the version of the upgraded host agent by executing the following command from the directory of the SAP Host Agent executables:

Option

Description

Windows

%ProgramFiles%\SAP\hostctrl\exe\saphostexec.exe

-version

Option

Description

UNIX and IBM

/usr/sap/hostctrl/exe/saphostexec -version

i

11. IBM i only: Leave the PASE interactive terminal session using function key F3

Automated Upgrade of SAP Host Agent

SAP Host Agent is enabled to check for updates automatically and get upgraded if a version of the SAP Host Agent executable is found that is higher than the existing one.

Configuring the Automated Upgrade Behavior of SAP Host Agent

The running saphostexec executable regularly checks a directory, by default /usr/sap/hostctrl/new (on UNIX and IBM i) or %ProgramFiles%\SAP\hostctrl\new (on Windows), where it expects to find the latest version of the executable of SAP Host Agent from the unpacked SAPHOSTAGENT.SAR archive.

Prerequisites

Windows: You must be logged on as a member of the local Administrators group.

UNIX: You must be logged on as a user with root authorizations.

IBM i: You must be logged on as a user profile with special authorities *SECADM and *ALLOBJ, for example as user profile QSECOFR.

Context

An upgrade is only performed if a version of the SAP Host Agent executable programs is found in the new directory that is higher than the version of the executable programs that exist in the SAP Host Agent executable directory.

Procedure

  • 1. You can configure the automated upgrade behavior by adapting the host_profile file which you can find in the following directory:

Option

Description

UNIX and IBM i /usr/sap/hostctrl/exe

Windows

%ProgramFiles%\SAP\hostctrl\exe

o

By default, the saphostexec program performs a check for updates every 5 minutes. You can change this behavior by adapting profile value hostexec/autoupgrade_delay= <minutes> .

o

In addition, you can also change the name and path of the directory that contains the newest SAP Host Agent version using profile value DIR_NEW= <path to a directory> .

  • 2. Once you have changed the SAP Host Agent profile, you need to restart SAP Host Agent in order to make the changes take effect:

    • a. IBM i: Enter the command CALL PGM(QP2TERM) to start a PASE interactive terminal session .

    • b. Change to the directory of the saphostexec executable:

UNIX, IBM i /usr/sap/hostctrl/exe

Windows

%ProgramFiles%\SAP\hostctrl\exe

  • c. Run the following command to restart SAP Host Agent:

UNIX, IBM i ./saphostexec -restart

Windows

saphostexec.exe -restart

Avoiding Incomplete Upgrade of SAP Host Agent

We recommend that you create an empty file called .upgrading in the $DIR_NEW directory to avoid that saphostexec starts the upgrade procedure during the extraction of SAPHOSTAGENT<SP-version>.SAR - with the consequence that only part of the newest version of the packages is upgraded.

Procedure

  • 1. Create the .upgrading file in the $DIR_NEW directory.

  • 2. Extract SAPHOSTAGENT.SAR to $DIR_NEW.

Example

This example shows how you proceed on UNIX. You can proceed analogously on other operating system platforms:

Sample Code

cd /usr/sap/hostctrl/new/

touch .upgrading

SAPCAR -xvf SAPHOSTAGENT <SP-version>.SAR

rm .upgrading

Configuring Delayed Auto-Upgrade of SAP Host Agent to Avoid Network Bottlenecks

Within large installations, it normally makes sense to use one single share where the content of SAPHOSTAGENT<SP-version>.SAR is extracted regularly.

Context

With this configuration the simultaneous upgrade of many machines is very easy. Unfortunately, if all machines start to access a single network share, it could result in a network bottleneck, and in case of a restrictive fire wall configuration, to a complete outage.

To avoid this kind of problem, for large landscapes you can additionally create a configuration file within $DIR_NEW, containing the maximum time range of an upgrade. In this case the various saphostexec processes of the different machines will plan the upgrade in a random way within a well defined time window.

Procedure

Create a file in $DIR_NEW called .delay.

The format of the file is as follows: <Value1>random- <Value2> :

<Value1> represents the number of minutes after an auto-upgrade is checked, and <Value2> the maximum value of minutes after which the auto-upgrade is started.

The real upgrade delay value in minutes is given by: Delay = <Value1> + <randomValue> *<Value2>

Example

500

Auto-upgrade checks the version of the file contained in $DIR_NEW every 500 minutes.

<Value2> is optional and could be omitted.

Example

500random500

Auto-upgrade checks the version of the file contained in $DIR_NEW every 500 minutes.

Once the version of SAP Host Agent contained within $DIR_NEW is newer, the upgrade will be started within the next 500 minutes. The exact time when the upgrade is started is a random value between 1 and 500 minutes.

SAP Host Agent Configuration

Here you find information about the most relevant aspects of SAP Host Agent configuration.

Registering Hosts with the SLD Using sldreg

To register a host without an SAP instance or component with the System Landscape Directory (SLD), call the sldreg executable on that host.

Prerequisites

SAP Host Agent is installed on the relevant host.

Windows: You must be logged on as a member of the local Administrators group.

UNIX: You must be logged on as a user with root authorizations.

IBM i: You must be logged on as a user profile with special authorities *SECADM and *ALLOBJ, for example as user profile QSECOFR.

Procedure

  • 1. You are on the host that you want to register in the SLD.

3.

Change to the following directory as current directory ( DIR_GLOBAL Directory):

Option

Description

Windows (language-dependent): %ProgramFiles%\SAP\hostctrl\exe

UNIX, IBM i:

/usr/sap/hostctrl/exe

  • 4. Call the sldreg executable with the following command:

Option

Description

Windows:

sldreg -configure slddest.cfg

UNIX, IBM i: ./sldreg -configure slddest.cfg

  • 5. Caution

  • 6. You have to make sure that the SLD connection file is named slddest.cfg and that it is located in the DIR_GLOBAL directory of SAP Host Agent. Otherwise the registration does not work.

  • 7. Note

  • 8. UNIX, IBM i: To be able to access its libraries, the sldreg program requires the path /usr/sap/hostctrl/exe in the search path for libraries.

o

UNIX: For example, under Linux with a C shell, you can achieve this with the following command:

setenv LD_LIBRARY_PATH /usr/sap/hostctrl/exe:$LD_LIBRARY_PATH

o

IBM i: From within QP2TERM, you can achieve this with the following

command: export LIBPATH=/usr/sap/hostctrl/exe:$LIBPATH

  • 9. Enter the connection data for the SLD with which you want to register this host:

o

SLD user that has been assigned the role DataSupplierLD

o

Password of the above user

o

Host and HTTP port of the SLD

o

Protocol (HTTP or HTTPS)

10. Confirm that you want to save this data in the encrypted file slddest.cfg. 11. Restart SAP Host Agent by running the following command from the command line:

Option

Description

Windows

saphostexec.exe -restart

UNIX, IBM i ./saphostexec -restart

12. The restart generates an XML file in the working directory of SAP Host Agent and transfers it to the SLD. This XML file contains all of the information about the host that the SLD requires.

Results

You have registered the local host with an SLD.

Next Steps

You can check if the registration was performed successfully. To do this, call the start page of the SLD with the URL http:// <host>: <port>/sld, and choose Technical Systems. Choose AS Java In the Technical System Type drop-down list box. The host that you have just registered is displayed.

SSL Configuration for the SAP Host Agent

Configuring secure socket layer (SSL) for SAP Host Agent is a multi-step procedure. The following sections exemplarily describe SSL configuration on UNIX, Windows and IMB i.

The main steps are as follows:

  • 1. Preparing the environment for SAP Cryptographic Library

  • 2. Preparing the Personal Security Environment (PSE) for the server

  • 3. Preparing the Personal Security Environment (PSE) for the client

  • 4. Establishing trust between the client and SAP Host Agent

  • 5. Allowing the client to issue administrative commands

The following sections exemplarily describe SSL configuration on UNIX, Windows and IMB i:

Configuring SSL for SAP Host Agent on Windows

This section exemplarily describes SSL configuration for the SAP Host Agent on Windows.

Prerequisites

You must be logged on as a member of the local Administrators group.

Context

In the following procedure we assume that you are using the default naming for the server PSE. If you want to override the default .pse name, you can use the following value in the profile file of SAP Host Agent ( host_profile):

ssl/server_pse= <Path to Server PSE>

Procedure

  • 1. Prepare the environment for SAP Cryptographic Library:

    • a. Open a command line prompt and change to the %PROGRAMFILES %\SAP\hostctrl\exe directory.

    • b. Create a subdirectory named sec and set the SECUDIR environment variable to refer to the new directory using the following commands: %PROGRAMFILES%\SAP\hostctrl\exe> mkdir sec %PROGRAMFILES%\SAP\hostctrl\exe> set SECUDIR=%PROGRAMFILES %\SAP\hostctrl\exe\sec Note Alternatively, you can also use another directory, but then you have to specify the location of the PSE file using the parameter ssl/server_pse as described above. Recommendation Set up SECUDIR as an absolute path in order to avoid trouble with the sapgenpse tool.

    • c. Make sure that the files are readable and executable by user sapadm.

  • 2. Prepare the Personal Security Environment (PSE) for the server: The server PSE contains the server certificate, which is presented to the client when establishing the SSL connection, and the names and public keys of the trusted certificates. Trusted certificates can be either certificates issued by a Certification Authority (CA) or individually trusted certificates.

    • a. Create the server PSE, the server certificate therein, and the Certificate Signing Request (CSR) . Example

%PROGRAMFILES%\SAP\hostctrl\exe> sapgenpse gen_pse -p SAPSSLS.pse -x passwd1 -r myhost-csr.p10 "CN=myhost.wdf.sap.corp, O=SAP AG, C=DE"

This command creates a PSE file named SAPSSLS.pse (name is fixed), which can be used to authenticate myhost.wdf.sap.corp for incoming SSL connections. The access to the PSE file is protected with passwd1. Use the -r option to direct the certificate signing request to a file, or omit it if you intend to copy and paste the CSR into a Web form.

  • b. Grant the SAP Host Agent access to the server PSE. Example %PROGRAMFILES%\SAP\hostctrl\exe> sapgenpse seclogin -p SAPSSLS.pse -x passwd1 -O sapadm

  • c. Get the certificate as follows:

    • i. If you do not use individually trusted certificates, send the certificate signing request to an appropriate CA.

ii.

Copy the signed certificate from the output area - including the "---- BEGIN CERTIFICATE ----" and "---- END CERTIFICATE ----" lines - and paste it into a text file, for example myhost.p7b.

  • d. Import the signed certificate into the server PSE. Example %PROGRAMFILES%\SAP\hostctrl\exe> sapgenpse import_own_cert -p SAPSSLS.pse -x passwd1 -c myhost.p7b (if the used format is PKCS#7).

  • e. Verify the server certificate chain. Example %PROGRAMFILES%\SAP\hostctrl\exe> sapgenpse get_my_name -p SAPSSLS.pse -x passwd1 -v

  • 3. Restart SAP Host Agent.

  • 4. Prepare the Personal Security Environment (PSE) for the client: The client PSE contains the client certificate that is sent to SAP Host Agent when establishing the SSL connection, and the names and public keys of the trusted certificates. For the client, trusted certificates can only be certificates that are issued by a Certification Authority (CA). The configuration steps are client-specific, that is why we only describe them in a generic way. Follow the instructions in the specific client documentation.

Examples for possible clients are the SAP Management Console (SAP MC), the Diagnostics Agent in SAP Solution Manager, or the SAP NetWeaver Landscape Virtualization Management (LVM) software (formerly known as Adaptive Computing Controller (ACC)).

Results

Recommendation

If you successfully applied the procedure described above, SAP Host Agent also serves port 1129 for SSL communication.

Configuring SSL for SAP Host Agent on UNIX

This section exemplarily describes SSL configuration for the SAP Host Agent on UNIX.

Prerequisites

You are logged on as a user with root authorization.

Context

In the following procedure we assume that you are using the default naming for the server PSE. If you want to override the default .pse name, you can use the following value in the profile file of SAP Host Agent ( host_profile):

ssl/server_pse= <Path to Server PSE>

Procedure

  • 1. Prepare the Personal Security Environment (PSE) for the server: The server PSE contains the server certificate that is presented to the client when establishing the SSL connection, and the names and public keys of the trusted certificates. Trusted certificates can be either certificates issued by a Certification Authority (CA) or individually trusted certificates. Proceed as follows:

    • a. Create a directory /usr/sap/hostctrl/exe/sec using the mkdir command. Note Alternatively, you can also use another directory, but then you have to specify the location of the PSE file using the parameter ssl/server_pse as described

above. In the following steps we always refer to the sec directory for the sake of simplicity.

  • b. Assign the ownership for the sec directory to sapadm:sapsys.

  • c. Set up the shared library search path ( LD_LIBRARY_PATH, LIBPATH or SHLIB_PATH) and SECUDIR environment variables, and change to the exe directory of SAP Host Agent. Example

On Linux and Solaris, the required commands are as follows:

export LD_LIBRARY_PATH=/usr/sap/hostctrl/exe/

export SECUDIR=/usr/sap/hostctrl/exe/sec

cd /usr/sap/hostctrl/exe

On HP-UX, the required commands are as follows:

export SHLIB_PATH=/usr/sap/hostctrl/exe/

export SECUDIR=/usr/sap/hostctrl/exe/sec

cd /usr/sap/hostctrl/exe

On AIX , the required commands are as follows:

export LIBPATH=/usr/sap/hostctrl/exe

export SECUDIR=/usr/sap/hostctrl/exe/sec

cd /usr/sap/hostctrl/exe

Recommendation

Set up SECUDIR as an absolute path in order to avoid trouble with the sapgenpse tool.

  • d. Create the server PSE, the server certificate therein, and the Certificate Signing Request (CSR). Run the command as user sapadm so that the created files are owned by this user. Example sudo -u sapadm LD_LIBRARY_PATH=/usr/sap/hostctrl/exe SECUDIR=/usr/sap/hostctrl/exe/sec sapgenpse gen_pse -p SAPSSLS.pse -x password -r /tmp/myhost-csr.p10 "CN=myhost.wdf.sap.corp, O=SAP AG, C=DE" This command creates a PSE file named SAPSSLS.pse (name is fixed), which can be used to authenticate myhost.wdf.sap.corp for incoming SSL

connections. The access to the PSE file is protected with a password. Use the -r option to direct the certificate signing request to a file, or omit it if you intend to copy and paste the CSR into a web formular.

  • e. Grant SAP Host Agent access to the server PSE. Example sudo -u sapadm LD_LIBRARY_PATH=/usr/sap/hostctrl/exe SECUDIR=/usr/sap/hostctrl/exe/sec sapgenpse seclogin -p SAPSSLS.pse -x password -O sapadm

  • f. Get the certificate as follows:

    • i. Send the certificate signing request to an appropriate CA.

ii.

Copy the signed certificate - including the "---- BEGIN CERTIFICATE ----" and "---- END CERTIFICATE ----" lines - and paste it into a text file.

Example

If the used format is PKCS#7, the text file could be named myhost.p7b. We use this file name in the following examples.

  • b. Import the signed certificate into the server PSE. Example sudo -u sapadm LD_LIBRARY_PATH=/usr/sap/hostctrl/exe SECUDIR=/usr/sap/hostctrl/exe/sec sapgenpse import_own_cert -p SAPSSLS.pse -x password -c /tmp/myhost.p7b

  • c. Verify the server certificate chain. Example sudo -u sapadm LD_LIBRARY_PATH=/usr/sap/hostctrl/exe SECUDIR=/usr/sap/hostctrl/exe/sec sapgenpse get_my_name -p SAPSSLS.pse -x passwd -v

  • 2. Restart SAP Host Agent.

  • 3. Prepare the Personal Security Environment (PSE) for the client: The client PSE contains the client certificate that is sent to SAP Host Agent when the SSL connection is established, and the names and public keys of the trusted certificates from CA. The configuration steps are client-specific, that is why we only describe them in a generic way. Follow the instructions in the specific client documentation.

Examples for possible clients are the SAP Management Console (SAP MC), the SAP Solution Manager Diagnostics Agent, or the SAP NetWeaver Landscape Virtualization Management (LVM) software (formerly known as Adaptive Computing Controller (ACC)).

Results

Recommendation

If you successfully applied the procedure described above, SAP Host Agent also serves port 1129 for SSL communication.

Uninstalling SAP Host Agent

You can uninstall SAP Host Agent by running the saphostexec executable from the command line.

Prerequisites

Windows: You must be logged on as a member of the local Administrators group.

UNIX: You must be logged on as a user with root authorizations.

IBM i: You must be logged on as a user profile with special authorities *SECADM and *ALLOBJ, for example as user profile QSECOFR.

Procedure

  • 1. IBM i: Enter the command CALL PGM(QP2TERM) to start a PASE interactive terminal session.

  • 2. Change to the directory of the saphostexec executable:

Option

Description

UNIX, IBM i: cd /usr/sap/hostctrl/exe

Windows:

cd %ProgramFiles%\SAP\hostctrl\exe

  • 3. Run the following command from the command line:

Option

Description

UNIX, IBM i: ./saphostexec -uninstall

Windows:

saphostexec.exe -uninstall

Results

This command stops the executables and services of SAP Host Agent and deletes the following:

The work directory of SAP Host Agent

The exe directory of SAP Host Agent

Windows: The local sapadm user and SAP_LocalAdmin group

SAP Host Agent Reference - Command Line Options of the saphostexec Executable

Usually SAP Host Agent is automatically started when the operating system is booted. You can also manually control it using the saphostexec program.

Prerequisites

You are logged on as a user with the required authorization:

Windows As a member of the local Administrators group

UNIX

As a user with root authorization

IBM i

As a user profile with special authorities *SECADM and *ALLOBJ, for example as user profile QSECOFR

Features You call the program from the command line with the following syntax:

Windows

%ProgramFiles%\SAP\hostctrl\exe\saphostexec.exe -[option] [pf=<ProfilePath>]

UNIX and

/usr/sap/hostctrl/exe/saphostexec -[option] [pf=<ProfilePath>]

IBM i

where <ProfilePath> is path to the profile file ( host_profile) of SAP Host Agent. By default the host_profile file is located in the executable directory.

You can execute saphostexec with the following command line options:

Option

Meaning

-help

Lists all command line options of saphostexec with documentation

-install

Installs SAP Host Agent

-upgrade

Upgrades SAP Host Agent

-uninstall Uninstalls SAP Host Agent

-restart

Starts or restarts SAP Host Agent

Option

Meaning

-stop

Stops a running SAP Host Agent

-status

Returns the status of SAP Host Agent

-version

Returns the version of SAP Host Agent with detailed information

SAP Host Agent Reference - Command Line Options of the hostexecstart Executable

The hostexecstart program is a command line tool available for UNIX operating systems. It allows a user that does not have root authorization to perform some control operations relevant for the lifecycle of SAP Host Agent.

Prerequisites

You have to be member of group sapsys, for example <sapsid>adm, to be able to execute the program.

Features

You call the program from the command line with the following syntax:

/usr/sap/hostctrl/exe/hostexecstart -[option] [pf=<ProfilePath>]

Calling hostexecstart without any arguments starts SAP Host Agent

You can execute hostexecstart with the following command line options:

Option

Meaning

-help

Lists all command line options of hostexecstart with documentation

-upgrade

Upgrades SAP Host Agent using the path to the extracted

<path>

SAPHOSTAGENT <SP-version>.SAR

-start

Starts SAP Host Agent if it is not running

-restart

Restarts SAP Host Agent

-status

Returns the information whether SAP Host Agent is running or not running