If you’ve used the SAP on Linux Web Application Server 2004s SR1 (the NetWeaver 7.0 “TestDrive” for 64-bit Linux systems with system id N4S) you know it’s a great way to enjoy a dual stack system with the minimum of resources. With my set-up, I’ve since applied support packs to 15 (including required upgrade of MaXDB), installed EP core and run client tools from WinXP using the VMware server.
The origninal installation for the TestDrive doesn’t use sapinst but unpacks archive files of a running system called n4shost into various directories. N4S was written on SLES 10.0 but has been used successfully on other distrubutions, such as Ubuntu and openSUSE, which aren’t officially recommneded.
I first installed N4S on openSUSE 10.3, and it’s now time to upgrade my distro to the current release. And besides, although Linux distrubution can be upgraded easily from one release to the next, with correct use of partitions for your home directory, a clean install can be a better option to ensure your distro works flawlessly. It’s also an option if you need to transfer your set-up to a new machine, as during the install drivers are automatically configured for your new hardware.
Whatever your motivation, a clean install of a new operationg system could be a problem for an already running SAP on Linux TesDrive installation. Re-applying the settings is quite straight forward, and this blog indicates those steps I found were needed.
h4. 1. Backup before you begin.
This is probably the most essential step. It’s normally recommended to mount your home directory on a separate partition, so that the install will leave untouched any personal configuration settings. I also symbolically linked+ /usr/sap, /sapdb+ and /sapmnt to a “netweaver” partition, but backing up onto an external hardrive is an alternative. I use rsysnc to an externally USB connected hard drive. –delete </p>Restore: rsync -avn /h4. 2. Re-apply the following line to /etc/fstab
tmpfs /dev/shm tmpfs size=1g 0 0
Apparently, /dev/shm is for POSIX compliant shared memory applications such as NetWeaver. Memory is allocated as needed, not all up front, so remounting with a larger value only increases the maximum that can be used. Typical value for /dev/shm will have is ½ of your physical RAM, but nowhere near that amount that will be actually used.
h4. 3. Create (or copy from backup) a new file +/etc/opt/sdb +containing
h4. 4(a) Add to existing /etc/services
sapmsN4S 3601/tcp # SAP System Message Port
sapdp01 3201/tcp # SAP System Dispatcher Port
sapdp01s 4701/tcp # SAP System Dispatcher Security Port
sapgw01 3301/tcp # SAP System Gateway Central Instance Port
sapgw01s 4801/tcp # SAP System Gateway Security Port
sapdp00 3200/tcp # SAP System Dispatcher Port
sapdp00s 4700/tcp # SAP System Dispatcher Security Port
sapgw00 3300/tcp # SAP System Gateway Central Instance Port
sapgw00s 4800/tcp # SAP System Gateway Security Port
sql6 7210/tcp # SAP DB
h4. 4(b) Deactivate old ports for corresponding new SAP ports, e.g.
#visinet-gui on port 3601/tcp
#cpq-tasksmart on port 3201/tcp
#netxms-mgmt on port 4701/tcp
#iwec on port 4801/tcp
#tick-port on port 3200/tcp
#netxms-agent on port 4700/tcp
#iims on port 4800/tcp
h4. 5. Add to exisitng+ /etc/sysctl.conf+
(With my original installation I remember existing entries were overwritten! )
# Kernel settings (for SAP R/3)
+kernel.sem=1250 256000 100 1024 </p><p style=”margin: 0cm 0cm 0pt” class=”MsoPlainText”>#</p> h4. 6(a). Add to /etc/groups+
h4. 6(b). Add to /etc/passwd
n4sadm:x:1001:1001:N4S System Administrator:/home/n4sadm:/bin/csh
sdb:x:1002:1000:SAP Database Administrator:/home/sdb:/bin/bash
sqdn4s:x:1003:1001:Owner of Database Instance N4S:/home/sqdn4s:/bin/csh
Note: Ensure encryption is DES or MD5 (as per SLED/SLES, not Blowfish as is openSUSE 11.1 default)
h4. 7(a). Add to /etc/hosts
192.168.155.1 FQDhostname.local.net shorthostname
(ensure 127.0.0.1 defined as localhost)
h4. 7(b). Add ifcfg-eth0:0 to /etc/sysconfig/network
h4. 7(c) S99_n4shost.sh
S99_n4shost.sh is provided in +/home/n4sadm and +calls the command +/sbin/ifconfig eth0:0 192.168.155.1 up automatically if +added to +/etc/init.d, symbolically linked to runlevel 5 (/etc/rc.d/rc5.d) and the service enabled in YAST. It should also contain in the first lines of the file the following to indicate it will start after the network service: </p><p style=”margin: 0cm 0cm 0pt” class=”MsoPlainText”>#!/bin/sh
### BEGIN INIT INFO
# Provides: n4shost
# Required-Start: $network
# Default-Start: 5
# Description: Set NetWeaver n4shost IP address
### END INIT INFO+
h4. 8.(a) Copy from backup the two files in /usr/spool/sql/ini
h4. 8(b) create (or copy) symbolic links in /usr/spool/sql to
/sapdb/data/dbspeed<br />/sapdb/data/diag<br />/sapdb/data/fifo<br />/sapdb/data/ipc<br />/sapdb/data/pid<br />/sapdb/data/pipe<br />/sapdb/data/ppid
h4. 9. Download and install latest Java2 SDK from IBM
(IBMJava2-AMD64-142-SDK-1.4.2-??.0.x86_64.rpm where ?? is latest version)
IBM SDK for 64-bit AMD/Opteron
UPDATE: Only S13 is available from the above link, which requires a patch level unavailable to the testdrive now that they have to come through solution manager. The last usable IBM Java SDK is SR12, available from:
( requires registration)
Follow note 861215 – Recommended Settings for the Linux on AMD64/EM64T JVM to set get the best settings for the J2EE engine.
These files are recreated the next time the J2EE engine starts, reporting the current JDK release.
Unlimited jurisdiction policy files can be obtained somewhere in the link
IBM SDK Policy files http://www.ibm.com/developerworks/java/jdk/security/142_64/
The ZIP file should be unpacked and the two JAR files placed in the JRE’s jre/lib/security/ directory
Note: Remember to put back symbolic link from+ /usr/lib/java+ to /opt/IBMJava2-AMD64-142. Setting $JAVA_HOME not necessary, as this already supplied by /home/n4sadm/.j2eeenv_n4shost.csh
h4. 10. Dowload 32-bit JRE from Sun
I think the J2SE 5.0 is required (JRE_1.5). For SAPGUI for Java, add to your ~/.profile
Note: This directory was where YAST put my java file, so change accordingly.
Download the latest SAPGUI for Java from ftp://ftp.sap.com/pub/sapgui/java </p><p style=”margin: 0cm 0cm 0pt” class=”MsoPlainText”>Note: Connection in SAPGUI in file+ ~/.SAPGUI/connections+</p><p style=”margin: 0cm 0cm 0pt” class=”MsoPlainText”><description>: conn=/H/192.168.155.1/S/3201</p>h4. Finished
<p style=”margin: 0cm 0cm 0pt” class=”MsoPlainText”>To check from within n4sadm console when the J2EE engine has reached “running” status</p><p style=”margin: 0cm 0cm 0pt” class=”MsoPlainText”> </p><p style=”margin: 0cm 0cm 0pt” class=”MsoPlainText”>cat /usr/sap/N4S/DVEBMGS01/work/dev_server0 for line “JLaunchISetState: change state from to ” (can take up to 25 minutes!)
although if it fails, the cause may be in other logs,, such as /usr/sap/N4S/DVEBMGS01/work/dev_disp