To make your TREX installation accessible by a virtual host name you rename the host name of the host on which you intend to install TREX. Proceed as follows:
Change the host name to the virtual host name
Before you install TREX you change the name of the installation host to a virtual host name on operating system level.
Install TREX and change the host name back
After you have installed TREX on the installation host you change the host name back to the original host name.
Change the TREX Settings
To make the virtual host name work for your TREX installation you need to change some TREX settings.
The virtual host name must be valid at the operating system level and in the network the host is a part of. It can be a new primary host name, an additional alias name, or it's IP address. The host must be accessible with this name using the ping command. Only then TREX can monitor itself and can be used by other applications.
Change the Host Name to the Virtual Host Name
Before you install TREX you change the host name of the host on which you intend to install TREX to a virtual host name on operating system level.
Unix
Log on to the installation host as user root.
Change the host name of your installation host by the command hostname <virtual_hostname>.
The host name is usually set once at system startup by reading the contents of a file which contains the host name, for example /etc/hostname.
Windows
Log on to the installation host as user with administrator rights.
Open
.On the Computer Name tab, choose Change.
In the field Computer name, type your new virtual host name <virtual_hostname>.
The name must be unique. You cannot use a name already in use on the network.
You need to restart your host for the new settings to take effect.
Install TREX and Change the Host Name Back
After you have installed TREX on the installation host you change the host name back to the original host name.
Install TREX as described in the TREX installation guide.
You find the TREX installation guide on SAP Service Marketplace service.sap.com/instguides
Stop TREX if necessary (incl. sapstartsrv)
As long as the host name is changed to the virtual host name do not start or stop any other TREX instances. Otherwise those TREX instances would change the TREX configuration file toplogy.ini so that the instances will be registered with the virtual host name there.
Change the virtual host name <virtual_hostname> of your installation host back to the original host name as described in the step Change Host Name to Virtual Host Name.
Change the TREX Settings
To make the virtual host name work for your TREX installation you have to specify the following TREX settings.
Only on UNIX:
Create a file with the name hostname in the home directory of the <sapsid>adm user with the following content:
#!/bin/sh
echo <virtual_hostname>
Make the file hostname executable by the command chmod+x hostname.
Windows and UNIX
Change the TREX profile files <SAPSID>_TRX<instance_number>_<virtual_hostname> and sapprofile.ini:
Change the TREX instance profile <SAPSID>_TRX<instance_number>_<virtual_hostname>. You find the TREX instance profile in the global file system for your TREX installation <TREX_GLOBAL> (/usr/sap/<SAPSID>/SYS/profile).
Change the line SAPLOCALHOST=<virtual_hostname>. If there is a line SAPGLOBALHOST=<old_hostname> then also change it.
Change the configuration file <TREX_DIR>/<virtual_hostname>/sapprofile.ini.
Change the line SAPLOCALHOST=<virtual_hostname>. If there is a line SAPGLOBALHOST=<old_hostname> then also change it.
Start TREX (see Starting and Stopping TREX).