Install SAP NetWeaver 7.52 SP04 TestDrive on Linux

The following steps show how to install a test system of SAP NetWeaver 7.52 SP04 on RHEL 8 (running as a VirtualBox guest). SAP Sybase ASE 16.0.2 is used as the database. SAP GUI will be installed on a client machine running Windows 10 and will be used to access the SAP NetWeaver Application Server. The system will give you an overview of the current SAP ABAP Application server and enable you to develop web applications or explore the SAP client/server architecture in general.

Download the software

Download all files from here under the section SAP NetWeaver AS ABAP Developer Edition 7.52 SP04 You need to create an SAP account to do that. The files should be available on the linux machine under /sw/sap.

Prepare the installation

Unpack the SAP ABAP AS software to /sw/sap/as and add the license

# this step is only needed to install unar since it is not included in RHEL 8 by default
subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf -y install unar
# unpack the software to /sw/sap/as
cd /sw/sap && unar -D -o as TD752SP04part01.rar
# extract license file SYBASE_ASE_TestDrive.lic to /sw/sap/TD752SP04/server/TAR/x86_64/SYBASE_ASE_TestDrive.lic
unar -o - /sw/sap/License.rar License/SYBASE_ASE_TestDrive/SYBASE_ASE_TestDrive.lic > /sw/sap/as/server/TAR/x86_64/SYBASE_ASE_TestDrive.lic
# install required OS packages
dnf -y install uuidd csh
# adjust /etc/hosts and set hostname
echo "11.1.1.172 lin.fritz.box lin" >> /etc/hosts
echo lin > /etc/hostname
init 6

Installation of SAP NetWeaver AS

# this is needed as a workaround to avoid the database being stuck
until [ -f /sybase/NPL/ASE-16_0/install/RUN_NPL ] ; do sleep 0.1 ; done && sed -i 's/NPL.cfg \\/NPL.cfg -T11889 \\/g' /sybase/NPL/ASE-16_0/install/RUN_NPL &
# start the installation
cd /sw/sap/as && ./install.sh

agree to license terms: yes
password (min 8 characters): sapsapsap
The installation takes around 20 minutes.

If the Installation fails with an error you can use the following to clean up and afterwards restart the installation:

pkill -9 -u sapadm
pkill -9 -u npladm
pkill -9 -u sybnpl
userdel -r sapadm 
userdel -r npladm
userdel -r sybnpl
rm -rf /usr/sap/ /sapmnt/ /sybase/ /tmp/sapinst_instdir/
init 6

Installation and Setup of SAP GUI for Windows 7.5

Copy and unzip the SAP Front End installer located in /sw/sap/as/client/SAPGUI4Windows. Start the installation by running 50144807_6\BD_NW_7.0_Presentation_7.50_Comp.2\PRES1\GUI\WINDOWS\Win32\SapGuiSetup.exe Select SAP GUI for Windows 7.50 (Compilation2) and press Next/Next to start the installation


Start SAP Logon and select New Item. Press Next. Configure a New System Entry and press Finish:

Request and Install the license

Get the hardware key of the system by running:

su - npladm -c "/usr/sap/NPL/SYS/exe/run/saplicense -get"

Go to http://www.sap.com/minisap, select NPL - SAP NetWeaver 7.x (Sybase ASE) and request a license key.

Logon to the system with the SAP GUI (Client: 000 User: SAP* Password: Down1oad):


Start transaction slicense (by entering slicense in the text field and pressing Enter). Delete the two existing licenses (right click => Delete License) and add the requested license (right click => Install License, select license file NPL.txt). The demo system is now activated.

Accounts created during the installation

Database Accounts

usernamepassworddescription
SAPSR3master_passwordABAP Schema User
samaster_passwordSuperuser
sapsamaster_passwordSuperuser
sapssomaster_passwordSuperuser

SAP Accounts (can be used with SAP GUI to logon)

usernameclient(s)passworddescription
DEVELOPER001Down1oadDeveloper User
BWDEVELOPER001Down1oadDeveloper User
DDIC000/001Down1oadData Dictionary User
SAP*000/001Down1oadSAP Administrator

Start and Stop of SAP NetWeaver AS

# stop AS and DB
su - npladm -c stopsap
# start AS and DB
su - npladm -c startsap
# check the status of the AS and the DB
su - npladm -c "startsap check"

Further Information

