TREX Installation on EP7
This how-to tutorial explains the TREX Basis Installation as well as the some post configuration activities, needed for the TREX to work. SAP NetWeaver Search and Classification (TREX) finds information in both structured and unstructured data. TREX provides SAP applications with services for searching and classifying large collections of documents and for searching and aggregating business objects. For those who want to know TREX in more detail, I recommend that you start by the SAP Help page available here.
Please note that this tutorial covers the installation of TREX on a 32 Bit Windows 2003 Enterprise Edition with SP1 and IIS installed and running.
Additional prerequisites that were in place before installing TREX:
- The server where TREX was installed had a 4GB RAM Memory.
- The installed TREX version was 7.0.25 based on Netweaver 7.0 SR2.
Some points to take into consideration before starting:
- In order to create a search and classification engine for SAP ERP, BW and the Enterprise Portal, TREX 7.0 was installed on a separate stand alone server.
- Both the ABAP stack as well as the Java stack were required for the installation process.
- The TREX server is part of the Netweaver 2004s SR2 framework. At the time of this installation, the windows 64-bit X86 version was only available to ramp up customers. So the 32 bit version was considered.
- This installation was performed using the SAP NetWeaver 2004s Standalone Engine Search and Classification (TREX) Single Host.
TREX Installation Steps
1. Login with the xyzADM account where xyz represents the SID (e.g. N20ADM).
2. Install the 32 BIT JDK, using all default installation values. The version used for this installation was Java 2 SDK Standard Edition version 1.4.2_14.
3. Set the JAVA_HOME system variable with the location of the JDK installation (e.g. c:\java_142_14\bin).
4. Copy the TREX installation files and NW2004s master disk into a new windows 32 bit server named: rrispdt01 (in separate directories). You should do this using a USB file copy and locate all files in: D:\TREX_Install_Files. Consider the following files/directories: SAP Netweaver 2004s SR2 (TREX 7.0) DVD and Netweaver Master Install Zip file.
5. Run file R3Dllins.exe. Click OK when you’re prompted if you want to modify system files.
6. Run SAPinst.exe to start the installation process.
7. If you’re performing a first installation, select TREX global file system with the first TREX instance. Follow the steps below to install TREX:

8. Choose a New installation (if it is in fact a new installation):

9. Select the “Typical” installation and click next.
10. Enter the SID (it must be the same SID as done in the Netweaver Developer Workplace/Portal installation) and select the installation drive (Typically E:))

11. Enter your Password - the same password as your xyzADM password:

12. Enter the password for the xyzADM account and enter a password for the SAP System Service user account. To avoid confusion, I suggest using the same password for both:

13.Check the chosen settings in the summary screen and click Start:

14. If everything goes well we you will receive a success message. All phases should clear with a green icon.

Post Installation Tasks and Procedures
After the above desired successful TREX installation, all you’ll have is a “floating” TREX. I say floating because TREX still won’t be connected to the Portal. So the first step will be to connect TREX to the existing Portal instance.
Test the TREX Servers
1. Log on with the user xyzADM and open a command line.
2. Browse to the following directory: <disk_drive>:\usr\sap\trex_<instance_number>\python_support.
3. Type trexsettings.bat in the command line and hit enter to execute the batch file.
4. Execute python script: runInstallationTest.py. This script will carry out the following tests:
- Delete test indexes that were generated for a previous script run;
- Create a test index;
- Index documents;
- Test search functions: exact, error-tolerant (fuzzy), and linguistic searches; and search using boolean operators such as AND and OR.
5. The results will be displayed at the end of the script run. You’ll see the test calls and the respective statuses (OK or Failed).
6. When you run the script for the first time, the call “Delete Index” will display the status Failed. This is caused by the fact that no existing text index to be deleted existed. If this is the only line with the status Failed, the test was successful.
Point the Application Servers to the TREX instances
1. Access the Portal server file system and start the offline Config Tool.
2. Once in the Config Tool, navigate to Global Instance > Services > trex.serviceNameserver.address enter the following tcpip://<FQDN>:30001.
3. The next entry should be nameserver.backupserverlist. Type the following entry: tcpip://<FQDN>:30001.
4. Go back to the TREX server and open the TREX admin tool (you should now be able to access it). Confirm that you can see the Servers as online.
















