diff --git a/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml b/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml index 71154577c7..8310e0e715 100644 --- a/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml @@ -1,795 +1,2196 @@ Linux Binary Compatibility Restructured and parts updated by &a.jim;, 22 March 2000. Originally contributed by &a.handy; and &a.rich; Synopsis The following chapter will cover FreeBSD's Linux binary compatibility features, how to install it, and how it works. At this point, you may be asking yourself why exactly, does FreeBSD need to be able to run Linux binaries? The answer to that question is quite simple. Many companies and developers develop only for Linux, since it is the latest hot thing in the computing world. That leaves the rest of us FreeBSD users bugging these same companies and developers to put out native FreeBSD versions of their applications. The problem is, that most of these companies do not really realize how many people would use their product if there were FreeBSD versions too, and most continue to only develop for Linux. So what is a FreeBSD user to do? This is where the Linux binary compatibility of FreeBSD comes into play. In a nutshell, the compatibility allows FreeBSD users to run about 90% of all Linux applications without modification. This includes applications such as Star Office, the Linux version of Netscape, Adobe Acrobat, RealPlayer 5 and 7, VMWare, Oracle, WordPerfect, Doom, Quake, and more. It is also reported that in some situations, Linux binaries perform better on FreeBSD than they do under Linux. There are, however, some Linux-specific operating system features that are not supported under FreeBSD. Linux binaries will not work on FreeBSD if they overly use the Linux /proc filesystem (which is different from FreeBSD's /proc filesystem), or i386-specific calls, such as enabling virtual 8086 mode. For information on installing the Linux binary compatibility mode, see the next section. Installation With the advent of 3.0-RELEASE, it is no longer necessary to specify options LINUX or options COMPAT_LINUX in your kernel configuration. The Linux binary compatibility is now done via a KLD object (Kernel LoaDable object), so it can be installed on-the-fly without having to reboot. You will, however, need to have the following in /etc/rc.conf: linux_enable=YES This, in turn, triggers the following action in /etc/rc.i386: # Start the Linux binary compatibility if requested. # case ${linux_enable} in [Yy][Ee][Ss]) echo -n ' linux'; linux > /dev/null 2>&1 ;; esac If you wish to verify that the KLD is loaded, kldstat will do that: &prompt.user; kldstat Id Refs Address Size Name 1 2 0xc0100000 16bdb8 kernel 7 1 0xc24db000 d000 linux.ko If for some reason you do not want to or cannot load the KLD, then you may statically link the binary compatibility in the kernel by adding options LINUX to your kernel configuration file. Then install your new kernel as described in the kernel configuration section of this handbook. Installing Linux Runtime Libraries This can be done one of two ways, either by using the linux_base port, or by installing them manually. Installing using the linux_base port This is by far the easiest method to use when installing the runtime libraries. It is just like installing any other port from the ports collection. Simply do the following: &prompt.root; cd /usr/ports/emulators/linux_base &prompt.root; make install distclean You should now have working Linux binary compatibility. Some programs may complain about incorrect minor versions of the system libraries. In general, however, this does not seem to be a problem. Installing libraries manually If you do not have the ports collection installed, you can install the libraries by hand instead. You will need the Linux shared libraries that the program depends on and the runtime linker. Also, you will need to create a shadow root directory, /compat/linux, for Linux libraries on your FreeBSD system. Any shared libraries opened by Linux programs run under FreeBSD will look in this tree first. So, if a Linux program loads, for example, /lib/libc.so, FreeBSD will first try to open /compat/linux/lib/libc.so, and if that does not exist, it will then try /lib/libc.so. Shared libraries should be installed in the shadow tree /compat/linux/lib rather than the paths that the Linux ld.so reports. Generally, you will need to look for the shared libraries that Linux binaries depend on only the first few times that you install a Linux program on your FreeBSD system. After a while, you will have a sufficient set of Linux shared libraries on your system to be able to run newly imported Linux binaries without any extra work. How to install additional shared libraries What if you install the linux_base port and your application still complains about missing shared libraries? How do you know which shared libraries Linux binaries need, and where to get them? Basically, there are 2 possibilities (when following these instructions you will need to be root on your FreeBSD system). If you have access to a Linux system, see what shared libraries the application needs, and copy them to your FreeBSD system. Look at the following example: Let us assume you used FTP to get the Linux binary of Doom, and put it on a Linux system you have access to. You then can check which shared libraries it needs by running ldd linuxdoom, like so: &prompt.user; ldd linuxdoom libXt.so.3 (DLL Jump 3.1) => /usr/X11/lib/libXt.so.3.1.0 libX11.so.3 (DLL Jump 3.1) => /usr/X11/lib/libX11.so.3.1.0 libc.so.4 (DLL Jump 4.5pl26) => /lib/libc.so.4.6.29 You would need to get all the files from the last column, and put them under /compat/linux, with the names in the first column as symbolic links pointing to them. This means you eventually have these files on your FreeBSD system: /compat/linux/usr/X11/lib/libXt.so.3.1.0 /compat/linux/usr/X11/lib/libXt.so.3 -> libXt.so.3.1.0 /compat/linux/usr/X11/lib/libX11.so.3.1.0 /compat/linux/usr/X11/lib/libX11.so.3 -> libX11.so.3.1.0 /compat/linux/lib/libc.so.4.6.29 /compat/linux/lib/libc.so.4 -> libc.so.4.6.29
Note that if you already have a Linux shared library with a matching major revision number to the first column of the ldd output, you will not need to copy the file named in the last column to your system, the one you already have should work. It is advisable to copy the shared library anyway if it is a newer version, though. You can remove the old one, as long as you make the symbolic link point to the new one. So, if you have these libraries on your system: /compat/linux/lib/libc.so.4.6.27 /compat/linux/lib/libc.so.4 -> libc.so.4.6.27 and you find a new binary that claims to require a later version according to the output of ldd: libc.so.4 (DLL Jump 4.5pl26) -> libc.so.4.6.29 If it is only one or two versions out of date in the in the trailing digit then do not worry about copying /lib/libc.so.4.6.29 too, because the program should work fine with the slightly older version. However, if you like, you can decide to replace the libc.so anyway, and that should leave you with: /compat/linux/lib/libc.so.4.6.29 /compat/linux/lib/libc.so.4 -> libc.so.4.6.29
The symbolic link mechanism is only needed for Linux binaries. The FreeBSD runtime linker takes care of looking for matching major revision numbers itself and you do not need to worry about it.
Installing Linux ELF binaries ELF binaries sometimes require an extra step of branding. If you attempt to run an unbranded ELF binary, you will get an error message like the following; &prompt.user; ./my-linux-elf-binary ELF binary type not known Abort To help the FreeBSD kernel distinguish between a FreeBSD ELF binary from a Linux binary, use the &man.brandelf.1; utility. &prompt.user; brandelf -t Linux my-linux-elf-binary The GNU toolchain now places the appropriate branding information into ELF binaries automatically, so you this step should become increasingly more rare in the future. Configuring the host name resolver If DNS does not work or you get this message: resolv+: "bind" is an invalid keyword resolv+: "hosts" is an invalid keyword You will need to configure a /compat/linux/etc/host.conf file containing: order hosts, bind multi on The order here specifies that /etc/hosts is searched first and DNS is searched second. When /compat/linux/etc/host.conf is not installed, linux applications find FreeBSD's /etc/host.conf and complain about the incompatible FreeBSD syntax. You should remove bind if you have not configured a name server using the /etc/resolv.conf file.
Installing Mathematica Updated for Mathematica version 4.x by &a.murray and merged with work by Bojan Bistrovic bojanb@physics.odu.edu. This document describes the process of installing the Linux version of Mathematica 4.X onto a FreeBSD system. The Linux version of Mathematica runs perfectly under FreeBSD however the binaries shipped by Wolfram need to be branded so that FreeBSD knows to use the Linux ABI to execute them. The Linux version of Mathematica or Mathematica for Students can be ordered directly from Wolfram at http://www.wolfram.com/. Branding the Linux binaries The Linux binaries are located in the Unix directory of the Mathematica CDROM distributed by Wolfram. You need to copy this directory tree to your local hard drive so that you can brand the Linux binaries with &man.brandelf.1; before running the installer: &prompt.root; mount /cdrom &prompt.root; cp -rp /cdrom/Unix/ /localdir/ &prompt.root; brandelf -t Linux /localdir/Files/SystemFiles/Kernel/Binaries/Linux/* &prompt.root; brandelf -t Linux /localdir/Files/SystemFiles/FrontEnd/Binaries/Linux/* &prompt.root; brandelf -t Linux /localdir/Files/SystemFiles/Installation/Binaries/Linux/* &prompt.root; brandelf -t Linux /localdir/Files/SystemFiles/Graphics/Binaries/Linux/* &prompt.root; brandelf -t Linux /localdir/Files/SystemFiles/Converters/Binaries/Linux/* &prompt.root; brandelf -t Linux /localdir/Files/SystemFiles/LicenseManager/Binaries/Linux/mathlm &prompt.root; cd /localdir/Installers/Linux/ &prompt.root; ./MathInstaller Alternatively, you can simply set the default ELF brand to Linux for all unbranded binaries with the command: &prompt.root; sysctl -w kern.fallback_elf_brand=3 This will make FreeBSD assume that unbranded ELF binaries use the Linux ABI and so you should be able to run the installer straight from the CDROM. Obtaining your Mathematica Password Before you can run Mathematica you will have to obtain a password from Wolfram that corresponds to your machine ID. Once you have installed the Linux compatibility runtime libraries and unpacked Mathematica you can obtain the machine ID by running the program mathinfo in the Install directory. This machine ID is based solely on the MAC address of your first ethernet card. &prompt.root; cd /localdir/Files/SystemFiles/Installation/Binaries/Linux &prompt.root; mathinfo disco.example.com 7115-70839-20412 When you register with Wolfram, either by email, phone or fax, you will give them the machine ID and they will respond with a corresponding password consisting of groups of numbers. You can then enter this information when you attempt to run Mathematica for the first time exactly as you would for any other Mathematica platform. Running the Mathematica front end over a network Mathematica uses some special fonts to display characters not present in any of the standard font sets (integrals, sums, greek letters, etc.). The X protocol requires these fonts to be install locally. This means you will have to copy these fonts from the CDROM or from a host with Mathematica installed to your local machine. These fonts are normally stored in /cdrom/Unix/Files/SystemFiles/Fonts on the CDROM, or /usr/local/mathematica/SystemFiles/Fonts on your hard drive. The actual fonts are in the subdirectories Type1 and X. There are several ways to use them, as described below. The first way is to copy them into one of the existing font directories in /usr/X11R6/lib/X11/fonts. This will require editing the fonts.dir file, adding the font names to it, and changing the number of fonts on the first line. Alternatively, you should also just be able to run mkfontdir in the directory you have copied them to. The second way to do this is to copy the directories to /usr/X11R6/lib/X11/fonts: &prompt.root; cd /usr/X11R6/lib/X11/fonts &prompt.root; mkdir X &prompt.root; mkdir MathType1 &prompt.root; cd /cdrom/Unix/Files/SystemFiles/Fonts &prompt.root; cp X/* /usr/X11R6/lib/X11/fonts/X &prompt.root; cp Type1/* /usr/X11R6/lib/X11/fonts/MathType1 &prompt.root; cd /usr/X11R6/lib/X11/fonts/X &prompt.root; mkfontdir &prompt.root; cd ../MathType1 &prompt.root; mkfontdir Now add the new font directories to your font path: &prompt.root; xset fp+ /usr/X11R6/lib/X11/fonts/X &prompt.root; xset fp+ /usr/X11R6/lib/X11/fonts/MathType1 &prompt.root; xset fp rehash If you are using the XFree86 server, you can have these font directories loaded automatically by adding them to your XF86Config file. If you do not already have a directory called /usr/X11R6/lib/X11/fonts/Type1, you can change the name of the MathType1 directory in the example above to Type1. Installing Oracle Contributed by Marcel Moolenaar marcel@cup.hp.com Preface This document describes the process of installing Oracle 8.0.5 and Oracle 8.0.5.1 Enterprise Edition for Linux onto a FreeBSD machine Installing the Linux environment Make sure you have both linux_base and linux_devtools from the ports collection installed. These ports are added to the collection after the release of FreeBSD 3.2. If you are using FreeBSD 3.2 or an older version for that matter, update your ports collection. You may want to consider updating your FreeBSD version too. If you run into difficulties with linux_base-6.1 or linux_devtools-6.1 you may have to use version 5.2 of these packages. If you want to run the intelligent agent, you'll also need to install the Red Hat TCL package: tcl-8.0.3-20.i386.rpm. The general command for installing packages with the official RPM port is : &prompt.root; rpm -i --ignoreos --root /compat/linux --dbpath /var/lib/rpm package Installation of the package should not generate any errors. Creating the Oracle environment Before you can install Oracle, you need to set up a proper environment. This document only describes what to do specially to run Oracle for Linux on FreeBSD, not what has been described in the Oracle installation guide. Kernel Tuning As described in the Oracle installation guide, you need to set the maximum size of shared memory. Don't use SHMMAX under FreeBSD. SHMMAX is merely calculated out of SHMMAXPGS and PGSIZE. Therefore define SHMMAXPGS. All other options can be used as described in the guide. For example: options SHMMAXPGS=10000 options SHMMNI=100 options SHMSEG=10 options SEMMNS=200 options SEMMNI=70 options SEMMSL=61 Set these options to suit your intended use of Oracle. Also, make sure you have the following options in your kernel config-file: options SYSVSHM #SysV shared memory options SYSVSEM #SysV semaphores options SYSVMSG #SysV interprocess communication Oracle account Create an Oracle account just as you would create any other account. The Oracle account is special only that you need to give it a Linux shell. Add /compat/linux/bin/bash to /etc/shells and set the shell for the Oracle account to /compat/linux/bin/bash. Environment Besides the normal Oracle variables, such as ORACLE_HOME and ORACLE_SID you must set the following environment variables: Variable Value LD_LIBRARY_PATH $ORACLE_HOME/lib CLASSPATH $ORACLE_HOME/jdbc/lib/classes111.zip PATH /compat/linux/bin /compat/linux/sbin /compat/linux/usr/bin /compat/linux/usr/sbin /bin /sbin /usr/bin /usr/sbin /usr/local/bin $ORACLE_HOME/bin It is advised to set all the environment variables in .profile. A complete example is: ORACLE_BASE=/oracle; export ORACLE_BASE ORACLE_HOME=/oracle; export ORACLE_HOME LD_LIBRARY_PATH=$ORACLE_HOME/lib export LD_LIBRARY_PATH ORACLE_SID=ORCL; export ORACLE_SID ORACLE_TERM=386x; export ORACLE_TERM CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip export CLASSPATH PATH=/compat/linux/bin:/compat/linux/sbin:/compat/linux/usr/bin:/compat/linux/usr/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:$ORACLE_HOME/bin export PATH Installing Oracle Due to a slight inconsistency in the Linux emulator, you need to create a directory named .oracle in /var/tmp before you start the installer. Either make it world writable or let it be owner by the oracle user. You should be able to install Oracle without any problems. If you have problems, check your Oracle distribution and/or configuration first! After you have installed Oracle, apply the patches described in the next two subsections. A frequent problem is that the TCP protocol adapter is not installed right. As a consequence, you cannot start any TCP listeners. The following actions help solve this problem: &prompt.root; cd $ORACLE_HOME/network/lib &prompt.root; make -f ins_network.mk ntcontab.o &prompt.root; cd $ORACLE_HOME/lib &prompt.root; ar r libnetwork.a ntcontab.o &prompt.root; cd $ORACLE_HOME/network/lib &prompt.root; make -f ins_network.mk install Don't forget to run root.sh again! Patching root.sh When installing Oracle, some actions, which need to be performed as root, are recorded in a shell script called root.sh. root.sh is written in the orainst directory. Apply the following patch to root.sh, to have it use to proper location of chown or alternatively run the script under a Linux native shell. *** orainst/root.sh.orig Tue Oct 6 21:57:33 1998 --- orainst/root.sh Mon Dec 28 15:58:53 1998 *************** *** 31,37 **** # This is the default value for CHOWN # It will redefined later in this script for those ports # which have it conditionally defined in ss_install.h ! CHOWN=/bin/chown # # Define variables to be used in this script --- 31,37 ---- # This is the default value for CHOWN # It will redefined later in this script for those ports # which have it conditionally defined in ss_install.h ! CHOWN=/usr/sbin/chown # # Define variables to be used in this script When you don't install Oracle from CD, you can patch the source for root.sh. It is called rthd.sh and is located in the orainst directory in the source tree. Patching genclntsh The script genclntsh is used to create a single shared client library. It is used when building the demos. Apply the following patch to comment out the definition of PATH: *** bin/genclntsh.orig Wed Sep 30 07:37:19 1998 --- bin/genclntsh Tue Dec 22 15:36:49 1998 *************** *** 32,38 **** # # Explicit path to ensure that we're using the correct commands #PATH=/usr/bin:/usr/ccs/bin export PATH ! PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin export PATH # # each product MUST provide a $PRODUCT/admin/shrept.lst --- 32,38 ---- # # Explicit path to ensure that we're using the correct commands #PATH=/usr/bin:/usr/ccs/bin export PATH ! #PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin export PATH # # each product MUST provide a $PRODUCT/admin/shrept.lst Running Oracle When you have followed the instructions, you should be able to run Oracle as if it was run on Linux itself. + + + + + + Installing SAP R/3 (4.6B - IDES) + Contributed by Holger Kipp holger.kipp@alogis.com + Converted to SGML by &a.logo; + + + + Preface + + This document describes a possible way of installing a SAP + R/3 4.6B IDES-System with Oracle 8.0.5 for Linux onto a FreeBSD + 4.3 machine, including the installation of FreeBSD 4.3 stable and + Oracle 8.0.5. + + Even though this document tries to describe all important + steps in a greater detail, it is not intended as a replacement for + the Oracle and SAP R/3 installation guides. + + Please see the documentation that comes with the SAP R/3 + Linux edition for SAP- and Oracle-specific questions, as well as + resources from Oracle and SAP OSS. + + + + Software + + The following CD-ROMs have been used for + SAP-installation: + + + + + Name Number Description + + + + + KERNEL 51009113 SAP Kernel Oracle / + Installation / AIX, Linux, Solaris + + + RDBMS 51007558 Oracle / RDBMS 8.0.5.X / + Linux + + + EXPORT1 51010208 IDES / DB-Export / Disc + 1 of 6 + + + EXPORT2 51010209 IDES / DB-Export / Disc + 2 of 6 + + EXPORT3 51010210 IDES / DB-Export / + Disc3 of 6 + + + EXPORT4 51010211 IDES / DB-Export / + Disc4 of 6 + + + EXPORT5 51010212 IDES / DB-Export / + Disc5 of 6 + + + EXPORT6 51010213 IDES / DB-Export / + Disc6 of 6 + + + + + + Additionally, I used the Oracle 8 Server (Pre-production + version 8.0.5 for Linux, Kernel Version 2.0.33) CD which is not + really necessary, and of course FreeBSD 4.3 stable (it was only a + few days past 4.3 RELEASE). + + + SAP-Notes + + The following notes should be read before installing SAP R/3 + or proved to be useful during installation: + + + + + + Number + Title + + + + + 0171356 SAP Software auf Linux: grundlegenden + Anmerkungen + + + 0201147 INST: 4.6C R/3 Inst. on UNIX - + Oracle + + + 0373203 Update / Migration Oracle 8.0.5 --> + 8.0.6/8.1.6 LINUX + + + 0072984 Release of Digital UNIX 4.0B for + Oracle + + + 0130581 R3SETUP step DIPGNTAB terminates + + + 0144978 Your system has not been installed + correctly + + + 0162266 Questions and tips for R3SETUP on Windows + NT / W2K + + + + + + + + + Hardware-Requirements + + The following equipment is sufficient for a SAP R/3 System + (4.6B): + + + + + + Component + 4.6B + 4.6C + + + + + Processor + 2 x 800MHz Pentium III + 2 x 800MHz Pentium III + + + Memory + 1GB ECC + 2GB ECC + + + Hard Disc Space + 50-60GB (IDES) + 50-60GB (IDES) + + + + + For use in production, Xeon-Processors with large cache, + high-speed disc access (SCSI, RAID hardware controller), USV and + ECC-RAM is recommended. The large amount of Hard disc space is + due to the preconfigured IDES System, which creates 27 GB of + database files during installation. Usually after installation it + is then necessary to extend some tablespaces. + + I used a dual processor board with 2 800MHz Pentium III + processors, Adaptec 29160 Ultra160 SCSI adapter (for accessing a + 40/80 GB DLT tape drive and CD-ROM), Mylex AcelleRAID (2 channels, + firmware 6.00-1-00 with 32MB RAM). To the Mylex Raid-controller + are attached two 17GB hard discs (mirrored) and four 36GB hard + discs (RAID level 5). + + + + + Installation of FreeBSD 4.3 stable + + First I installed FreeBSD 4.3 stable. I did the + default-installation via ftp. + + + Installation via FTP Get the diskimages + kern.flp and mfsroot.flp and put them on floppy disks (I got + mine from ftp7.de.freebsd.org. Please choose the appropriate + mirror). + + + &prompt.root; dd if=kern.flp of=/dev/fd0 + &prompt.root; dd if=mfsroot.flp of=/dev/fd0 + + Don't forget to use different disks for the two images + :-), then boot from the floppy with the kern.flp-image on it and + follow instructions. I used the following disk layout: + + + + + + Filesystem + Size (1k-blocks) + Size (GB) + Mounted on + + + + + /dev/da0s1a + 1.016.303 + 1 + / + + + /dev/da0s1b + + 6 + <swap> + + + /dev/da0s1e + 2.032.623 + 2 + /var + + + /dev/da0s1f + 8.205.339 + 8 + /usr + + + /dev/da1s1e + 45.734.361 + 45 + /compat/linux/oracle + + + /dev/da1s1f + 2.032.623 + 2 + /compat/linux/sapmnt + + + /dev/da1s1g + 2.032.623 + 2 + /compat/linux/usr/sap + + + + + + I had to configure and initialise the two logical drives + with the Mylex software beforehand. It is located on the board + itself and can be started during the boot phase of the + pc. + Please note that this disk layout differs + slightly from the SAP recommendations, as SAP suggests mounting + the oracle-subdirectories (and some others) separately - I + decided to just create them as real subdirectories for + simplicity. + + + + + + Get the latest stable-sources + + For FreeBSD 4.3 stable onwards, it is quite easy to get + the latest stable sources. With the older versions of FreeBSD, I + had my own script located in /etc/cvsup. Setting up cvsup for + FreeBSD 4.3 is quite easy. As user root do + the following: + + + &prompt.root; cp /etc/defaults/make.conf /etc/make.conf + &prompt.root; vi /etc/make.conf + + The file /etc/make.conf requires the + following entries to be active: + + SUP_UPDATE= yes +SUP= /usr/local/bin/cvsup +SUPFLAGS= -g -L 2 +SUPHOST= cvsup8.FreeBSD.org +SUPFILE= /usr/share/examples/cvsup/stable-supfile +PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile +DOCSUPFILE= /usr/share/examples/cvsup/doc-supfile + + Change the SUPHOST-value + appropriately. The supfiles in + /usr/share/examples/cvsup should be + fine. If you don't want to load all the docfiles, leave the + corresponding DOCSUPFILE-entry inactive. + Starting cvsup to get the latest stable-sources is then very + easy: + + + &prompt.root; cd /usr/src + &prompt.root; make update + + + + + + Make world and a new kernel + + The first thing to do is to install the sources. + As user root, do the following: + + + &prompt.root; cd /usr/src + &prompt.root; make world + + If this goes through, one can then continue creating and + configuring the new kernel. Usually this is where to customize + the kernel configuration file. As the computer is named + troubadix, the natural name for the config file also is + troubadix: + + + &prompt.root; cd /usr/src/sys/i386/conf + &prompt.root; cp GENERIC TROUBADIX + &prompt.root; vi TROUBADIX + + At this stage one can define the drivers to use and not to + use, etc. See the appropriate documentation or have a look at + file LINT for some additional + explanations. + + One can then also include the parameters as described + below Creating the new kernel then requires: + + + &prompt.root; cd /usr/src/sys/i386/conf + &prompt.root; config TROUBADIX + &prompt.root; cd /usr/src/sys/compile/TROUBADIX + &prompt.root; make depend + &prompt.root; make + &prompt.root; make install + + + After make install finished + successfully, one should reboot the computer to have the new + kernel available. + + + + + + Installing the Linux environment + + I had some trouble downloading the required RPM-files (for + 4.3 stable, 2nd May 2001), so you might try one of the following + locations (if all the others fail and the following aren't out of + date): + + + ftp7.de.freebsd.org/pub/FreeBSD/distfiles/rpm + ftp.redhat.com/pub/redhat/linux/6.1/en/os/i386/RedHat/RPMS + + + + Installing Linux base-system + <para>First the linux base-system needs to be installed (as root):</para> + <screen> + &prompt.root; <userinput>cd /usr/ports/emulators/linux_base</userinput> + &prompt.root; <userinput>make package</userinput> </screen> + </sect3> + + + <sect3 id="installinglinuxdevelopment"> + <title>Installing Linux development + + Next, the linux development is needed: + + + &prompt.root; cd /usr/ports/devel/linux_devtools + &prompt.root; make package + + + + + + Installing necessary RPMs + + To start the R3SETUP-Program, pam support is needed. As + this also requires some other packages, I ended up installing + several packages. After that, pam still complained about a + missing package, so I forced the installation and it worked. I + wonder if the other packages are really needed or if it would + have been sufficient to install the pam-package. + + Anyway, here is the list of packages I installed: + + + cracklib-2.7-5.i386.rpm + cracklib-dicts-2.7-5.i386.rpm + pwdb-0.60-1.i386.rpm + pam-0.68-7.i386.rpm + + + I installed these packages with the following + command: + + + &prompt.root; rpm -i --ignoreos --root /compat/linux --dbpath /var/lib/rpm <package_name> + + except for the pam package, which I forced with + + + &prompt.root rpm -i --ignoreos --nodeps --root /compat/linux --dbpath /var/lib/rpm pam-0.68-7.i386.rpm + + For Oracle to run the intelligent agent, I also hat to + install the following RedHat TCL package (as is steted in the + FreeBSD Handbook): tcl-8.0.5-30.i386.rpm (otherwise the + relinking during Oracle install won't work). There are some + other issues regarding relinking of Oracle, but that is a + Oracle-Linux issue, not FreeBSD specific as far as I understand + it. + + + + + + + Creating the SAP/R3 environment + + + Creating the necessary filesystems and mountpoints + + For a simple installation, it is sufficient to create the + following filesystems: + + + + + + mountpoint + size in GB + + + + + /compat/linux/oracle + 45 GB + + + /compat/linux/sapmnt + 2 GB + + + /compat/linux/usr/sap + 2 GB + + + + + + I also created some links, so FreeBSD will also find the + correct path: + + + &prompt.root; ln -s /compat/linux/oracle /oracle + &prompt.root; ln -s /compat/linux/sapmnt /sapmnt + &prompt.root; ln -s /compat/linux/usr/sap /usr/sap + + + + Creating users and directories + + SAP R/3 needs two users and three groups. The usernames + depend on the SAP system id (SID) which consists of three + letters. Some of these SIDs are reserved by SAP (for example + SAP and NIX. For a + complete list please see the SAP documentation). For the IDES + installation I used IDS. We have therefore + the following groups (group ids might differ, these are just the + values I used with my installation): + + + + + + group id + group name + description + + + + + 100 + dba + Data Base Administrator + + + 101 + sapsys + SAP System + + + 102 + oper + Data Base Operator + + + + + + For a default Oracle-Installation, only group + dba is used. As + oper-group, one also uses group + dba (see Oracle- and SAP-documentation for further + information). + + We also need the following users: + + + + + + user id + username + generic name + group + additional groups + description + + + + + 1000 + idsadm + <sid>adm + sapsys + oper + SAP Administrator + + + 1002 + oraids + ora<sid> + dba + oper + DB Administrator + + + + + + Adding the users with adduser requires the following + (please note shell and home directory) entries for + SAP-Administrator: + + Name: idsadm <sid>adm +Password: ****** +Fullname: SAP IDES Administrator +Uid: 1000 +Gid: 101 (sapsys) +Class: +Groups: sapsys dba +HOME: /home/idsadm /home/<sid>adm +Shell: /bin/sh + + and for Database-Administrator: + + Name: oraids ora<sid> +Password: ****** +Fullname: Oracle IDES Administrator +Uid: 1002 +Gid: 100 (dba) +Class: +Groups: dba +HOME: /oracle/IDS /oracle/<sid> +Shell: /bin/sh + + This should also include group oper + in case you are using both groups dba and + oper. + + + + + Creating directories + + These directories are usually created as separate + filesystems. This depends entirely on your requirements. I + choose to create them as simple directories, as they are all + located on the same RAID 5 anyway: + + First we'll set owners and right of some directories (as + user root): + + + &prompt.root; chmod 775 /oracle + &prompt.root; chmod 777 /sapmnt + &prompt.root; chown root:dba /oracle + &prompt.root; chown idsadm:sapsys /compat/linux/usr/sap + &prompt.root; chmow 775 /compat/linux/usr/sap + + Second we'll create directories as user ora<sid>. These + will all be subdirectories of /oracle/IDS: + + + &prompt.root; su - oraids + &prompt.root; mkdir mirrlogA mirrlogB origlogA origlogB + &prompt.root; mkdir sapdata1 sapdata2 sapdata3 sapdata4 sapdata5 sapdata6 + &prompt.root; mkdir saparch sapreorg + &prompt.root; exit + + In the third step we create directories as user idsadm + (<sid>adm): + + + &prompt.root; su - idsadm + &prompt.root; cd /usr/sap + &prompt.root; mkdir IDS + &prompt.root; mkdir trans + &prompt.root; exit + + + + Entries in /etc/services + + SAP R/3 requires some entries in file + /etc/services , which will not be set + correctly during installation under FreeBSD. Please add the + following entries (you need at least those entries corresponding + to the instance number - in this case, 00. + It'll do no harm adding all entries from 00 + to 99 for dp, + gw, sp and + ms); + + sapdp00 3200/tcp # SAP Dispatcher. 3200 + Instance-Number +sapgw00 3300/tcp # SAP Gateway. 3300 + Instance-Number +sapsp00 3400/tcp # 3400 + Instance-Number +sapms00 3500/tcp # 3500 + Instance-Number +sapmsIDS 3600/tcp # SAP Message Server. 3600 + Instance-Number + + + + Necessary locales + + SAP requires at least two locales that aren't part of the + default RedHat installation. SAP offers the required RPMs as + download from their ftp-server (which is only accessible if you + are a customer with OSS-access). See note 0171356 for a list of + RPMs you need. + + It is also possible to just create appropriate links (for + example from de_DE and + en_US ), but I wouldn't recommend this for + a production system (so far it worked with the IDES system + without any problems, though). The following locales are + needed: + + de_DE.ISO-8859-1 +en_US.ISO-8859-1 + + If they are not present, there will be some problems + during the installation. If these are then subsequently ignored + (eg by setting the status of the offending steps to OK in file + CENTRDB.R3S), it will be impossible to log onto the SAP-system + without some additional effort. + + + + + Kernel Tuning + + SAP R/3 Systems need a lot of resources. I therefore + added the following parameters to my kernel config-file: + + # Set these for memory pigs (SAP and Oracle): +options MAXDSIZ="(1024*1024*1024)" +options DFLDSIZ="(1024*1024*1024)" # System V options needed. +options SYSVSHM #SYSV-style shared memory +options SHMMAXPGS=262144 #max amount of shared mem. pages +options SHMMNI=256 #max number of shared memory ident if. +options SHMSEG=100 #max shared mem.segs per process +options SYSVMSG #SYSV-style message queues +options MSGSEG=32767 #max num. of mes.segments in system +options MSGSSZ=32 #size of msg-seg. MUST be power of 2 +options MSGMNB=65535 #max char. per message queue +options MSGTQL=2046 #max amount of msgs in system +options SYSVSEM #SYSV-style semaphores +options SEMMNU=256 #number of semaphore UNDO structures +options SEMMNS=1024 #number of semaphores in system +options SEMMNI=520 #number of semaphore indentifiers +options SEMUME=100 #number of UNDO keys + + + The minimum values are specified in the documentation that + comes from SAP. As there is no description for Linux, see the + HP-UX-section (32-bit) for further information. + + + + + + Installing SAP R/3 + + + Preparing SAP CD-ROMs + + There are lots of CD-ROMs to mount and unmount during + installation. Assuming you have enough CD-ROM-drives, you can + just mount them all. I decided to copy the CD-ROM contents to + corresponding directories: + + /oracle/IDS/sapreorg/<cd-name> + + where <cd-name> was one of KERNEL, RDBMS, EXPORT1, + EXPORT2, EXPORT3, EXPORT4, EXPORT5 and EXPORT6. All the + filenames should be in capital letters, otherwise use the -g + option for mounting. So use the following commands: + + + &prompt.root; mount_cd9660 -g /dev/cd0a /mnt + &prompt.root; cp -R /mnt/* /oracle/IDS/sapreorg/<cd-name> + &prompt.root; umount /mnt + + + + Running the install-script + + First we need to prepare an install-directory: + + + &prompt.root; cd /oracle/IDS/sapreorg + &prompt.root; mkdir install + &prompt.root; cd install + + Then the install-script is started, which will copy nearly + all the relevant files into the install-directory: + + /oracle/IDS/sapreorg/KERNEL/UNIX/INSTTOOL.SH + + As this is an IDES-Installation with a fully customized + SAP R/3 Demo-System, we have six instead of just three + EXPORT-CDs. At this point the installation template CENTRDB.R3S + is for installing a standard central instance (R/3 and + Database), not an IDES central instance, so copy the + corresponding CENTRDB.R3S from the EXPORT1 directory, otherwise + R3SETUP will only ask for three EXPORT-CDs. + + + + Start R3SETUP + + Make sure LD_LIBRARY_PATH is set correctly: + + + &prompt.root; export LD_LIBRARY_PATH=/oracle/IDS/lib:/sapmnt/IDS/exe:/oracle/805_32/lib + + Start R3SETUP as user root from installation + directory: + + + &prompt.root; cd /oracle/IDS/sapreorg/install + &prompt.root; ./R3SETUP -f CENTRDB.R3S + + The script then asks some questions (defaults in brackets, + followed by actual input): + + + + + + Question + Default + Input + + + + + Enter SAP System ID + [C11] + IDS<ret> + + + Enter SAP Instance Number + [00] + <ret> + + + Enter SAPMOUNT Directory + [/sapmnt] + <ret> + + + Enter name of SAP central host + [troubadix.domain.de] + <ret> + + + Enter name of SAP db host + [troubadix] + <ret> + + + Select character set + [1] (WE8DEC) + <ret> + + + Enter Oracle server version (1) Oracle 8.0.5, (2) Oracle 8.0.6, (3) Oracle 8.1.5, (4) Oracle 8.1.6 + + 1<ret> + + + Extract Oracle Client archive + [1] (Yes, extract) + <ret> + + + Enter path to KERNEL CD + [/sapcd] + /oracle/IDS/sapreorg/KERNEL + + + Enter path to RDBMS CD + [/sapcd] + /oracle/IDS/sapreorg/RDBMS + + + Enter path to EXPORT1 CD + [/sapcd] + /oracle/IDS/sapreorg/EXPORT1 + + + Directory to copy EXPORT1 CD + [/oracle/IDS/sapreorg/CD4_DIR] + <ret> + + + Enter path to EXPORT2 CD + [/sapcd] + /oracle/IDS/sapreorg/EXPORT2 + + + Directory to copy EXPORT2 CD + [/oracle/IDS/sapreorg/CD5_DIR] + <ret> + + + Enter path to EXPORT3 CD + [/sapcd] + /oracle/IDS/sapreorg/EXPORT3 + + + Directory to copy EXPORT3 CD + [/oracle/IDS/sapreorg/CD6_DIR] + <ret> + + + Enter path to EXPORT4 CD + [/sapcd] + /oracle/IDS/sapreorg/EXPORT4 + + + Directory to copy EXPORT4 CD + [/oracle/IDS/sapreorg/CD7_DIR] + <ret> + + + Enter path to EXPORT5 CD + [/sapcd] + /oracle/IDS/sapreorg/EXPORT5 + + + Directory to copy EXPORT5 CD + [/oracle/IDS/sapreorg/CD8_DIR] + <ret> + + + Enter path to EXPORT6 CD + [/sapcd] + /oracle/IDS/sapreorg/EXPORT6 + + + Directory to copy EXPORT6 CD + [/oracle/IDS/sapreorg/CD9_DIR] + <ret> + + + Enter amount of RAM for SAP + DB + + 850<ret> (in Megabytes) + + + Service Entry Message Server + [3600] + <ret> + + + Enter Group-ID of sapsys + [101] + <ret> + + + Enter Group-ID of oper + [102] + <ret> + + + Enter Group-ID of dba + [100] + <ret> + + + Enter User-ID of <sid>adm + [1000] + <ret> + + + Enter User-ID of ora<sid> + [1002] + <ret> + + + Number of parallel procs + [2] + <ret> + + + + + + If I had not copied the CDs to the different locations, + then the SAP-Installer can't find the CD needed (identified by + the LABEL.ASC-File on CD) and would then ask you to insert / + mount the CD and confirm or enter the mountpath. + + The CENTRDB.R3S might not be error-free. In my case, it + requested EXPORT4 again (but indicated the correct key (6_LOCATI + ON, then 7_LOCATION etc.), so one can just continue with + entering the correct values. Don't get irritated. + + Apart from some problems mentioned below, everything + should go straight throught up to the point where the Oracle + database software needs to be installed. + + + + + Installing Oracle 8.0.5 + + Please see the corresponding SAP-Notes and Oracle Readmes + regarding Linux and Oracle DB for possible problems. Most if not + all problems stem from incompatible libraries + + For more information on installing Oracle, refer to + the Installing Oracle chapter + + + Installing the Oracle 8.0.5 with orainst + + If Oracle 8.0.5 is to be used, some additional libraries + are needed for successfully relinking, as Oracle 8.0.5 was + linked with an old glibc (RedHat 6.0), but RedHat 6.1 already + uses a new glibc. So you have to install the following + additional packages to ensure that linking will work: + + compat-libs-5.2-2.i386.rpm + compat-glibc-5.2-2.0.7.2.i386.rpm + compat-egcs-5.2-1.0.3a.1.i386.rpm + compat-egcs-c++-5.2-1.0.3a.1.i386.rpm + compat-binutils-5.2-2.9.1.0.23.1.i386.rpm + + See the corresponding SAP-Notes or Oracle Readmes for + further information. If this is no option (at the time of + installation I didn't have enough time to check this), one could + use the original binaries, or use the relinked binaries from an + original RedHat System. + + For compiling the intelligent agent, the RedHat TCL + package must be installed. If you can't get + tcl-8.0.3-20.i386.rpm, a newer one like + tcl-8.0.5-30.i386.rpm for RedHat 6.1 should + also do. + + Apart from relinking, the installation is + straightforward: + + + &prompt.root; su - oraids + &prompt.root; export TERM=xterm + &prompt.root; export ORACLE_TERM=xterm + &prompt.root; export ORACLE_HOME=/oracle/IDS + &prompt.root; cd /ORACLE_HOME/orainst_sap + &prompt.root; ./orainst + + Confirm all Screens with Enter until the software is + installed, except that one has to deselect the Oracle + On-Line Text Viewer , as this is not currently + available for Linux. Oracle then wants to relink with + i386-glibc20-linux-gcc instead of the + available gcc, egcs or + i386-redhat-linux-gcc . + + Due to time constrains I decided to use the binaries from + an Oracle 8.0.5 PreProduction release, after the first attempt + at getting the version from the RDBMS-CD working, failed, and + finding / accessing the correct RPMs was a nightmare at that + time. + + + + + Installing the Oracle 8.0.5 Pre-Production release for + Linux (Kernel 2.0.33) + + This installation is quite easy. Mount the CD, start the + installer. It will then ask for the location of the Oracle home + directory, and copy all binaries there. I did not delete the + remains of my previous RDBMS-installation tries, though. + + Afterwards, Oracle Database could be started with no + problems. + + + + + Continue with SAP R/3 installation + + First check the environment settings of users idsamd + (<sid>adm) and oraids (ora<sid>). They should now both have the + files .profile , .login + and .cshrc which are all using + hostname. In case the system's hostname is + the fully qualified name, you need to change + hostname to hostname -s + within all three files. + + + Database load + + Afterwards, R3SETUP can either be restarted or continued + (depending on whether exit was chosen or not). R3SETUP then + creates the tablespaces and loads the data from EXPORT1 to + EXPORT6 (remember, it is an IDES system, otherwise it would only + be EXPORT1 to EXPORT3) with R3load into the database. + + When the database load is finished (might take a few + hours), some passwords are requested. For test installations, + one can use the well known default passwords (use different ones + if security is an issue!): + + + + + + Question + Input + + + + + Enter Password for sapr3 + sap<ret> + + + Confirum Password for sapr3 + sap<ret> + + + Enter Password for sys + change_on_install<ret> + + + Confirm Password for sys + change_on_install<ret> + + + Enter Password for system + manager<ret> + + + Confirm Password for system + manager<ret> + + + + + + At this point I had a few problems with dipgntab. + + + + Listener + + Start the Oracle-Listener as user oraids (ora<sid>) as + follows: + + umask 0; lsnrctl start + + Otherwise you might get ORA-12546 as the sockets won't + have the correct permissions. See SAP note 072984. + + + + + Post-installation steps + + + Request SAP R/3 license key + + This is needed, as the temporary license is only valid for + four weeks. Don't forget to enter the correct Operating System: + (X) Other: FreeBSD 4.3 Stable. First get + the hardware key. Logon as user idsadm and + call saplicense: + + &prompt.root; /sapmnt/IDS/exe/saplicense -get + + Calling saplicense without options + gives a list of options. Upon receiving the license key, it can + be installed using + + &prompt.root; /sapmnt/IDS/exe/saplicense -install + + You are then required to enter the following + values: + + SAP SYSTEM ID = <SID, 3 chars> +CUSTOMER KEY = <hardware key, 11 chars> +INSTALLATION NO = <installation, 10 digits> +EXPIRATION DATE = <yyyymmdd, usually "99991231"> +LICENSE KEY = <license key, 24 chars> + + + + Creating Users + + Create a user within client 000 (for some tasks required + to be done within client 000, but with a user different from + users sap* and + ddic). As a username, I usually choose + wartung (or service in + English). Profiles required are sap_new + and sap_all. For additional safety the + passwords of default users within all clients should be changed + (this includes users sap* and + ddic). + + + + Configure Transport System, Profile, Operation Modes, etc. + + Within client 000, user different from ddic and sap*, do + at least the following: + + + + + + Task + Transaction + + + + + Configure Transport System, eg as Stand-Alone + Transport Domain Entity STMS + + + Create / Edit Profile for System + RZ10 + + + Maintain Operation Modes and Instances + RZ04 + + + + + + These and all the other post-installation steps are + thoroughly described in SAP installation guides. + + + + Edit init<sid>.sap (initIDS.sap) + + The file /oracle/IDS/dbs/initIDS.sap contains the SAP + backup profile. Here the size of the tape to be used, type of + compression and so on need to be defined. To get this running + with sapdba / + brbackup, I changed the following + values: + + compress = hardware +archive_function = copy_delete_save +cpio_flags = "-ov --format=newc --block-size=128 --quiet" +cpio_in_flags = "-iuv --block-size=128 --quiet" +tape_size = 38000M +tape_address = /dev/nsa0 +tape_address_rew = /dev/sa0 + + Explanations: + + compress The tape I use is a HP DLT1 + which does hardware compression. + + archive_function This defines the + default behaviour for saving Oracle archive logs: New logfiles + are saved to tape, already saved logfiles are saved again and + are then deleted. This prevents lots of trouble if one needs to + recover the database, and one of the archive-tapes has gone + bad. + + cpio_flags Default is to use -B which + sets blocksize to 5120 Bytes. For DLT-Tapes, HP recommends at + least 32K blocksize, so I used --block-size=128 for + 64K. --format=newc is needed I have inode numbers greater than + 65535. The last option --quiet is needed as otherwise brbackup + complains as soon as cpio outputs the numbers of blocks + saved. + + cpio_in_flags Flags needed for + loading data back from tape. Format is reckognized + automagically. + + tape_size This usually gives the raw + storage capability of the tape. For security reason (we use + hardware compression), the + + value is slightly lower than the + actual value. + + tape_address The non-rewindable + device to be used with cpio. + + tape_address_rew The rewindable device to be + used with cpio. + + + + + Problems during installation + + + OSUSERSIDADM_IND_ORA during R3SETUP + + If R3SETUP complains at this stage, edit file CENTRDB.R3S. + Locate [OSUSERSIDADM_IND_ORA] and edit the following + values: + + HOME=/home/idsadm (was empty) +STATUS=OK (had status ERROR) + + + Then you can restart R3SETUP with: + + &prompt.root; ./R3SETUP -f CENTRDB.R3S + + + + OSUSERDBSID_IND_ORA during R3SETUP + + Possibly R3SETUP also complains at this stage. Just edit + CENTRDB.R3S. Locate [OSUSERDBSID_IND_ORA] and edit the + following value in that section: + + STATUS=OK + + Then just restart R3SETUP again: + + &prompt.root; ./R3SETUP -f CENTRDB.R3S + + + + oraview.vrf FILE NOT FOUND during Oracle installation + + You haven't deselected Oracle On-Line Text Viewer + before starting the installation. This is marked for installation even + though this option is currently not available for Linux. Deselect this + product inside the Oracle installation menu and restart installation. + + + + TEXTENV_INVALID during R3SETUP, RFC or SAPGUI start + + If this error is encountered, the correct locale is + missing. SAP note 0171356 lists the necessary RPMs that need be + installed (eg saplocales-1.0-3, + saposcheck-1.0-1 for RedHat 6.1). In case + you ignored all the related errors and set the corresponding + status from ERROR to OK (in CENTRDB.R3S) every time R3SETUP + complained and just restarted R3SETUP, the SAP-System will not + be properly configured and you will then not be able to connect + to the system with a sapgui, even though the system can be + started. Trying to connect with the old Linux sapgui gave the + following messages: + + Sat May 5 14:23:14 2001 +*** ERROR => no valid userarea given [trgmsgo. 0401] +Sat May 5 14:23:22 2001 +*** ERROR => ERROR NR 24 occured [trgmsgi. 0410] +*** ERROR => Error when generating text environment. [trgmsgi. 0435] +*** ERROR => function failed [trgmsgi. 0447] +*** ERROR => no socket operation allowed [trxio.c 3363] +Speicherzugriffsfehler + + + This behaviour is due to SAP R/3 being unable to correctly + assign a locale and also not being properly configured itself + (missing entries in some database tables). To be able to connect + to SAP, add the following entries to file DEFAULT.PFL (see note + 0043288): + + abap/set_etct_env_at_new_mode =0 +install/collate/active =0 +rscp/TCP0B =TCP0B + + + Restart the SAP system. Now one can connect to the system, + even though country-specific language settings might not work as + expected. After correcting country-settings (and providing the + correct locales), these entries can be removed from DEFAULT.PFL + and the SAP system can be restarted. + + + + + ORA-12546. Start Listener with correct permissions + + Start the Oracle Listener as user + oraids with the following commands: + + &prompt.root; umask 0; lsnrctl start + + Otherwise one might get ORA-12546 as the sockets won't + have the correct permissions. See SAP note 0072984. + + + + [DIPGNTAB_IND_IND] during R3SETUP + + In general, see SAP note 0130581 (R3SETUP step DIPGNTAB + terminates). During this specific installation, for some + reasons the installation process was not using the proper SAP + system name "IDS", but the empty string "" instead. This lead to + some minor problems with accessing directories, as the paths are + generated dynamically using <sid> (in this case IDS). So + instead of accessing: + + /usr/sap/IDS/SYS/... +/usr/sap/IDS/DVMGS00 + + + the following path were used: + + /usr/sap//SYS/... +/usr/sap/D00i + + + To continue with the installation, I created a link and an + additional directory: + + + &prompt.root; pwd + /compat/linux/usr/sap + &prompt.root; ls -l + total 4 + drwxr-xr-x 3 idsadm sapsys 512 May 5 11:20 D00 + drwxr-x--x 5 idsadm sapsys 512 May 5 11:35 IDS + lrwxr-xr-x 1 root sapsys 7 May 5 11:35 SYS -> IDS/SYS + drwxrwxr-x 2 idsadm sapsys 512 May 5 13:00 tmp + drwxrwxr-x 11 idsadm sapsys 512 May 4 14:20 trans + + I also found SAP notes (0029227 and 0008401) describing + this behaviour. + + + + [RFCRSWBOINI_IND_IND] during R3SETUP + + Set STATUS of the offending step from ERROR to OK (file + CENTRDB.R3S) and restart R3SETUP. After installation, you have + to execute the report RSWBOINS from transaction SE38. See SAP + note 0162266 for additional information about phase RFCRSWBOINI + and RFCRADDBDIF. + + + + [RFCRADDBDIF_IND_IND] during R3SETUP + + Set STATUS of the offending step from ERROR to OK (file + CENTRDB.R3S) and restart R3SETUP. After installation, you have + to execute the report RADDBDIF from transaction SE38. See SAP + note 0162266 for further information. + + + + Advanced Topics If you are curious as to how the Linux binary compatibility works, this is the section you want to read. Most of what follows is based heavily on an email written to &a.chat; by Terry Lambert tlambert@primenet.com (Message ID: <199906020108.SAA07001@usr09.primenet.com>). How Does It Work? FreeBSD has an abstraction called an execution class loader. This is a wedge into the &man.execve.2; system call. What happens is that FreeBSD has a list of loaders, instead of a single loader with a fallback to the #! loader for running any shell interpreters or shell scripts. Historically, the only loader on the UNIX platform examined the magic number (generally the first 4 or 8 bytes of the file) to see if it was a binary known to the system, and if so, invoked the binary loader. If it was not the binary type for the system, the &man.execve.2; call returned a failure, and the shell attempted to start executing it as shell commands. The assumption was a default of whatever the current shell is. Later, a hack was made for &man.sh.1; to examine the first two characters, and if they were :\n, then it invoked the &man.csh.1; shell instead (we believe SCO first made this hack). What FreeBSD does now is go through a list of loaders, with a generic #! loader that knows about interpreters as the characters which follow to the next whitespace next to last, followed by a fallback to /bin/sh. For the Linux ABI support, FreeBSD sees the magic number as an ELF binary (it makes no distinction between FreeBSD, Solaris, Linux, or any other OS which has an ELF image type, at this point). The ELF loader looks for a specialized brand, which is a comment section in the ELF image, and which is not present on SVR4/Solaris ELF binaries. For Linux binaries to function, they must be branded as type Linux; from &man.brandelf.1;: &prompt.root; brandelf -t Linux file When this is done, the ELF loader will see the Linux brand on the file. When the ELF loader sees the Linux brand, the loader replaces a pointer in the proc structure. All system calls are indexed through this pointer (in a traditional UNIX system, this would be the sysent[] structure array, containing the system calls). In addition, the process flagged for special handling of the trap vector for the signal trampoline code, and sever other (minor) fix-ups that are handled by the Linux kernel module. The Linux system call vector contains, among other things, a list of sysent[] entries whose addresses reside in the kernel module. When a system call is called by the Linux binary, the trap code dereferences the system call function pointer off the proc structure, and gets the Linux, not the FreeBSD, system call entry points. In addition, the Linux mode dynamically reroots lookups; this is, in effect, what the union option to FS mounts (not the unionfs!) does. First, an attempt is made to lookup the file in the /compat/linux/original-path directory, then only if that fails, the lookup is done in the /original-path directory. This makes sure that binaries that require other binaries can run (e.g., the Linux toolchain can all run under Linux ABI support). It also means that the Linux binaries can load and exec FreeBSD binaries, if there are no corresponding Linux binaries present, and that you could place a &man.uname.1; command in the /compat/linux directory tree to ensure that the Linux binaries could not tell they were not running on Linux. In effect, there is a Linux kernel in the FreeBSD kernel; the various underlying functions that implement all of the services provided by the kernel are identical to both the FreeBSD system call table entries, and the Linux system call table entries: file system operations, virtual memory operations, signal delivery, System V IPC, etc… The only difference is that FreeBSD binaries get the FreeBSD glue functions, and Linux binaries get the Linux glue functions (most older OS's only had their own glue functions: addresses of functions in a static global sysent[] structure array, instead of addresses of functions dereferenced off a dynamically initialized pointer in the proc structure of the process making the call). Which one is the native FreeBSD ABI? It does not matter. Basically the only difference is that (currently; this could easily be changed in a future release, and probably will be after this) the FreeBSD glue functions are statically linked into the kernel, and the Linux glue functions can be statically linked, or they can be accessed via a kernel module. Yeah, but is this really emulation? No. It is an ABI implementation, not an emulation. There is no emulator (or simulator, to cut off the next question) involved. So why is it sometimes called Linux emulation? To make it hard to sell FreeBSD! 8-). Really, it is because the historical implementation was done at a time when there was really no word other than that to describe what was going on; saying that FreeBSD ran Linux binaries was not true, if you did not compile the code in or load a module, and there needed to be a word to describe what was being loaded—hence the Linux emulator.
diff --git a/en_US.ISO_8859-1/books/handbook/linuxemu/chapter.sgml b/en_US.ISO_8859-1/books/handbook/linuxemu/chapter.sgml index 71154577c7..8310e0e715 100644 --- a/en_US.ISO_8859-1/books/handbook/linuxemu/chapter.sgml +++ b/en_US.ISO_8859-1/books/handbook/linuxemu/chapter.sgml @@ -1,795 +1,2196 @@ Linux Binary Compatibility Restructured and parts updated by &a.jim;, 22 March 2000. Originally contributed by &a.handy; and &a.rich; Synopsis The following chapter will cover FreeBSD's Linux binary compatibility features, how to install it, and how it works. At this point, you may be asking yourself why exactly, does FreeBSD need to be able to run Linux binaries? The answer to that question is quite simple. Many companies and developers develop only for Linux, since it is the latest hot thing in the computing world. That leaves the rest of us FreeBSD users bugging these same companies and developers to put out native FreeBSD versions of their applications. The problem is, that most of these companies do not really realize how many people would use their product if there were FreeBSD versions too, and most continue to only develop for Linux. So what is a FreeBSD user to do? This is where the Linux binary compatibility of FreeBSD comes into play. In a nutshell, the compatibility allows FreeBSD users to run about 90% of all Linux applications without modification. This includes applications such as Star Office, the Linux version of Netscape, Adobe Acrobat, RealPlayer 5 and 7, VMWare, Oracle, WordPerfect, Doom, Quake, and more. It is also reported that in some situations, Linux binaries perform better on FreeBSD than they do under Linux. There are, however, some Linux-specific operating system features that are not supported under FreeBSD. Linux binaries will not work on FreeBSD if they overly use the Linux /proc filesystem (which is different from FreeBSD's /proc filesystem), or i386-specific calls, such as enabling virtual 8086 mode. For information on installing the Linux binary compatibility mode, see the next section. Installation With the advent of 3.0-RELEASE, it is no longer necessary to specify options LINUX or options COMPAT_LINUX in your kernel configuration. The Linux binary compatibility is now done via a KLD object (Kernel LoaDable object), so it can be installed on-the-fly without having to reboot. You will, however, need to have the following in /etc/rc.conf: linux_enable=YES This, in turn, triggers the following action in /etc/rc.i386: # Start the Linux binary compatibility if requested. # case ${linux_enable} in [Yy][Ee][Ss]) echo -n ' linux'; linux > /dev/null 2>&1 ;; esac If you wish to verify that the KLD is loaded, kldstat will do that: &prompt.user; kldstat Id Refs Address Size Name 1 2 0xc0100000 16bdb8 kernel 7 1 0xc24db000 d000 linux.ko If for some reason you do not want to or cannot load the KLD, then you may statically link the binary compatibility in the kernel by adding options LINUX to your kernel configuration file. Then install your new kernel as described in the kernel configuration section of this handbook. Installing Linux Runtime Libraries This can be done one of two ways, either by using the linux_base port, or by installing them manually. Installing using the linux_base port This is by far the easiest method to use when installing the runtime libraries. It is just like installing any other port from the ports collection. Simply do the following: &prompt.root; cd /usr/ports/emulators/linux_base &prompt.root; make install distclean You should now have working Linux binary compatibility. Some programs may complain about incorrect minor versions of the system libraries. In general, however, this does not seem to be a problem. Installing libraries manually If you do not have the ports collection installed, you can install the libraries by hand instead. You will need the Linux shared libraries that the program depends on and the runtime linker. Also, you will need to create a shadow root directory, /compat/linux, for Linux libraries on your FreeBSD system. Any shared libraries opened by Linux programs run under FreeBSD will look in this tree first. So, if a Linux program loads, for example, /lib/libc.so, FreeBSD will first try to open /compat/linux/lib/libc.so, and if that does not exist, it will then try /lib/libc.so. Shared libraries should be installed in the shadow tree /compat/linux/lib rather than the paths that the Linux ld.so reports. Generally, you will need to look for the shared libraries that Linux binaries depend on only the first few times that you install a Linux program on your FreeBSD system. After a while, you will have a sufficient set of Linux shared libraries on your system to be able to run newly imported Linux binaries without any extra work. How to install additional shared libraries What if you install the linux_base port and your application still complains about missing shared libraries? How do you know which shared libraries Linux binaries need, and where to get them? Basically, there are 2 possibilities (when following these instructions you will need to be root on your FreeBSD system). If you have access to a Linux system, see what shared libraries the application needs, and copy them to your FreeBSD system. Look at the following example: Let us assume you used FTP to get the Linux binary of Doom, and put it on a Linux system you have access to. You then can check which shared libraries it needs by running ldd linuxdoom, like so: &prompt.user; ldd linuxdoom libXt.so.3 (DLL Jump 3.1) => /usr/X11/lib/libXt.so.3.1.0 libX11.so.3 (DLL Jump 3.1) => /usr/X11/lib/libX11.so.3.1.0 libc.so.4 (DLL Jump 4.5pl26) => /lib/libc.so.4.6.29 You would need to get all the files from the last column, and put them under /compat/linux, with the names in the first column as symbolic links pointing to them. This means you eventually have these files on your FreeBSD system: /compat/linux/usr/X11/lib/libXt.so.3.1.0 /compat/linux/usr/X11/lib/libXt.so.3 -> libXt.so.3.1.0 /compat/linux/usr/X11/lib/libX11.so.3.1.0 /compat/linux/usr/X11/lib/libX11.so.3 -> libX11.so.3.1.0 /compat/linux/lib/libc.so.4.6.29 /compat/linux/lib/libc.so.4 -> libc.so.4.6.29
Note that if you already have a Linux shared library with a matching major revision number to the first column of the ldd output, you will not need to copy the file named in the last column to your system, the one you already have should work. It is advisable to copy the shared library anyway if it is a newer version, though. You can remove the old one, as long as you make the symbolic link point to the new one. So, if you have these libraries on your system: /compat/linux/lib/libc.so.4.6.27 /compat/linux/lib/libc.so.4 -> libc.so.4.6.27 and you find a new binary that claims to require a later version according to the output of ldd: libc.so.4 (DLL Jump 4.5pl26) -> libc.so.4.6.29 If it is only one or two versions out of date in the in the trailing digit then do not worry about copying /lib/libc.so.4.6.29 too, because the program should work fine with the slightly older version. However, if you like, you can decide to replace the libc.so anyway, and that should leave you with: /compat/linux/lib/libc.so.4.6.29 /compat/linux/lib/libc.so.4 -> libc.so.4.6.29
The symbolic link mechanism is only needed for Linux binaries. The FreeBSD runtime linker takes care of looking for matching major revision numbers itself and you do not need to worry about it.
Installing Linux ELF binaries ELF binaries sometimes require an extra step of branding. If you attempt to run an unbranded ELF binary, you will get an error message like the following; &prompt.user; ./my-linux-elf-binary ELF binary type not known Abort To help the FreeBSD kernel distinguish between a FreeBSD ELF binary from a Linux binary, use the &man.brandelf.1; utility. &prompt.user; brandelf -t Linux my-linux-elf-binary The GNU toolchain now places the appropriate branding information into ELF binaries automatically, so you this step should become increasingly more rare in the future. Configuring the host name resolver If DNS does not work or you get this message: resolv+: "bind" is an invalid keyword resolv+: "hosts" is an invalid keyword You will need to configure a /compat/linux/etc/host.conf file containing: order hosts, bind multi on The order here specifies that /etc/hosts is searched first and DNS is searched second. When /compat/linux/etc/host.conf is not installed, linux applications find FreeBSD's /etc/host.conf and complain about the incompatible FreeBSD syntax. You should remove bind if you have not configured a name server using the /etc/resolv.conf file.
Installing Mathematica Updated for Mathematica version 4.x by &a.murray and merged with work by Bojan Bistrovic bojanb@physics.odu.edu. This document describes the process of installing the Linux version of Mathematica 4.X onto a FreeBSD system. The Linux version of Mathematica runs perfectly under FreeBSD however the binaries shipped by Wolfram need to be branded so that FreeBSD knows to use the Linux ABI to execute them. The Linux version of Mathematica or Mathematica for Students can be ordered directly from Wolfram at http://www.wolfram.com/. Branding the Linux binaries The Linux binaries are located in the Unix directory of the Mathematica CDROM distributed by Wolfram. You need to copy this directory tree to your local hard drive so that you can brand the Linux binaries with &man.brandelf.1; before running the installer: &prompt.root; mount /cdrom &prompt.root; cp -rp /cdrom/Unix/ /localdir/ &prompt.root; brandelf -t Linux /localdir/Files/SystemFiles/Kernel/Binaries/Linux/* &prompt.root; brandelf -t Linux /localdir/Files/SystemFiles/FrontEnd/Binaries/Linux/* &prompt.root; brandelf -t Linux /localdir/Files/SystemFiles/Installation/Binaries/Linux/* &prompt.root; brandelf -t Linux /localdir/Files/SystemFiles/Graphics/Binaries/Linux/* &prompt.root; brandelf -t Linux /localdir/Files/SystemFiles/Converters/Binaries/Linux/* &prompt.root; brandelf -t Linux /localdir/Files/SystemFiles/LicenseManager/Binaries/Linux/mathlm &prompt.root; cd /localdir/Installers/Linux/ &prompt.root; ./MathInstaller Alternatively, you can simply set the default ELF brand to Linux for all unbranded binaries with the command: &prompt.root; sysctl -w kern.fallback_elf_brand=3 This will make FreeBSD assume that unbranded ELF binaries use the Linux ABI and so you should be able to run the installer straight from the CDROM. Obtaining your Mathematica Password Before you can run Mathematica you will have to obtain a password from Wolfram that corresponds to your machine ID. Once you have installed the Linux compatibility runtime libraries and unpacked Mathematica you can obtain the machine ID by running the program mathinfo in the Install directory. This machine ID is based solely on the MAC address of your first ethernet card. &prompt.root; cd /localdir/Files/SystemFiles/Installation/Binaries/Linux &prompt.root; mathinfo disco.example.com 7115-70839-20412 When you register with Wolfram, either by email, phone or fax, you will give them the machine ID and they will respond with a corresponding password consisting of groups of numbers. You can then enter this information when you attempt to run Mathematica for the first time exactly as you would for any other Mathematica platform. Running the Mathematica front end over a network Mathematica uses some special fonts to display characters not present in any of the standard font sets (integrals, sums, greek letters, etc.). The X protocol requires these fonts to be install locally. This means you will have to copy these fonts from the CDROM or from a host with Mathematica installed to your local machine. These fonts are normally stored in /cdrom/Unix/Files/SystemFiles/Fonts on the CDROM, or /usr/local/mathematica/SystemFiles/Fonts on your hard drive. The actual fonts are in the subdirectories Type1 and X. There are several ways to use them, as described below. The first way is to copy them into one of the existing font directories in /usr/X11R6/lib/X11/fonts. This will require editing the fonts.dir file, adding the font names to it, and changing the number of fonts on the first line. Alternatively, you should also just be able to run mkfontdir in the directory you have copied them to. The second way to do this is to copy the directories to /usr/X11R6/lib/X11/fonts: &prompt.root; cd /usr/X11R6/lib/X11/fonts &prompt.root; mkdir X &prompt.root; mkdir MathType1 &prompt.root; cd /cdrom/Unix/Files/SystemFiles/Fonts &prompt.root; cp X/* /usr/X11R6/lib/X11/fonts/X &prompt.root; cp Type1/* /usr/X11R6/lib/X11/fonts/MathType1 &prompt.root; cd /usr/X11R6/lib/X11/fonts/X &prompt.root; mkfontdir &prompt.root; cd ../MathType1 &prompt.root; mkfontdir Now add the new font directories to your font path: &prompt.root; xset fp+ /usr/X11R6/lib/X11/fonts/X &prompt.root; xset fp+ /usr/X11R6/lib/X11/fonts/MathType1 &prompt.root; xset fp rehash If you are using the XFree86 server, you can have these font directories loaded automatically by adding them to your XF86Config file. If you do not already have a directory called /usr/X11R6/lib/X11/fonts/Type1, you can change the name of the MathType1 directory in the example above to Type1. Installing Oracle Contributed by Marcel Moolenaar marcel@cup.hp.com Preface This document describes the process of installing Oracle 8.0.5 and Oracle 8.0.5.1 Enterprise Edition for Linux onto a FreeBSD machine Installing the Linux environment Make sure you have both linux_base and linux_devtools from the ports collection installed. These ports are added to the collection after the release of FreeBSD 3.2. If you are using FreeBSD 3.2 or an older version for that matter, update your ports collection. You may want to consider updating your FreeBSD version too. If you run into difficulties with linux_base-6.1 or linux_devtools-6.1 you may have to use version 5.2 of these packages. If you want to run the intelligent agent, you'll also need to install the Red Hat TCL package: tcl-8.0.3-20.i386.rpm. The general command for installing packages with the official RPM port is : &prompt.root; rpm -i --ignoreos --root /compat/linux --dbpath /var/lib/rpm package Installation of the package should not generate any errors. Creating the Oracle environment Before you can install Oracle, you need to set up a proper environment. This document only describes what to do specially to run Oracle for Linux on FreeBSD, not what has been described in the Oracle installation guide. Kernel Tuning As described in the Oracle installation guide, you need to set the maximum size of shared memory. Don't use SHMMAX under FreeBSD. SHMMAX is merely calculated out of SHMMAXPGS and PGSIZE. Therefore define SHMMAXPGS. All other options can be used as described in the guide. For example: options SHMMAXPGS=10000 options SHMMNI=100 options SHMSEG=10 options SEMMNS=200 options SEMMNI=70 options SEMMSL=61 Set these options to suit your intended use of Oracle. Also, make sure you have the following options in your kernel config-file: options SYSVSHM #SysV shared memory options SYSVSEM #SysV semaphores options SYSVMSG #SysV interprocess communication Oracle account Create an Oracle account just as you would create any other account. The Oracle account is special only that you need to give it a Linux shell. Add /compat/linux/bin/bash to /etc/shells and set the shell for the Oracle account to /compat/linux/bin/bash. Environment Besides the normal Oracle variables, such as ORACLE_HOME and ORACLE_SID you must set the following environment variables: Variable Value LD_LIBRARY_PATH $ORACLE_HOME/lib CLASSPATH $ORACLE_HOME/jdbc/lib/classes111.zip PATH /compat/linux/bin /compat/linux/sbin /compat/linux/usr/bin /compat/linux/usr/sbin /bin /sbin /usr/bin /usr/sbin /usr/local/bin $ORACLE_HOME/bin It is advised to set all the environment variables in .profile. A complete example is: ORACLE_BASE=/oracle; export ORACLE_BASE ORACLE_HOME=/oracle; export ORACLE_HOME LD_LIBRARY_PATH=$ORACLE_HOME/lib export LD_LIBRARY_PATH ORACLE_SID=ORCL; export ORACLE_SID ORACLE_TERM=386x; export ORACLE_TERM CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip export CLASSPATH PATH=/compat/linux/bin:/compat/linux/sbin:/compat/linux/usr/bin:/compat/linux/usr/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:$ORACLE_HOME/bin export PATH Installing Oracle Due to a slight inconsistency in the Linux emulator, you need to create a directory named .oracle in /var/tmp before you start the installer. Either make it world writable or let it be owner by the oracle user. You should be able to install Oracle without any problems. If you have problems, check your Oracle distribution and/or configuration first! After you have installed Oracle, apply the patches described in the next two subsections. A frequent problem is that the TCP protocol adapter is not installed right. As a consequence, you cannot start any TCP listeners. The following actions help solve this problem: &prompt.root; cd $ORACLE_HOME/network/lib &prompt.root; make -f ins_network.mk ntcontab.o &prompt.root; cd $ORACLE_HOME/lib &prompt.root; ar r libnetwork.a ntcontab.o &prompt.root; cd $ORACLE_HOME/network/lib &prompt.root; make -f ins_network.mk install Don't forget to run root.sh again! Patching root.sh When installing Oracle, some actions, which need to be performed as root, are recorded in a shell script called root.sh. root.sh is written in the orainst directory. Apply the following patch to root.sh, to have it use to proper location of chown or alternatively run the script under a Linux native shell. *** orainst/root.sh.orig Tue Oct 6 21:57:33 1998 --- orainst/root.sh Mon Dec 28 15:58:53 1998 *************** *** 31,37 **** # This is the default value for CHOWN # It will redefined later in this script for those ports # which have it conditionally defined in ss_install.h ! CHOWN=/bin/chown # # Define variables to be used in this script --- 31,37 ---- # This is the default value for CHOWN # It will redefined later in this script for those ports # which have it conditionally defined in ss_install.h ! CHOWN=/usr/sbin/chown # # Define variables to be used in this script When you don't install Oracle from CD, you can patch the source for root.sh. It is called rthd.sh and is located in the orainst directory in the source tree. Patching genclntsh The script genclntsh is used to create a single shared client library. It is used when building the demos. Apply the following patch to comment out the definition of PATH: *** bin/genclntsh.orig Wed Sep 30 07:37:19 1998 --- bin/genclntsh Tue Dec 22 15:36:49 1998 *************** *** 32,38 **** # # Explicit path to ensure that we're using the correct commands #PATH=/usr/bin:/usr/ccs/bin export PATH ! PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin export PATH # # each product MUST provide a $PRODUCT/admin/shrept.lst --- 32,38 ---- # # Explicit path to ensure that we're using the correct commands #PATH=/usr/bin:/usr/ccs/bin export PATH ! #PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin export PATH # # each product MUST provide a $PRODUCT/admin/shrept.lst Running Oracle When you have followed the instructions, you should be able to run Oracle as if it was run on Linux itself. + + + + + + Installing SAP R/3 (4.6B - IDES) + Contributed by Holger Kipp holger.kipp@alogis.com + Converted to SGML by &a.logo; + + + + Preface + + This document describes a possible way of installing a SAP + R/3 4.6B IDES-System with Oracle 8.0.5 for Linux onto a FreeBSD + 4.3 machine, including the installation of FreeBSD 4.3 stable and + Oracle 8.0.5. + + Even though this document tries to describe all important + steps in a greater detail, it is not intended as a replacement for + the Oracle and SAP R/3 installation guides. + + Please see the documentation that comes with the SAP R/3 + Linux edition for SAP- and Oracle-specific questions, as well as + resources from Oracle and SAP OSS. + + + + Software + + The following CD-ROMs have been used for + SAP-installation: + + + + + Name Number Description + + + + + KERNEL 51009113 SAP Kernel Oracle / + Installation / AIX, Linux, Solaris + + + RDBMS 51007558 Oracle / RDBMS 8.0.5.X / + Linux + + + EXPORT1 51010208 IDES / DB-Export / Disc + 1 of 6 + + + EXPORT2 51010209 IDES / DB-Export / Disc + 2 of 6 + + EXPORT3 51010210 IDES / DB-Export / + Disc3 of 6 + + + EXPORT4 51010211 IDES / DB-Export / + Disc4 of 6 + + + EXPORT5 51010212 IDES / DB-Export / + Disc5 of 6 + + + EXPORT6 51010213 IDES / DB-Export / + Disc6 of 6 + + + + + + Additionally, I used the Oracle 8 Server (Pre-production + version 8.0.5 for Linux, Kernel Version 2.0.33) CD which is not + really necessary, and of course FreeBSD 4.3 stable (it was only a + few days past 4.3 RELEASE). + + + SAP-Notes + + The following notes should be read before installing SAP R/3 + or proved to be useful during installation: + + + + + + Number + Title + + + + + 0171356 SAP Software auf Linux: grundlegenden + Anmerkungen + + + 0201147 INST: 4.6C R/3 Inst. on UNIX - + Oracle + + + 0373203 Update / Migration Oracle 8.0.5 --> + 8.0.6/8.1.6 LINUX + + + 0072984 Release of Digital UNIX 4.0B for + Oracle + + + 0130581 R3SETUP step DIPGNTAB terminates + + + 0144978 Your system has not been installed + correctly + + + 0162266 Questions and tips for R3SETUP on Windows + NT / W2K + + + + + + + + + Hardware-Requirements + + The following equipment is sufficient for a SAP R/3 System + (4.6B): + + + + + + Component + 4.6B + 4.6C + + + + + Processor + 2 x 800MHz Pentium III + 2 x 800MHz Pentium III + + + Memory + 1GB ECC + 2GB ECC + + + Hard Disc Space + 50-60GB (IDES) + 50-60GB (IDES) + + + + + For use in production, Xeon-Processors with large cache, + high-speed disc access (SCSI, RAID hardware controller), USV and + ECC-RAM is recommended. The large amount of Hard disc space is + due to the preconfigured IDES System, which creates 27 GB of + database files during installation. Usually after installation it + is then necessary to extend some tablespaces. + + I used a dual processor board with 2 800MHz Pentium III + processors, Adaptec 29160 Ultra160 SCSI adapter (for accessing a + 40/80 GB DLT tape drive and CD-ROM), Mylex AcelleRAID (2 channels, + firmware 6.00-1-00 with 32MB RAM). To the Mylex Raid-controller + are attached two 17GB hard discs (mirrored) and four 36GB hard + discs (RAID level 5). + + + + + Installation of FreeBSD 4.3 stable + + First I installed FreeBSD 4.3 stable. I did the + default-installation via ftp. + + + Installation via FTP Get the diskimages + kern.flp and mfsroot.flp and put them on floppy disks (I got + mine from ftp7.de.freebsd.org. Please choose the appropriate + mirror). + + + &prompt.root; dd if=kern.flp of=/dev/fd0 + &prompt.root; dd if=mfsroot.flp of=/dev/fd0 + + Don't forget to use different disks for the two images + :-), then boot from the floppy with the kern.flp-image on it and + follow instructions. I used the following disk layout: + + + + + + Filesystem + Size (1k-blocks) + Size (GB) + Mounted on + + + + + /dev/da0s1a + 1.016.303 + 1 + / + + + /dev/da0s1b + + 6 + <swap> + + + /dev/da0s1e + 2.032.623 + 2 + /var + + + /dev/da0s1f + 8.205.339 + 8 + /usr + + + /dev/da1s1e + 45.734.361 + 45 + /compat/linux/oracle + + + /dev/da1s1f + 2.032.623 + 2 + /compat/linux/sapmnt + + + /dev/da1s1g + 2.032.623 + 2 + /compat/linux/usr/sap + + + + + + I had to configure and initialise the two logical drives + with the Mylex software beforehand. It is located on the board + itself and can be started during the boot phase of the + pc. + Please note that this disk layout differs + slightly from the SAP recommendations, as SAP suggests mounting + the oracle-subdirectories (and some others) separately - I + decided to just create them as real subdirectories for + simplicity. + + + + + + Get the latest stable-sources + + For FreeBSD 4.3 stable onwards, it is quite easy to get + the latest stable sources. With the older versions of FreeBSD, I + had my own script located in /etc/cvsup. Setting up cvsup for + FreeBSD 4.3 is quite easy. As user root do + the following: + + + &prompt.root; cp /etc/defaults/make.conf /etc/make.conf + &prompt.root; vi /etc/make.conf + + The file /etc/make.conf requires the + following entries to be active: + + SUP_UPDATE= yes +SUP= /usr/local/bin/cvsup +SUPFLAGS= -g -L 2 +SUPHOST= cvsup8.FreeBSD.org +SUPFILE= /usr/share/examples/cvsup/stable-supfile +PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile +DOCSUPFILE= /usr/share/examples/cvsup/doc-supfile + + Change the SUPHOST-value + appropriately. The supfiles in + /usr/share/examples/cvsup should be + fine. If you don't want to load all the docfiles, leave the + corresponding DOCSUPFILE-entry inactive. + Starting cvsup to get the latest stable-sources is then very + easy: + + + &prompt.root; cd /usr/src + &prompt.root; make update + + + + + + Make world and a new kernel + + The first thing to do is to install the sources. + As user root, do the following: + + + &prompt.root; cd /usr/src + &prompt.root; make world + + If this goes through, one can then continue creating and + configuring the new kernel. Usually this is where to customize + the kernel configuration file. As the computer is named + troubadix, the natural name for the config file also is + troubadix: + + + &prompt.root; cd /usr/src/sys/i386/conf + &prompt.root; cp GENERIC TROUBADIX + &prompt.root; vi TROUBADIX + + At this stage one can define the drivers to use and not to + use, etc. See the appropriate documentation or have a look at + file LINT for some additional + explanations. + + One can then also include the parameters as described + below Creating the new kernel then requires: + + + &prompt.root; cd /usr/src/sys/i386/conf + &prompt.root; config TROUBADIX + &prompt.root; cd /usr/src/sys/compile/TROUBADIX + &prompt.root; make depend + &prompt.root; make + &prompt.root; make install + + + After make install finished + successfully, one should reboot the computer to have the new + kernel available. + + + + + + Installing the Linux environment + + I had some trouble downloading the required RPM-files (for + 4.3 stable, 2nd May 2001), so you might try one of the following + locations (if all the others fail and the following aren't out of + date): + + + ftp7.de.freebsd.org/pub/FreeBSD/distfiles/rpm + ftp.redhat.com/pub/redhat/linux/6.1/en/os/i386/RedHat/RPMS + + + + Installing Linux base-system + <para>First the linux base-system needs to be installed (as root):</para> + <screen> + &prompt.root; <userinput>cd /usr/ports/emulators/linux_base</userinput> + &prompt.root; <userinput>make package</userinput> </screen> + </sect3> + + + <sect3 id="installinglinuxdevelopment"> + <title>Installing Linux development + + Next, the linux development is needed: + + + &prompt.root; cd /usr/ports/devel/linux_devtools + &prompt.root; make package + + + + + + Installing necessary RPMs + + To start the R3SETUP-Program, pam support is needed. As + this also requires some other packages, I ended up installing + several packages. After that, pam still complained about a + missing package, so I forced the installation and it worked. I + wonder if the other packages are really needed or if it would + have been sufficient to install the pam-package. + + Anyway, here is the list of packages I installed: + + + cracklib-2.7-5.i386.rpm + cracklib-dicts-2.7-5.i386.rpm + pwdb-0.60-1.i386.rpm + pam-0.68-7.i386.rpm + + + I installed these packages with the following + command: + + + &prompt.root; rpm -i --ignoreos --root /compat/linux --dbpath /var/lib/rpm <package_name> + + except for the pam package, which I forced with + + + &prompt.root rpm -i --ignoreos --nodeps --root /compat/linux --dbpath /var/lib/rpm pam-0.68-7.i386.rpm + + For Oracle to run the intelligent agent, I also hat to + install the following RedHat TCL package (as is steted in the + FreeBSD Handbook): tcl-8.0.5-30.i386.rpm (otherwise the + relinking during Oracle install won't work). There are some + other issues regarding relinking of Oracle, but that is a + Oracle-Linux issue, not FreeBSD specific as far as I understand + it. + + + + + + + Creating the SAP/R3 environment + + + Creating the necessary filesystems and mountpoints + + For a simple installation, it is sufficient to create the + following filesystems: + + + + + + mountpoint + size in GB + + + + + /compat/linux/oracle + 45 GB + + + /compat/linux/sapmnt + 2 GB + + + /compat/linux/usr/sap + 2 GB + + + + + + I also created some links, so FreeBSD will also find the + correct path: + + + &prompt.root; ln -s /compat/linux/oracle /oracle + &prompt.root; ln -s /compat/linux/sapmnt /sapmnt + &prompt.root; ln -s /compat/linux/usr/sap /usr/sap + + + + Creating users and directories + + SAP R/3 needs two users and three groups. The usernames + depend on the SAP system id (SID) which consists of three + letters. Some of these SIDs are reserved by SAP (for example + SAP and NIX. For a + complete list please see the SAP documentation). For the IDES + installation I used IDS. We have therefore + the following groups (group ids might differ, these are just the + values I used with my installation): + + + + + + group id + group name + description + + + + + 100 + dba + Data Base Administrator + + + 101 + sapsys + SAP System + + + 102 + oper + Data Base Operator + + + + + + For a default Oracle-Installation, only group + dba is used. As + oper-group, one also uses group + dba (see Oracle- and SAP-documentation for further + information). + + We also need the following users: + + + + + + user id + username + generic name + group + additional groups + description + + + + + 1000 + idsadm + <sid>adm + sapsys + oper + SAP Administrator + + + 1002 + oraids + ora<sid> + dba + oper + DB Administrator + + + + + + Adding the users with adduser requires the following + (please note shell and home directory) entries for + SAP-Administrator: + + Name: idsadm <sid>adm +Password: ****** +Fullname: SAP IDES Administrator +Uid: 1000 +Gid: 101 (sapsys) +Class: +Groups: sapsys dba +HOME: /home/idsadm /home/<sid>adm +Shell: /bin/sh + + and for Database-Administrator: + + Name: oraids ora<sid> +Password: ****** +Fullname: Oracle IDES Administrator +Uid: 1002 +Gid: 100 (dba) +Class: +Groups: dba +HOME: /oracle/IDS /oracle/<sid> +Shell: /bin/sh + + This should also include group oper + in case you are using both groups dba and + oper. + + + + + Creating directories + + These directories are usually created as separate + filesystems. This depends entirely on your requirements. I + choose to create them as simple directories, as they are all + located on the same RAID 5 anyway: + + First we'll set owners and right of some directories (as + user root): + + + &prompt.root; chmod 775 /oracle + &prompt.root; chmod 777 /sapmnt + &prompt.root; chown root:dba /oracle + &prompt.root; chown idsadm:sapsys /compat/linux/usr/sap + &prompt.root; chmow 775 /compat/linux/usr/sap + + Second we'll create directories as user ora<sid>. These + will all be subdirectories of /oracle/IDS: + + + &prompt.root; su - oraids + &prompt.root; mkdir mirrlogA mirrlogB origlogA origlogB + &prompt.root; mkdir sapdata1 sapdata2 sapdata3 sapdata4 sapdata5 sapdata6 + &prompt.root; mkdir saparch sapreorg + &prompt.root; exit + + In the third step we create directories as user idsadm + (<sid>adm): + + + &prompt.root; su - idsadm + &prompt.root; cd /usr/sap + &prompt.root; mkdir IDS + &prompt.root; mkdir trans + &prompt.root; exit + + + + Entries in /etc/services + + SAP R/3 requires some entries in file + /etc/services , which will not be set + correctly during installation under FreeBSD. Please add the + following entries (you need at least those entries corresponding + to the instance number - in this case, 00. + It'll do no harm adding all entries from 00 + to 99 for dp, + gw, sp and + ms); + + sapdp00 3200/tcp # SAP Dispatcher. 3200 + Instance-Number +sapgw00 3300/tcp # SAP Gateway. 3300 + Instance-Number +sapsp00 3400/tcp # 3400 + Instance-Number +sapms00 3500/tcp # 3500 + Instance-Number +sapmsIDS 3600/tcp # SAP Message Server. 3600 + Instance-Number + + + + Necessary locales + + SAP requires at least two locales that aren't part of the + default RedHat installation. SAP offers the required RPMs as + download from their ftp-server (which is only accessible if you + are a customer with OSS-access). See note 0171356 for a list of + RPMs you need. + + It is also possible to just create appropriate links (for + example from de_DE and + en_US ), but I wouldn't recommend this for + a production system (so far it worked with the IDES system + without any problems, though). The following locales are + needed: + + de_DE.ISO-8859-1 +en_US.ISO-8859-1 + + If they are not present, there will be some problems + during the installation. If these are then subsequently ignored + (eg by setting the status of the offending steps to OK in file + CENTRDB.R3S), it will be impossible to log onto the SAP-system + without some additional effort. + + + + + Kernel Tuning + + SAP R/3 Systems need a lot of resources. I therefore + added the following parameters to my kernel config-file: + + # Set these for memory pigs (SAP and Oracle): +options MAXDSIZ="(1024*1024*1024)" +options DFLDSIZ="(1024*1024*1024)" # System V options needed. +options SYSVSHM #SYSV-style shared memory +options SHMMAXPGS=262144 #max amount of shared mem. pages +options SHMMNI=256 #max number of shared memory ident if. +options SHMSEG=100 #max shared mem.segs per process +options SYSVMSG #SYSV-style message queues +options MSGSEG=32767 #max num. of mes.segments in system +options MSGSSZ=32 #size of msg-seg. MUST be power of 2 +options MSGMNB=65535 #max char. per message queue +options MSGTQL=2046 #max amount of msgs in system +options SYSVSEM #SYSV-style semaphores +options SEMMNU=256 #number of semaphore UNDO structures +options SEMMNS=1024 #number of semaphores in system +options SEMMNI=520 #number of semaphore indentifiers +options SEMUME=100 #number of UNDO keys + + + The minimum values are specified in the documentation that + comes from SAP. As there is no description for Linux, see the + HP-UX-section (32-bit) for further information. + + + + + + Installing SAP R/3 + + + Preparing SAP CD-ROMs + + There are lots of CD-ROMs to mount and unmount during + installation. Assuming you have enough CD-ROM-drives, you can + just mount them all. I decided to copy the CD-ROM contents to + corresponding directories: + + /oracle/IDS/sapreorg/<cd-name> + + where <cd-name> was one of KERNEL, RDBMS, EXPORT1, + EXPORT2, EXPORT3, EXPORT4, EXPORT5 and EXPORT6. All the + filenames should be in capital letters, otherwise use the -g + option for mounting. So use the following commands: + + + &prompt.root; mount_cd9660 -g /dev/cd0a /mnt + &prompt.root; cp -R /mnt/* /oracle/IDS/sapreorg/<cd-name> + &prompt.root; umount /mnt + + + + Running the install-script + + First we need to prepare an install-directory: + + + &prompt.root; cd /oracle/IDS/sapreorg + &prompt.root; mkdir install + &prompt.root; cd install + + Then the install-script is started, which will copy nearly + all the relevant files into the install-directory: + + /oracle/IDS/sapreorg/KERNEL/UNIX/INSTTOOL.SH + + As this is an IDES-Installation with a fully customized + SAP R/3 Demo-System, we have six instead of just three + EXPORT-CDs. At this point the installation template CENTRDB.R3S + is for installing a standard central instance (R/3 and + Database), not an IDES central instance, so copy the + corresponding CENTRDB.R3S from the EXPORT1 directory, otherwise + R3SETUP will only ask for three EXPORT-CDs. + + + + Start R3SETUP + + Make sure LD_LIBRARY_PATH is set correctly: + + + &prompt.root; export LD_LIBRARY_PATH=/oracle/IDS/lib:/sapmnt/IDS/exe:/oracle/805_32/lib + + Start R3SETUP as user root from installation + directory: + + + &prompt.root; cd /oracle/IDS/sapreorg/install + &prompt.root; ./R3SETUP -f CENTRDB.R3S + + The script then asks some questions (defaults in brackets, + followed by actual input): + + + + + + Question + Default + Input + + + + + Enter SAP System ID + [C11] + IDS<ret> + + + Enter SAP Instance Number + [00] + <ret> + + + Enter SAPMOUNT Directory + [/sapmnt] + <ret> + + + Enter name of SAP central host + [troubadix.domain.de] + <ret> + + + Enter name of SAP db host + [troubadix] + <ret> + + + Select character set + [1] (WE8DEC) + <ret> + + + Enter Oracle server version (1) Oracle 8.0.5, (2) Oracle 8.0.6, (3) Oracle 8.1.5, (4) Oracle 8.1.6 + + 1<ret> + + + Extract Oracle Client archive + [1] (Yes, extract) + <ret> + + + Enter path to KERNEL CD + [/sapcd] + /oracle/IDS/sapreorg/KERNEL + + + Enter path to RDBMS CD + [/sapcd] + /oracle/IDS/sapreorg/RDBMS + + + Enter path to EXPORT1 CD + [/sapcd] + /oracle/IDS/sapreorg/EXPORT1 + + + Directory to copy EXPORT1 CD + [/oracle/IDS/sapreorg/CD4_DIR] + <ret> + + + Enter path to EXPORT2 CD + [/sapcd] + /oracle/IDS/sapreorg/EXPORT2 + + + Directory to copy EXPORT2 CD + [/oracle/IDS/sapreorg/CD5_DIR] + <ret> + + + Enter path to EXPORT3 CD + [/sapcd] + /oracle/IDS/sapreorg/EXPORT3 + + + Directory to copy EXPORT3 CD + [/oracle/IDS/sapreorg/CD6_DIR] + <ret> + + + Enter path to EXPORT4 CD + [/sapcd] + /oracle/IDS/sapreorg/EXPORT4 + + + Directory to copy EXPORT4 CD + [/oracle/IDS/sapreorg/CD7_DIR] + <ret> + + + Enter path to EXPORT5 CD + [/sapcd] + /oracle/IDS/sapreorg/EXPORT5 + + + Directory to copy EXPORT5 CD + [/oracle/IDS/sapreorg/CD8_DIR] + <ret> + + + Enter path to EXPORT6 CD + [/sapcd] + /oracle/IDS/sapreorg/EXPORT6 + + + Directory to copy EXPORT6 CD + [/oracle/IDS/sapreorg/CD9_DIR] + <ret> + + + Enter amount of RAM for SAP + DB + + 850<ret> (in Megabytes) + + + Service Entry Message Server + [3600] + <ret> + + + Enter Group-ID of sapsys + [101] + <ret> + + + Enter Group-ID of oper + [102] + <ret> + + + Enter Group-ID of dba + [100] + <ret> + + + Enter User-ID of <sid>adm + [1000] + <ret> + + + Enter User-ID of ora<sid> + [1002] + <ret> + + + Number of parallel procs + [2] + <ret> + + + + + + If I had not copied the CDs to the different locations, + then the SAP-Installer can't find the CD needed (identified by + the LABEL.ASC-File on CD) and would then ask you to insert / + mount the CD and confirm or enter the mountpath. + + The CENTRDB.R3S might not be error-free. In my case, it + requested EXPORT4 again (but indicated the correct key (6_LOCATI + ON, then 7_LOCATION etc.), so one can just continue with + entering the correct values. Don't get irritated. + + Apart from some problems mentioned below, everything + should go straight throught up to the point where the Oracle + database software needs to be installed. + + + + + Installing Oracle 8.0.5 + + Please see the corresponding SAP-Notes and Oracle Readmes + regarding Linux and Oracle DB for possible problems. Most if not + all problems stem from incompatible libraries + + For more information on installing Oracle, refer to + the Installing Oracle chapter + + + Installing the Oracle 8.0.5 with orainst + + If Oracle 8.0.5 is to be used, some additional libraries + are needed for successfully relinking, as Oracle 8.0.5 was + linked with an old glibc (RedHat 6.0), but RedHat 6.1 already + uses a new glibc. So you have to install the following + additional packages to ensure that linking will work: + + compat-libs-5.2-2.i386.rpm + compat-glibc-5.2-2.0.7.2.i386.rpm + compat-egcs-5.2-1.0.3a.1.i386.rpm + compat-egcs-c++-5.2-1.0.3a.1.i386.rpm + compat-binutils-5.2-2.9.1.0.23.1.i386.rpm + + See the corresponding SAP-Notes or Oracle Readmes for + further information. If this is no option (at the time of + installation I didn't have enough time to check this), one could + use the original binaries, or use the relinked binaries from an + original RedHat System. + + For compiling the intelligent agent, the RedHat TCL + package must be installed. If you can't get + tcl-8.0.3-20.i386.rpm, a newer one like + tcl-8.0.5-30.i386.rpm for RedHat 6.1 should + also do. + + Apart from relinking, the installation is + straightforward: + + + &prompt.root; su - oraids + &prompt.root; export TERM=xterm + &prompt.root; export ORACLE_TERM=xterm + &prompt.root; export ORACLE_HOME=/oracle/IDS + &prompt.root; cd /ORACLE_HOME/orainst_sap + &prompt.root; ./orainst + + Confirm all Screens with Enter until the software is + installed, except that one has to deselect the Oracle + On-Line Text Viewer , as this is not currently + available for Linux. Oracle then wants to relink with + i386-glibc20-linux-gcc instead of the + available gcc, egcs or + i386-redhat-linux-gcc . + + Due to time constrains I decided to use the binaries from + an Oracle 8.0.5 PreProduction release, after the first attempt + at getting the version from the RDBMS-CD working, failed, and + finding / accessing the correct RPMs was a nightmare at that + time. + + + + + Installing the Oracle 8.0.5 Pre-Production release for + Linux (Kernel 2.0.33) + + This installation is quite easy. Mount the CD, start the + installer. It will then ask for the location of the Oracle home + directory, and copy all binaries there. I did not delete the + remains of my previous RDBMS-installation tries, though. + + Afterwards, Oracle Database could be started with no + problems. + + + + + Continue with SAP R/3 installation + + First check the environment settings of users idsamd + (<sid>adm) and oraids (ora<sid>). They should now both have the + files .profile , .login + and .cshrc which are all using + hostname. In case the system's hostname is + the fully qualified name, you need to change + hostname to hostname -s + within all three files. + + + Database load + + Afterwards, R3SETUP can either be restarted or continued + (depending on whether exit was chosen or not). R3SETUP then + creates the tablespaces and loads the data from EXPORT1 to + EXPORT6 (remember, it is an IDES system, otherwise it would only + be EXPORT1 to EXPORT3) with R3load into the database. + + When the database load is finished (might take a few + hours), some passwords are requested. For test installations, + one can use the well known default passwords (use different ones + if security is an issue!): + + + + + + Question + Input + + + + + Enter Password for sapr3 + sap<ret> + + + Confirum Password for sapr3 + sap<ret> + + + Enter Password for sys + change_on_install<ret> + + + Confirm Password for sys + change_on_install<ret> + + + Enter Password for system + manager<ret> + + + Confirm Password for system + manager<ret> + + + + + + At this point I had a few problems with dipgntab. + + + + Listener + + Start the Oracle-Listener as user oraids (ora<sid>) as + follows: + + umask 0; lsnrctl start + + Otherwise you might get ORA-12546 as the sockets won't + have the correct permissions. See SAP note 072984. + + + + + Post-installation steps + + + Request SAP R/3 license key + + This is needed, as the temporary license is only valid for + four weeks. Don't forget to enter the correct Operating System: + (X) Other: FreeBSD 4.3 Stable. First get + the hardware key. Logon as user idsadm and + call saplicense: + + &prompt.root; /sapmnt/IDS/exe/saplicense -get + + Calling saplicense without options + gives a list of options. Upon receiving the license key, it can + be installed using + + &prompt.root; /sapmnt/IDS/exe/saplicense -install + + You are then required to enter the following + values: + + SAP SYSTEM ID = <SID, 3 chars> +CUSTOMER KEY = <hardware key, 11 chars> +INSTALLATION NO = <installation, 10 digits> +EXPIRATION DATE = <yyyymmdd, usually "99991231"> +LICENSE KEY = <license key, 24 chars> + + + + Creating Users + + Create a user within client 000 (for some tasks required + to be done within client 000, but with a user different from + users sap* and + ddic). As a username, I usually choose + wartung (or service in + English). Profiles required are sap_new + and sap_all. For additional safety the + passwords of default users within all clients should be changed + (this includes users sap* and + ddic). + + + + Configure Transport System, Profile, Operation Modes, etc. + + Within client 000, user different from ddic and sap*, do + at least the following: + + + + + + Task + Transaction + + + + + Configure Transport System, eg as Stand-Alone + Transport Domain Entity STMS + + + Create / Edit Profile for System + RZ10 + + + Maintain Operation Modes and Instances + RZ04 + + + + + + These and all the other post-installation steps are + thoroughly described in SAP installation guides. + + + + Edit init<sid>.sap (initIDS.sap) + + The file /oracle/IDS/dbs/initIDS.sap contains the SAP + backup profile. Here the size of the tape to be used, type of + compression and so on need to be defined. To get this running + with sapdba / + brbackup, I changed the following + values: + + compress = hardware +archive_function = copy_delete_save +cpio_flags = "-ov --format=newc --block-size=128 --quiet" +cpio_in_flags = "-iuv --block-size=128 --quiet" +tape_size = 38000M +tape_address = /dev/nsa0 +tape_address_rew = /dev/sa0 + + Explanations: + + compress The tape I use is a HP DLT1 + which does hardware compression. + + archive_function This defines the + default behaviour for saving Oracle archive logs: New logfiles + are saved to tape, already saved logfiles are saved again and + are then deleted. This prevents lots of trouble if one needs to + recover the database, and one of the archive-tapes has gone + bad. + + cpio_flags Default is to use -B which + sets blocksize to 5120 Bytes. For DLT-Tapes, HP recommends at + least 32K blocksize, so I used --block-size=128 for + 64K. --format=newc is needed I have inode numbers greater than + 65535. The last option --quiet is needed as otherwise brbackup + complains as soon as cpio outputs the numbers of blocks + saved. + + cpio_in_flags Flags needed for + loading data back from tape. Format is reckognized + automagically. + + tape_size This usually gives the raw + storage capability of the tape. For security reason (we use + hardware compression), the + + value is slightly lower than the + actual value. + + tape_address The non-rewindable + device to be used with cpio. + + tape_address_rew The rewindable device to be + used with cpio. + + + + + Problems during installation + + + OSUSERSIDADM_IND_ORA during R3SETUP + + If R3SETUP complains at this stage, edit file CENTRDB.R3S. + Locate [OSUSERSIDADM_IND_ORA] and edit the following + values: + + HOME=/home/idsadm (was empty) +STATUS=OK (had status ERROR) + + + Then you can restart R3SETUP with: + + &prompt.root; ./R3SETUP -f CENTRDB.R3S + + + + OSUSERDBSID_IND_ORA during R3SETUP + + Possibly R3SETUP also complains at this stage. Just edit + CENTRDB.R3S. Locate [OSUSERDBSID_IND_ORA] and edit the + following value in that section: + + STATUS=OK + + Then just restart R3SETUP again: + + &prompt.root; ./R3SETUP -f CENTRDB.R3S + + + + oraview.vrf FILE NOT FOUND during Oracle installation + + You haven't deselected Oracle On-Line Text Viewer + before starting the installation. This is marked for installation even + though this option is currently not available for Linux. Deselect this + product inside the Oracle installation menu and restart installation. + + + + TEXTENV_INVALID during R3SETUP, RFC or SAPGUI start + + If this error is encountered, the correct locale is + missing. SAP note 0171356 lists the necessary RPMs that need be + installed (eg saplocales-1.0-3, + saposcheck-1.0-1 for RedHat 6.1). In case + you ignored all the related errors and set the corresponding + status from ERROR to OK (in CENTRDB.R3S) every time R3SETUP + complained and just restarted R3SETUP, the SAP-System will not + be properly configured and you will then not be able to connect + to the system with a sapgui, even though the system can be + started. Trying to connect with the old Linux sapgui gave the + following messages: + + Sat May 5 14:23:14 2001 +*** ERROR => no valid userarea given [trgmsgo. 0401] +Sat May 5 14:23:22 2001 +*** ERROR => ERROR NR 24 occured [trgmsgi. 0410] +*** ERROR => Error when generating text environment. [trgmsgi. 0435] +*** ERROR => function failed [trgmsgi. 0447] +*** ERROR => no socket operation allowed [trxio.c 3363] +Speicherzugriffsfehler + + + This behaviour is due to SAP R/3 being unable to correctly + assign a locale and also not being properly configured itself + (missing entries in some database tables). To be able to connect + to SAP, add the following entries to file DEFAULT.PFL (see note + 0043288): + + abap/set_etct_env_at_new_mode =0 +install/collate/active =0 +rscp/TCP0B =TCP0B + + + Restart the SAP system. Now one can connect to the system, + even though country-specific language settings might not work as + expected. After correcting country-settings (and providing the + correct locales), these entries can be removed from DEFAULT.PFL + and the SAP system can be restarted. + + + + + ORA-12546. Start Listener with correct permissions + + Start the Oracle Listener as user + oraids with the following commands: + + &prompt.root; umask 0; lsnrctl start + + Otherwise one might get ORA-12546 as the sockets won't + have the correct permissions. See SAP note 0072984. + + + + [DIPGNTAB_IND_IND] during R3SETUP + + In general, see SAP note 0130581 (R3SETUP step DIPGNTAB + terminates). During this specific installation, for some + reasons the installation process was not using the proper SAP + system name "IDS", but the empty string "" instead. This lead to + some minor problems with accessing directories, as the paths are + generated dynamically using <sid> (in this case IDS). So + instead of accessing: + + /usr/sap/IDS/SYS/... +/usr/sap/IDS/DVMGS00 + + + the following path were used: + + /usr/sap//SYS/... +/usr/sap/D00i + + + To continue with the installation, I created a link and an + additional directory: + + + &prompt.root; pwd + /compat/linux/usr/sap + &prompt.root; ls -l + total 4 + drwxr-xr-x 3 idsadm sapsys 512 May 5 11:20 D00 + drwxr-x--x 5 idsadm sapsys 512 May 5 11:35 IDS + lrwxr-xr-x 1 root sapsys 7 May 5 11:35 SYS -> IDS/SYS + drwxrwxr-x 2 idsadm sapsys 512 May 5 13:00 tmp + drwxrwxr-x 11 idsadm sapsys 512 May 4 14:20 trans + + I also found SAP notes (0029227 and 0008401) describing + this behaviour. + + + + [RFCRSWBOINI_IND_IND] during R3SETUP + + Set STATUS of the offending step from ERROR to OK (file + CENTRDB.R3S) and restart R3SETUP. After installation, you have + to execute the report RSWBOINS from transaction SE38. See SAP + note 0162266 for additional information about phase RFCRSWBOINI + and RFCRADDBDIF. + + + + [RFCRADDBDIF_IND_IND] during R3SETUP + + Set STATUS of the offending step from ERROR to OK (file + CENTRDB.R3S) and restart R3SETUP. After installation, you have + to execute the report RADDBDIF from transaction SE38. See SAP + note 0162266 for further information. + + + + Advanced Topics If you are curious as to how the Linux binary compatibility works, this is the section you want to read. Most of what follows is based heavily on an email written to &a.chat; by Terry Lambert tlambert@primenet.com (Message ID: <199906020108.SAA07001@usr09.primenet.com>). How Does It Work? FreeBSD has an abstraction called an execution class loader. This is a wedge into the &man.execve.2; system call. What happens is that FreeBSD has a list of loaders, instead of a single loader with a fallback to the #! loader for running any shell interpreters or shell scripts. Historically, the only loader on the UNIX platform examined the magic number (generally the first 4 or 8 bytes of the file) to see if it was a binary known to the system, and if so, invoked the binary loader. If it was not the binary type for the system, the &man.execve.2; call returned a failure, and the shell attempted to start executing it as shell commands. The assumption was a default of whatever the current shell is. Later, a hack was made for &man.sh.1; to examine the first two characters, and if they were :\n, then it invoked the &man.csh.1; shell instead (we believe SCO first made this hack). What FreeBSD does now is go through a list of loaders, with a generic #! loader that knows about interpreters as the characters which follow to the next whitespace next to last, followed by a fallback to /bin/sh. For the Linux ABI support, FreeBSD sees the magic number as an ELF binary (it makes no distinction between FreeBSD, Solaris, Linux, or any other OS which has an ELF image type, at this point). The ELF loader looks for a specialized brand, which is a comment section in the ELF image, and which is not present on SVR4/Solaris ELF binaries. For Linux binaries to function, they must be branded as type Linux; from &man.brandelf.1;: &prompt.root; brandelf -t Linux file When this is done, the ELF loader will see the Linux brand on the file. When the ELF loader sees the Linux brand, the loader replaces a pointer in the proc structure. All system calls are indexed through this pointer (in a traditional UNIX system, this would be the sysent[] structure array, containing the system calls). In addition, the process flagged for special handling of the trap vector for the signal trampoline code, and sever other (minor) fix-ups that are handled by the Linux kernel module. The Linux system call vector contains, among other things, a list of sysent[] entries whose addresses reside in the kernel module. When a system call is called by the Linux binary, the trap code dereferences the system call function pointer off the proc structure, and gets the Linux, not the FreeBSD, system call entry points. In addition, the Linux mode dynamically reroots lookups; this is, in effect, what the union option to FS mounts (not the unionfs!) does. First, an attempt is made to lookup the file in the /compat/linux/original-path directory, then only if that fails, the lookup is done in the /original-path directory. This makes sure that binaries that require other binaries can run (e.g., the Linux toolchain can all run under Linux ABI support). It also means that the Linux binaries can load and exec FreeBSD binaries, if there are no corresponding Linux binaries present, and that you could place a &man.uname.1; command in the /compat/linux directory tree to ensure that the Linux binaries could not tell they were not running on Linux. In effect, there is a Linux kernel in the FreeBSD kernel; the various underlying functions that implement all of the services provided by the kernel are identical to both the FreeBSD system call table entries, and the Linux system call table entries: file system operations, virtual memory operations, signal delivery, System V IPC, etc… The only difference is that FreeBSD binaries get the FreeBSD glue functions, and Linux binaries get the Linux glue functions (most older OS's only had their own glue functions: addresses of functions in a static global sysent[] structure array, instead of addresses of functions dereferenced off a dynamically initialized pointer in the proc structure of the process making the call). Which one is the native FreeBSD ABI? It does not matter. Basically the only difference is that (currently; this could easily be changed in a future release, and probably will be after this) the FreeBSD glue functions are statically linked into the kernel, and the Linux glue functions can be statically linked, or they can be accessed via a kernel module. Yeah, but is this really emulation? No. It is an ABI implementation, not an emulation. There is no emulator (or simulator, to cut off the next question) involved. So why is it sometimes called Linux emulation? To make it hard to sell FreeBSD! 8-). Really, it is because the historical implementation was done at a time when there was really no word other than that to describe what was going on; saying that FreeBSD ran Linux binaries was not true, if you did not compile the code in or load a module, and there needed to be a word to describe what was being loaded—hence the Linux emulator.