Further information can be found here:
community.sap.com (using the tag #ABAP_trial)
SAP Trial Downloads
readme file: /sw/sap/as/readme.html

Setup tcps / ssl encrypted database connections using orapki and wallets

This post shows how to setup and use tcps / ssl encrypted database connections. Self signed certificates created by orapki and stored in a Oracle Wallet will be used on the database server and on the client machine. The database server is running Oracle 19.25 on RHEL 8.1. The client machine is running Windows 10.

1. Create the server wallet and a self-signed (root) certificate. Run as the Oracle user on the database server.

# Create a wallet
mkdir ~/wallet && cd ~/wallet
orapki wallet create -wallet `pwd` -pwd test123# -auto_login
# Create a self signed certificate (this creates a CA root certificate and creates a user certificate that is signed by it)
orapki wallet add -wallet `pwd` -dn "CN=`hostname`" -keysize 4096 -self_signed -validity 20 -pwd test123#
# Display the contents of the wallet
orapki wallet display -wallet `pwd`

2. Adjust sqlnet.ora and listener.ora on the database server and start the ssl listener

sqlnet.ora:
WALLET_LOCATION=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=/home/oracle/wallet)))
SQLNET.AUTHENTICATION_SERVICES=(BEQ,TCPS)
SSL_CLIENT_AUTHENTICATION=FALSE

listener.ora:
SSL_CLIENT_AUTHENTICATION = FALSE
WALLET_LOCATION=(SOURCE=(METHOD = FILE)(METHOD_DATA=(DIRECTORY=/home/oracle/wallet)))
LISTENER_SSL=
  (DESCRIPTION_LIST=
    (DESCRIPTION=
      (ADDRESS=(PROTOCOL=TCPS)(HOST=lin2.fritz.box)(PORT=1522))))
SID_LIST_LISTENER_SSL=
  (SID_LIST=
    (SID_DESC=
      (GLOBAL_DBNAME=orcl.fritz.box)
      (ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1)
      (SID_NAME=orcl)))

lsnrctl start listener_ssl

# Adjust the database so that it registers its services with the listener
alter system set local_listener='LISTENER_ORCL,(ADDRESS=(PROTOCOL=TCPS)(HOST=lin2.fritz.box)(PORT=1522))';  (LISTENER_ORCL already existed)
alter system register; (registers the services to the new listener. Can be checked with lsnrctl services listener_ssl)

3. Create a wallet which can be copied and used on a client. Run as the Oracle user on the database server.

mkdir ~/clientwallet && cd ~/clientwallet
orapki wallet create -wallet `pwd` -pwd clienttest123# -auto_login
# Export the server certificate and import in the client wallet
orapki wallet export -wallet ~/wallet -dn "CN=`hostname`" -cert server.cer
orapki wallet add -wallet `pwd` -dn "CN=`hostname`" -trusted_cert -cert server.cer -pwd clienttest123#
# Display the contents of the wallet
orapki wallet display -wallet `pwd`

4. Preparation of the client sqlnet.ora and listener.ora on the database server.

cd ~/clientwallet
sqlnet.ora:
WALLET_LOCATION=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY="C:\sw\cwallet")))
SSL_CLIENT_AUTHENTICATION=FALSE
SSL_SERVER_DN_MATCH=ON

tnsnames.ora:
orcl_ssl=
  (DESCRIPTION=
    (ADDRESS_LIST=
      (ADDRESS=(PROTOCOL=TCPS)(HOST=lin2.fritz.box)(PORT=1522)))
    (CONNECT_DATA=
      (SERVICE_NAME=orcl.fritz.box)
      (SERVER=dedicated))
      (SECURITY=
        (SSL_SERVER_CERT_DN="CN=lin2.fritz.box")))

5. Implement the client wallet in the SQL Developer + use the client wallet with SQL*Plus

cd ~/clientwallet && zip ../cwallet.zip *
Copy cwallet.zip to the client machine
Create a SQL Developer connection of type 'Cloud Wallet' and select cwallet.zip. 
Select the tns alias for the connection
test the tcps connection with: select sys_context('USERENV', 'NETWORK_PROTOCOL') from dual;    (must be tcps)

Test the connection with sqlplus from the client machine:
 mkdir c:\sw\cwallet && cd c:\sw\cwallet && tar -xf c:\sw\cwallet.zip
 set TNS_ADMIN=C:\sw\cwallet
 rem test the tcps connection with:
 tnsping orcl_ssl
 sqlplus sys@orcl_ssl as sysdba  or  sqlplus sys@tcps://lin2.fritz.box:1522/orcl.fritz.box as sysdba
 select sys_context('USERENV', 'NETWORK_PROTOCOL') from dual;  (must be tcps)