diff options
author | Hiroki Sato <hrs@FreeBSD.org> | 2004-09-26 05:20:38 +0000 |
---|---|---|
committer | Hiroki Sato <hrs@FreeBSD.org> | 2004-09-26 05:20:38 +0000 |
commit | 8f1c859fcb214c414fa6913292f585a4879d7655 (patch) | |
tree | c62e773df353dd15d663bcea872797a02a9c37cb /zh_CN.GB2312/books/handbook/linuxemu | |
parent | 3e941311cb2ef8bb1151068e4f8f6ab382975287 (diff) |
Notes
Diffstat (limited to 'zh_CN.GB2312/books/handbook/linuxemu')
-rw-r--r-- | zh_CN.GB2312/books/handbook/linuxemu/Makefile | 16 | ||||
-rw-r--r-- | zh_CN.GB2312/books/handbook/linuxemu/chapter.sgml | 2992 |
2 files changed, 3008 insertions, 0 deletions
diff --git a/zh_CN.GB2312/books/handbook/linuxemu/Makefile b/zh_CN.GB2312/books/handbook/linuxemu/Makefile new file mode 100644 index 0000000000..f960df52cf --- /dev/null +++ b/zh_CN.GB2312/books/handbook/linuxemu/Makefile @@ -0,0 +1,16 @@ +# +# Build the Handbook with just the content from this chapter. +# +# Original Revision: 1.1 +# $FreeBSD$ +# + +CHAPTERS= linuxemu/chapter.sgml + +VPATH= .. + +MASTERDOC= ${.CURDIR}/../${DOC}.${DOCBOOKSUFFIX} + +DOC_PREFIX?= ${.CURDIR}/../../../.. + +.include "../Makefile" diff --git a/zh_CN.GB2312/books/handbook/linuxemu/chapter.sgml b/zh_CN.GB2312/books/handbook/linuxemu/chapter.sgml new file mode 100644 index 0000000000..97596d46e2 --- /dev/null +++ b/zh_CN.GB2312/books/handbook/linuxemu/chapter.sgml @@ -0,0 +1,2992 @@ +<!-- + The FreeBSD Documentation Project + + Original Revision: 1.114 + $FreeBSD$ +--> + +<chapter id="linuxemu"> + <chapterinfo> + <authorgroup> + <author> + <firstname>Jim</firstname> + <surname>Mock</surname> + <contrib>Restructured and parts updated by </contrib> + </author> + <!-- 22 Mar 2000 --> + </authorgroup> + <authorgroup> + <author> + <firstname>Brian N.</firstname> + <surname>Handy</surname> + <contrib>Originally contributed by </contrib> + </author> + <author> + <firstname>Rich</firstname> + <surname>Murphey</surname> + </author> + </authorgroup> + </chapterinfo> + +<title>Linux二进制兼容模式</title> + + <sect1 id="linuxemu-synopsis"> + <title>概述</title> + <indexterm><primary>Linux二进制兼容模式</primary></indexterm> + <indexterm> + <primary>二进制兼容模式</primary> + <secondary>Linux</secondary> + </indexterm> + + <para>FreeBSD提供了与其他几种类&unix;操作系统兼容的模式,包括Linux。 + 您可能会问为什么FreeBSD要能够运行Linux二进制程序? + 问题的答案很简单。许多公司和开发人员只为Linux开发程序, + 因为它是目前计算机世界<quote>最热门</quote>的技术。 + 这样就导致我们这些FreeBSD用户必须把他们这些公司和开发人员开发的应用程序移植到本地FreeBSD版本上来。 + 问题是,这些公司中的绝大多数都无法知道有多少人会使用他们的FreeBSD版本的产品, + 所以许多公司仍然只开发Linux平台的产品。那么FreeBSD用户应该做些什么呢? + 这就是使用Linux二进制兼容性的原因。 + </para> + + <para>简单来讲,这种兼容性允许FreeBSD用户能够不做任何修改就可以运行大约90%的Linux应用程序。 + 这些包括<application>&staroffice;</application>, + Linux版的<application>&netscape;</application>, + <application>&adobe; &acrobat;</application>, + <application><trademark class="registered">RealPlayer</trademark></application> + 5和7, <application><trademark>VMware</trademark></application>, + <application>&oracle;</application>, + <application><trademark class="registered">WordPerfect</trademark></application>, + <application>Doom</application>, <application>Quake</application>,和更多的其他程序。 + 据说在某些情况下,在FreeBSD上Linux程序的性能比它们在Linux上运行得还要好。</para> + <indexterm> + <primary>Linux</primary> + <secondary><filename>/proc</filename>文件系统</secondary> + </indexterm> + + <para>然而,一些具有Linux本身操作系统特性的程序就无法在FreeBSD上运行。 + 如果它们使用Linux的<filename>/proc</filename>文件系统 + (它与FreeBSD的<filename>/proc</filename>文件系统是不同的) + 或如启用虚拟8086模式这样特定的 &i386;调用,那Linux的兼容模式就无法工作。 + </para> + + <para>读完这章,您将了解到:</para> + <itemizedlist> + <listitem> + <para> 如何在您的系统中启用Linux兼容模式。</para> + </listitem> + + <listitem> + <para>如何安装额外的Linux共享库。</para> + </listitem> + + <listitem> + <para>如何在FreeBSD上安装Linux应用程序。</para> + </listitem> + + <listitem> + <para>在FreeBSD上,Linux兼容模式的执行细节。</para> + </listitem> + </itemizedlist> + + <para>阅读这章之前,您应该知道:</para> + + <itemizedlist> + <listitem> + <para>如何安装第三方软件(<xref linkend="ports">)。</para> + </listitem> + </itemizedlist> + + </sect1> + + <sect1 id="linuxemu-lbc-install"> + <title>安装</title> + + <indexterm><primary>KLD (kernel loadable object)</primary></indexterm> + + <para>默认的Linux兼容模式没有被打开。启用这个功能的最容易的方法是调用<literal>linux</literal> + KLD对象(<quote>Kernel LoaDable object</quote>)。您可以在命令行通过健入<command>linux</command>来加载这个模块。 + </para> + + <para>如果您想让Linux二进制兼容性总是被启用,您可以在<filename>/etc/rc.conf</filename>加入下面这一行:</para> + + <programlisting>linux_enable="YES"</programlisting> + + <para>&man.kldstat.8;可以用来检查KLD模块是否加载:</para> + + <screen>&prompt.user; <userinput>kldstat</userinput> +Id Refs Address Size Name + 1 2 0xc0100000 16bdb8 kernel + 7 1 0xc24db000 d000 linux.ko</screen> + <indexterm> + <primary>内核选项</primary> + <secondary>LINUX</secondary> + </indexterm> + + <para>如果您不想或者无法将Linux KLD加载,您就需要在内核中静态链接进Linux二进制兼容模式。您必须在 + 您的内核配置文件里面加入<literal>options COMPAT_LINUX</literal>,然后按照<xref linkend="kernelconfig">重新编译内核。 + </para> + + <sect2> + <title>安装Linux运行时库</title> + <indexterm> + <primary>Linux</primary> + <secondary>安装Linux运行时库</secondary> + </indexterm> + + <para>有两种方法来安装Linux运行时库,要么使用<link linkend="linuxemu-libs-port">linux_base</link> port, + 要么<link linkend="linuxemu-libs-manually">手动</link>安装。</para> + + <sect3 id="linuxemu-libs-port"> + <title>使用linux_base Port安装</title> + <indexterm><primary>ports collection</primary></indexterm> + + <para>这是最容易的安装方法,只需要像安装其他port一样从 + <ulink type="html" url="file://localhost/usr/ports/">ports collection</ulink>来安装:</para> + + <screen>&prompt.root; <userinput>cd /usr/ports/emulators/linux_base</userinput> +&prompt.root; <userinput>make install distclean</userinput></screen> + + <para> + 您现在应当是工作在Linux兼容模式下了。一些程序可能会提示系统库的版本不正确。通常,这不是问题。</para> + + <note><para>有多个版本的<filename + role="package">emulators/linux_base</filename> port,针对不同的版本的Linux。 + 您应该选择最接近Linux应用程序需要的那个版本来安装。</para></note> + + </sect3> + + <sect3 id="linuxemu-libs-manually"> + <title>手动安装</title> + + <para>如果您没有安装 Ports Collection,您也可以通过手动来安装Linux运行时库。 + 您将需要这些程序依赖的Linux共享库,而且您需要创建一个<quote>shadow root</quote> + 目录<filename>/compat/linux</filename>,任何要被Linux程序打开的共享库都首先在这个目录里面查找。 + 所以,如果一个Linux程序加载了,例如,<filename>/lib/libc.so</filename>,FreeBSD 会首先尝试打开 + <filename>/compat/linux/lib/libc.so</filename>,如果不存在,它将尝试打开<filename>/lib/libc.so</filename>。 + 共享库应该安装在<filename>/compat/linux/lib</filename>而不是Linux <command>ld.so</command>报告的其他路径。</para> + + <para>通常,您需要寻找Linux程序依赖的共享库。然后, + 您需要在系统上做一个高效的Linux共享库设置,以便能够运行最新的Linux程序。 + </para> + </sect3> + + <sect3> + <title>如何安装额外的共享库</title> + <indexterm><primary>共享库</primary></indexterm> + + <para>如果您安装了<filename>linux_base</filename> port,但是您的 + 您的应用程序仍会报告丢失共享库的信息?您如何知道Linux程序需要哪个共享库? + 基本上,有两种可能性(接下来的指令需要<username>root</username>权限):</para> + + <para>如果您有可以访问的Linux系统, 看看应用程序需要什么共享库, + 把它们拷贝到您的FreeBSD系统。看下面的例子:</para> + + <informalexample> + <para>我们假设您通过FTP得到Linux程序<application>Doom</application>, + 并把它放在您能访问的Linux系统上。然后您可以通过<command>ldd linuxdoom</command>来检查需要哪些共享库, + 就像这样:</para> + + <screen>&prompt.user; <userinput>ldd linuxdoom</userinput> +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</screen> + + <indexterm><primary>符号链接</primary></indexterm> + <para>您需要得到上面输出的右列的所有文件,并把他们拷贝到<filename>/compat/linux</filename>, + 第一列的名字用符号连接指向它们。这样您的FreeBSD系统上就有了这些文件:</para> + + <screen>/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</screen> + + <blockquote> + <note> + <para>如果您已经有了一个与<command>ldd</command> 输出的第一列的主修订号相匹配的Linux共享库, + 您将不需要把右列命名的文件拷贝到您的系统,您已经完成了工作。 + 如果有一个新的版本,那无论如何都要拷贝一个共享库。 + 您可以删掉旧的,您只要做一个符号连接到新的版本。 + 所以,如果有这些库在您的系统上: + </para> + + <screen>/compat/linux/lib/libc.so.4.6.27 +/compat/linux/lib/libc.so.4 -> libc.so.4.6.27</screen> + + <para>如果您根据<command>ldd</command>输出的发现需要一个更新版本的库:</para> + + <screen>libc.so.4 (DLL Jump 4.5pl26) -> libc.so.4.6.29</screen> + + <para>如果结尾的数字只有一到两个版本过期,那也不要担心拷贝<filename>/lib/libc.so.4.6.29</filename>, + 因为程序在稍微旧一些的版本上也能很好地工作。 + 然而,如果喜欢的话,您可以替换<filename>libc.so</filename>,变成这样:</para> + + <screen>/compat/linux/lib/libc.so.4.6.29 +/compat/linux/lib/libc.so.4 -> libc.so.4.6.29</screen> + </note> + </blockquote> + + <blockquote> + <note> + <para>符号链接机制<emphasis>仅仅是</emphasis>Linux程序需要的。 + FreeBSD的运行时连接器会自己寻找匹配的主修订号,您不需要为此担心。</para> + </note> + </blockquote> + </informalexample> + </sect3> + </sect2> + + <sect2> + <title>安装Linux ELF程序</title> + <indexterm> + <primary>Linux</primary> + <secondary>ELF程序</secondary> + </indexterm> + + <para>ELF格式的程序需要一步额外的步骤<quote>标记</quote>。如果您尝试运行没有标记的ELF程序, + 您会得到像下面这样的错误信息:</para> + + <screen>&prompt.user; <userinput>./my-linux-elf-binary</userinput> +ELF binary type not known +Abort</screen> + + <para>为了帮助FreeBSD内核分辨FreeBSD ELF程序和Linux程序,要使用&man.brandelf.1;工具:</para> + + <screen>&prompt.user; <userinput>brandelf -t Linux my-linux-elf-binary</userinput></screen> + + <indexterm><primary>GNU工具</primary></indexterm> + <para>GNU工具现在会自动把适当的标记信息放到ELF程序中,您以后遇到这个问题的机会越来越少。</para> + </sect2> + + <sect2> + <title>配置主机名解析器</title> + + <para>如果DNS不能正常工作或是您得到下列信息:</para> + + <screen>resolv+: "bind" is an invalid keyword resolv+: +"hosts" is an invalid keyword</screen> + + <para>您就需要配置<filename>/compat/linux/etc/host.conf</filename>文件,此文件包含:</para> + + <programlisting>order hosts, bind +multi on</programlisting> + + <para>order这一行指出<filename>/etc/hosts</filename>先被搜索再接着搜索DNS。 + 如果<filename>/compat/linux/etc/host.conf</filename>没有被安装,Linux程序会读取FreeBSD的 + <filename>/etc/host.conf</filename>然后提示不兼容的FreeBSD语法。 + 如果您没有使用<filename>/etc/resolv.conf</filename> 文件设置DNS,应该删除<literal>bind</literal>。 + </para> + </sect2> + </sect1> + + <sect1 id="linuxemu-mathematica"> + <sect1info> + <authorgroup> + <author> + <firstname>Murray</firstname> + <surname>Stokely</surname> + <contrib>Updated for Mathematica 4.X by </contrib> + </author> + </authorgroup> + <authorgroup> + <author> + <firstname>Bojan</firstname> + <surname>Bistrovic</surname> + <contrib>Merged with work by </contrib> + </author> + </authorgroup> + </sect1info> + <title>安装&mathematica;</title> + + <indexterm> + <primary>applications</primary> + <secondary><application>Mathematica</application></secondary> + </indexterm> + + <para>这节描述在FreeBSD系统上安装Linux版的<application>&mathematica; 4.X</application>。 + </para> + + <para>Linux版<application>&mathematica;</application>在FreeBSD下运行的很好,但是 + 由Wolfram打包的二进制程序需要标记才能让FreeBSD知道需要使用Linux ABI来执行它们。</para> + + <para>Linux版的<application>&mathematica;</application> + 或<application>&mathematica; for Students</application> + 可以从<ulink url="http://www.wolfram.com/"></ulink>直接定购。</para> + + <sect2> + <title>标记Linux程序</title> +<para> +Linux程序可以在Wolfram发布的CDROM的<application>&mathematica; </application><filename>Unix</filename>目录中找到。 +您必须将这个目录树拷贝到本地硬盘上,以便您能在运行安装程序之前用&man.brandelf.1; 来标记Linux程序: +</para> + + <screen>&prompt.root; <userinput>mount /cdrom</userinput> +&prompt.root; <userinput>cp -rp /cdrom/Unix/ /localdir/</userinput> +&prompt.root; <userinput>brandelf -t Linux /localdir/Files/SystemFiles/Kernel/Binaries/Linux/*</userinput> +&prompt.root; <userinput>brandelf -t Linux /localdir/Files/SystemFiles/FrontEnd/Binaries/Linux/*</userinput> +&prompt.root; <userinput>brandelf -t Linux /localdir/Files/SystemFiles/Installation/Binaries/Linux/*</userinput> +&prompt.root; <userinput>brandelf -t Linux /localdir/Files/SystemFiles/Graphics/Binaries/Linux/*</userinput> +&prompt.root; <userinput>brandelf -t Linux /localdir/Files/SystemFiles/Converters/Binaries/Linux/*</userinput> +&prompt.root; <userinput>brandelf -t Linux /localdir/Files/SystemFiles/LicenseManager/Binaries/Linux/mathlm</userinput> +&prompt.root; <userinput>cd /localdir/Installers/Linux/</userinput> +&prompt.root; <userinput>./MathInstaller</userinput></screen> + + <para>另外,您也可以简单地用下面的命令将默认的ELF标记成Linux: + </para> + <screen>&prompt.root; <userinput>sysctl kern.fallback_elf_brand=3</userinput></screen> + <para>这将让FreeBSD知道没有标记的ELF程序使用Linux ABI,所以您将可以直接从CDROM来运行安装程序。 </para> + </sect2> + + <sect2> + <title>获得您的&mathematica; 密码</title> + + <para>在您运行<application>&mathematica;</application>之前,您必须从Wolfram获得对应您的<quote>机器ID</quote>的密码。 + </para> + <indexterm> + <primary>以太网</primary> + <secondary>MAC地址</secondary> + </indexterm> + + <para>一旦您安装了Linux运行时库,并把<application>&mathematica;</application>解包开了, + 您可以在安装目录通过运行<command>mathinfo</command>来获得您的<quote>机器ID</quote>。 + 这个机器ID是以您的第一块以太网卡的MAC地址为基础的。</para> + + <screen>&prompt.root; <userinput>cd /localdir/Files/SystemFiles/Installation/Binaries/Linux</userinput> +&prompt.root; <userinput>mathinfo</userinput> +disco.example.com 7115-70839-20412</screen> + + <para>当您用email,电话或者传真向Wolfram注册时,给他们您的<quote>机器ID</quote>,就会返回一个包含一组数字的密码。 + 当您第一次运行<application>&mathematica;</application>时就需要得到的密码。 + </para> + </sect2> + + <sect2> + <title>通过网络来运行&mathematica;</title> + + <para><application>&mathematica;</application> 使用一些特殊的字体来显示字符, + 与现在使用的标准字体不一样(integrals, sums, Greek letters,等等)。 X协议要求将这些字体安装在 + <emphasis>本地</emphasis>。 + 这意味着您需要从<application>&mathematica;</application>的CDROM里面拷贝这些字体并安装到本地。 + 这些字体一般在CDROM的<filename>/cdrom/Unix/Files/SystemFiles/Fonts</filename>里面, + 或本地硬盘的<filename>/usr/local/mathematica/SystemFiles/Fonts</filename>。 + 实际的字体在<filename>Type1</filename>和<filename>X</filename>子目录。有很多种方法来使用它们。 + </para> + + <para>第一种方法是把字体拷贝到一个已存在的目录<filename>/usr/X11R6/lib/X11/fonts</filename>。 + 这需要编辑<filename>fonts.dir</filename>文件。添加字体名字进去,并改变第一行的字体数目。 + 另外,您也需要在拷贝字体的目录下执行&man.mkfontdir.1;。 + </para> + + <para>第二种方法是拷贝目录到<filename>/usr/X11R6/lib/X11/fonts</filename>:</para> + + <screen>&prompt.root; <userinput>cd /usr/X11R6/lib/X11/fonts</userinput> +&prompt.root; <userinput>mkdir X</userinput> +&prompt.root; <userinput>mkdir MathType1</userinput> +&prompt.root; <userinput>cd /cdrom/Unix/Files/SystemFiles/Fonts</userinput> +&prompt.root; <userinput>cp X/* /usr/X11R6/lib/X11/fonts/X</userinput> +&prompt.root; <userinput>cp Type1/* /usr/X11R6/lib/X11/fonts/MathType1</userinput> +&prompt.root; <userinput>cd /usr/X11R6/lib/X11/fonts/X</userinput> +&prompt.root; <userinput>mkfontdir</userinput> +&prompt.root; <userinput>cd ../MathType1</userinput> +&prompt.root; <userinput>mkfontdir</userinput></screen> + + <para>现在,添加新的字体目录到您的字体目录:</para> + + <screen>&prompt.root; <userinput>xset fp+ /usr/X11R6/lib/X11/fonts/X</userinput> +&prompt.root; <userinput>xset fp+ /usr/X11R6/lib/X11/fonts/MathType1</userinput> +&prompt.root; <userinput>xset fp rehash</userinput></screen> + + <para>如果您正在使用<application>&xfree86;</application>服务器,您可以把它们添加到您的 + <filename>XF86Config</filename>文件来自动加载。</para> + <indexterm><primary>fonts</primary></indexterm> + + <para>如果您<emphasis>没有</emphasis>一个叫<filename>/usr/X11R6/lib/X11/fonts/Type1</filename>的目录, + 您可以把<filename>MathType1</filename>改成<filename>Type1</filename>。</para> + </sect2> + </sect1> + + <sect1 id="linuxemu-maple"> + <sect1info> + <authorgroup> + <author> + <firstname>Aaron</firstname> + <surname>Kaplan</surname> +<!-- <address><email>aaron@lo-res.org</email></address>--> + <contrib>Contributed by </contrib> + </author> + </authorgroup> + <authorgroup> + <author> + <firstname>Robert</firstname> + <surname>Getschmann</surname> +<!-- <address><email>rob@getschmann.org</email></address>--> + <contrib>Thanks to </contrib> + </author> + </authorgroup> + </sect1info> + <title>安装&maple;</title> + + <indexterm> + <primary>应用程序</primary> + <secondary><application>Maple</application></secondary> + </indexterm> + + <para><application>&maple;</application>是一个类似于<application>&mathematica;</application>的商业数学软件。 + 您可以从<ulink + url="http://www.maplesoft.com/"></ulink>买到这个软件并注册得到一个使用许可。 + 要在FreeBSD上安装这个软件,请按照下面的步骤:</para> + + <procedure> + <step><para>从软件的发行包执行<filename>INSTALL</filename> shell脚本。当进入安装程序的提示符时, + 选择<quote>RedHat</quote> 选项。典型的安装目录是<filename + class="directory">/usr/local/maple</filename>。</para></step> + + <step><para>如果您不这样做,可以从Maple Waterloo Software (<ulink url="http://register.maplesoft.com/"></ulink>) + 为<application>&maple;</application>订购一个许可。 + 然后拷贝到<filename>/usr/local/maple/license/license.dat</filename>。</para></step> + + <step><para>通过运行<application>&maple;</application>中的<filename>INSTALL_LIC</filename>安装shell脚本来 + 安装<application>FLEXlm</application>许可管理器。 指定许可服务器为您的机器名。</para></step> + + <step><para>像下面这样Patch您的<filename>/usr/local/maple/bin/maple.system.type</filename> + 文件:</para> +<programlisting> ----- snip ------------------ +*** maple.system.type.orig Sun Jul 8 16:35:33 2001 +--- maple.system.type Sun Jul 8 16:35:51 2001 +*************** +*** 72,77 **** +--- 72,78 ---- + # the IBM RS/6000 AIX case + MAPLE_BIN="bin.IBM_RISC_UNIX" + ;; ++ "FreeBSD"|\ + "Linux") + # the Linux/x86 case + # We have two Linux implementations, one for Red Hat and + ----- snip end of patch -----</programlisting> + + <para>请注意<literal>"FreeBSD"|\</literal>后面没有空格。</para> + + <para>这个补丁指示<application>&maple;</application>把<quote>FreeBSD</quote>识别为一种Linux系统。 + <filename>bin/maple</filename> shell脚本调用<filename>bin/maple.system.type</filename> + 脚本执行<command>uname -a</command>来查找操作系统名,根据操作系统名,就知道该使用哪个程序。 + </para></step> + + <step><para>启动许可服务器。</para> + + <para>下面的脚本,安装成<filename>/usr/local/etc/rc.d/lmgrd.sh</filename>, + 是很方便的启动<command>lmgrd</command>的方法:</para> + + <programlisting> ----- snip ------------ + +#! /bin/sh +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin +PATH=${PATH}:/usr/local/maple/bin:/usr/local/maple/FLEXlm/UNIX/LINUX +export PATH + +LICENSE_FILE=/usr/local/maple/license/license.dat +LOG=/var/log/lmgrd.log + +case "$1" in +start) + lmgrd -c ${LICENSE_FILE} 2>> ${LOG} 1>&2 + echo -n " lmgrd" + ;; +stop) + lmgrd -c ${LICENSE_FILE} -x lmdown 2>> ${LOG} 1>&2 + ;; +*) + echo "Usage: `basename $0` {start|stop}" 1>&2 + exit 64 + ;; +esac + +exit 0 + ----- snip ------------</programlisting></step> + + + <step><para>开始测试<application>&maple;</application>:</para> + <screen>&prompt.user; <userinput>cd /usr/local/maple/bin</userinput> +&prompt.user; <userinput>./xmaple</userinput></screen> + +<para>您应该成功启动起来了。记得写信告诉Maplesoft您想要一个本地FreeBSD版本!</para></step> + </procedure> + + <sect2> + <title>一些缺陷</title> + + <itemizedlist> + <listitem><para><application>FLEXlm</application>许可管理器可能是一个使用比较困难的工具。 + 关于它的额外的文档可以在<ulink + url="http://www.globetrotter.com/"></ulink>找到。</para></listitem> + + <listitem><para><command>lmgrd</command>对许可文件非常挑剔,有一点问题就会core dump。 + 正确的许可文件看起来像下面这样: + </para> + +<programlisting># ======================================================= +# License File for UNIX Installations ("Pointer File") +# ======================================================= +SERVER chillig ANY +#USE_SERVER +VENDOR maplelmg + +FEATURE Maple maplelmg 2000.0831 permanent 1 XXXXXXXXXXXX \ + PLATFORMS=i86_r ISSUER="Waterloo Maple Inc." \ + ISSUED=11-may-2000 NOTICE=" Technische Universitat Wien" \ + SN=XXXXXXXXX</programlisting> + + <note><para>序列号被'X'代替了。 <hostid>chillig</hostid>是主机名。</para></note> + + <para>只要不修改<quote>FEATURE</quote>行,编辑后一般都能工作。</para></listitem> + </itemizedlist> + </sect2> + </sect1> + + <sect1 id="linuxemu-matlab"> + <sect1info> + <authorgroup> + <author> + <firstname>Dan</firstname> + <surname>Pelleg</surname> + <contrib>Contributed by </contrib> + </author> + <!-- daniel+handbook@pelleg.org --> + </authorgroup> + </sect1info> + <title>安装&matlab;</title> + + <indexterm> + <primary>应用程序</primary> + <secondary><application>MATLAB</application></secondary> + </indexterm> + + <para>这一节描述在一个 &os; 上安装Linux版本的<application>&matlab; version 6.5</application>。 + 它工作的很好,除了<application>&java.virtual.machine;</application>例外(参考 + <xref linkend="matlab-jre">)。</para> + + <para>Linux版本的<application>&matlab;</application>可以从MathWorks<ulink + url="http://www.mathworks.com"></ulink>订购。请确定您也得到了许可文件或安装说明。 + 等您成功后,让他们知道您想要一个本地&os;版本。</para> + + <sect2> + <title>安装&matlab;</title> + + <para>请按照下面的步骤安装<application>&matlab;</application>:</para> + + <procedure> + <step> + <para>以<username>root</username>身份插入安装CD并挂载上。 + 推荐使用安装脚本,为了启动安装脚本,键入:</para> + + <screen>&prompt.root; <userinput>/compat/linux/bin/sh /cdrom/install</userinput></screen> + + <tip> + <para>安装程序是图形的。如果您得到不能打开显示的错误,可以键入 + <command>setenv HOME ~<replaceable>USER</replaceable></command>, + <replaceable>USER</replaceable>是您&man.su.1;成的用户。</para> + </tip> + </step> + + <step> + <para> + 当问<application>&matlab;</application>的根目录时,键入: + <userinput>/compat/linux/usr/local/matlab</userinput>。</para> + + <tip> + <para>为了下面的安装过程更方便,在shell提示符下键入 + <command>set MATLAB=/compat/linux/usr/local/matlab</command></para> + </tip> + </step> + + <step> + <para>根据获得<application>&matlab;</application>许可时的指示来编辑许可文件。</para> + + <tip> + <para>您可以用您喜欢的编辑器提前准备这个文件,并在安装程序要您编辑它之前拷贝到 + <filename>$MATLAB/license.dat</filename> + </para> + </tip> + </step> + + <step> + <para>完成安装过程</para> + </step> + </procedure> + + <para>到这里,您的<application>&matlab;</application>安装已经完成了。 + 接下来的步骤是让它和您的&os; 系统<quote>胶合</quote>在一起。</para> + </sect2> + + <sect2> + <title>许可管理器的启动</title> + <procedure> + <step> + <para>为许可管理器建立符号链接的脚本:</para> + + <screen>&prompt.root; <userinput>ln -s $MATLAB/etc/lmboot /usr/local/etc/lmboot_TMW</userinput> +&prompt.root; <userinput>ln -s $MATLAB/etc/lmdown /usr/local/etc/lmdown_TMW</userinput></screen> + </step> + + <step> + <para>建立启动文件<filename>/usr/local/etc/rc.d/flexlm.sh</filename>。 + 下面的例子是一个<filename>$MATLAB/etc/rc.lm.glnx86</filename>的修改版本。 + 变化的是文件的位置,和模拟Linux下许可管理器的启动。 </para> + + <programlisting>#!/bin/sh +case "$1" in + start) + if [ -f /usr/local/etc/lmboot_TMW ]; then + /compat/linux/bin/sh /usr/local/etc/lmboot_TMW -u <replaceable>username</replaceable> && echo 'MATLAB_lmgrd' + fi + ;; + stop) + if [ -f /usr/local/etc/lmdown_TMW ]; then + /compat/linux/bin/sh /usr/local/etc/lmdown_TMW > /dev/null 2>&1 + fi + ;; + *) + echo "Usage: $0 {start|stop}" + exit 1 + ;; +esac + +exit 0</programlisting> + + <important> + <para>必须使脚本文件可执行:</para> + + <screen>&prompt.root; <userinput>chmod +x /usr/local/etc/rc.d/flexlm.sh</userinput></screen> + + <para>您也必须替换<replaceable>username</replaceable>为机器上的一个用户(不要是<username>root</username>)。 + </para> + </important> + </step> + + <step> + <para>用命令启动许可管理器:</para> + + <screen>&prompt.root; <userinput>/usr/local/etc/rc.d/flexlm.sh start</userinput></screen> + </step> + </procedure> + </sect2> + + <sect2 id="matlab-jre"> + <title>链接&java;运行时环境</title> + + <para>改变<application>&java;</application>运行时环境(JRE),链接到一个可以工作的版本: + </para> + + <screen>&prompt.root; <userinput>cd $MATLAB/sys/java/jre/glnx86/</userinput> +&prompt.root; <userinput>unlink jre; ln -s ./jre1.1.8 ./jre</userinput></screen> + </sect2> + + <sect2> + <title>创建&matlab;启动脚本</title> + + <procedure> + <step> + <para>把下面的启动脚本放到<filename>/usr/local/bin/matlab</filename>: + </para> + + <programlisting>#!/bin/sh +/compat/linux/bin/sh /compat/linux/usr/local/matlab/bin/matlab "$@"</programlisting> + </step> + + <step> + <para>然后输入命令<command>chmod +x /usr/local/bin/matlab</command>。</para> + </step> + </procedure> + + <tip> + <para>依赖于您的<filename role="package">emulators/linux_base</filename>版本, + 您在运行这个脚本时可能会出错,为了避免错误,编辑<filename>/compat/linux/usr/local/matlab/bin/matlab</filename>, + 把这行:</para> + + <programlisting>if [ `expr "$lscmd" : '.*->.*'` -ne 0 ]; then</programlisting> + + <para>(在13.0.1版本是在第410行)改成:</para> + + <programlisting>if test -L $newbase; then</programlisting> + </tip> + </sect2> + + <sect2> + <title>Creating a &matlab; Shutdown Script</title> + + <para>The following is needed to solve a problem with &matlab; + not exiting correctly.</para> + + <procedure> + <step> + <para>Create a file + <filename>$MATLAB/toolbox/local/finish.m</filename>, and + in it put the single line:</para> + + <programlisting>! $MATLAB/bin/finish.sh</programlisting> + + <note><para>The <literal>$MATLAB</literal> is + literal.</para></note> + + <tip> + <para>In the same directory, you will find the files + <filename>finishsav.m</filename> and + <filename>finishdlg.m</filename>, which let you save + your workspace before quitting. If you use either of + them, insert the line above immediately after the + <literal>save</literal> command.</para></tip> + </step> + + <step> + <para>Create a file + <filename>$MATLAB/bin/finish.sh</filename>, which will + contain the following:</para> + + <programlisting>#!/usr/compat/linux/bin/sh +(sleep 5; killall -1 matlab_helper) & +exit 0</programlisting> + </step> + + <step> + <para>Make the file executable:</para> + + <screen>&prompt.root; <userinput>chmod +x $MATLAB/bin/finish.sh</userinput></screen> + </step> + </procedure> + </sect2> + + <sect2 id="matlab-using"> + <title>使用&matlab;</title> + + <para>现在您已经可以键入 + <command>matlab</command> 并开始使用它了。</para> + </sect2> + </sect1> + + <sect1 id="linuxemu-oracle"> + <sect1info> + <authorgroup> + <author> + <firstname>Marcel</firstname> + <surname>Moolenaar</surname> + <contrib>Contributed by </contrib> + </author> + <!-- marcel@cup.hp.com --> + </authorgroup> + </sect1info> + <title>安装&oracle;</title> + + <indexterm> + <primary>应用程序</primary> + <secondary><application>Oracle</application></secondary> + </indexterm> + + <sect2> + <title>前言</title> + <para>这节描述在FreeBSD上安装Linux版的<application>&oracle; 8.0.5</application>和<application>&oracle; 8.0.5.1 Enterprise Edition</application>。 + </para> + </sect2> + + <sect2> + <title>安装Linux环境</title> + + <para>确信您已经从ports collection安装了<filename role='package'>emulators/linux_base</filename> + 和<filename role='package'>devel/linux_devtools</filename>。如果运行这些ports有困难, + 您可能不得不使用packages或老版本的ports collection。</para> + + <para>如果您想运行智能代理,您还需要安Red Hat Tcl package: + <filename>tcl-8.0.3-20.i386.rpm</filename>。安装这些包的命令是使用官方安装程序 + <application>RPM</application>(ports里面<filename role='package'>archivers/rpm</filename>):</para> + + <screen>&prompt.root; <userinput>rpm -i --ignoreos --root /compat/linux --dbpath /var/lib/rpm <replaceable>package</replaceable></userinput></screen> + + <para><replaceable>包</replaceable>的安装通常不会出错。 </para> + </sect2> + + <sect2> + <title>创建&oracle;环境</title> + + <para>安装<application>&oracle;</application>之前,您需要设置正确的环境。 + 这节只描述了在FreeBSD下安装Linux版本<application>&oracle;</application>需要<emphasis>特别</emphasis>注意的地方。 + 不像在<application>&oracle;</application>安装指南中所描述的那样。 + </para> + + <sect3 id="linuxemu-kernel-tuning"> + <title>调整内核</title> + <indexterm><primary>调整内核</primary></indexterm> + + <para>正如<application>&oracle;</application>安装指南描述的那样,您需要设置共享内存的最大值。 + 不要在FreeBSD下使用<literal>SHMMAX</literal>,<literal>SHMMAX</literal> + 只是用来计算<literal>SHMMAXPGS</literal>和<literal>PGSIZE</literal>的。 + 因此要使用<literal>SHMMAXPGS</literal>。所有其他要使用的选项可以参考指南,例如:</para> + + <programlisting>options SHMMAXPGS=10000 +options SHMMNI=100 +options SHMSEG=10 +options SEMMNS=200 +options SEMMNI=70 +options SEMMSL=61</programlisting> + + <para>设置这些选项来适应 <application>&oracle;</application>的使用。</para> + + <para>当然,确信您的内核配置文件中有下面这些选项:</para> + +<programlisting>options SYSVSHM #SysV shared memory +options SYSVSEM #SysV semaphores +options SYSVMSG #SysV interprocess communication</programlisting> + </sect3> + + <sect3 id="linuxemu-oracle-account"> + + <title>&oracle;帐号</title> + + <para>创建一个<username>oracle</username>帐号,正如您创建其他帐号一样。 + <username>oracle</username> 帐号特殊的地方是您需要给它一个Linux shell。 + 添加<literal>/compat/linux/bin/bash</literal>到<filename>/etc/shells</filename>, + 然后设置<username>oracle</username>帐号的shell为<filename>/compat/linux/bin/bash</filename>。 + </para> + </sect3> + + <sect3 id="linuxemu-environment"> + <title>环境</title> + + <para>除了普通的<application>&oracle;</application>变量外, + 比如<envar>ORACLE_HOME</envar>和<envar>ORACLE_SID</envar>,您还必须设置下面的环境变量:</para> + + <informaltable frame="none"> + <tgroup cols="2"> + <colspec colwidth="1*"> + <colspec colwidth="2*"> + <thead> + <row> + <entry>变量</entry> + + <entry>值</entry> + </row> + </thead> + <tbody> + <row> + <entry><envar>LD_LIBRARY_PATH</envar></entry> + + <entry><literal>$ORACLE_HOME/lib</literal></entry> + </row> + + <row> + <entry><envar>CLASSPATH</envar></entry> + + <entry><literal>$ORACLE_HOME/jdbc/lib/classes111.zip</literal></entry> + </row> + + <row> + <entry><envar>PATH</envar></entry> + + <entry><literal>/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</literal></entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>建议在<filename>.profile</filename>里面设置所有的环境变量。一个完整的例子是: + </para> + +<programlisting>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 +PATH=$PATH:/compat/linux/usr/sbin:/bin:/sbin:/usr/bin:/usr/sbin +PATH=$PATH:/usr/local/bin:$ORACLE_HOME/bin +export PATH</programlisting> + </sect3> + </sect2> + + <sect2> + <title>安装&oracle;</title> + + <para>由于linux模拟器的一个小错误,在启动安装程序之前,您必须在<filename>/var/tmp</filename>下 + 创建<filename>.oracle</filename>目录。您可以把它设为所有人可写,或者由<username>oracle</username>用户拥有。 + 您必须没有问题的安装<application>&oracle;</application>,如果有问题,请检查一下<application>&oracle;</application> + 发行包,或先配置它。安装完<application>&oracle;</application>后,执行下面两步的修补工作。 + </para> + + <para>一个经常出现的问题是TCP协议的适配器没有安装好。结果您不能启动任何TCP监听。下面的工作将帮助您解决这个问题: + </para> + + <screen>&prompt.root; <userinput>cd $ORACLE_HOME/network/lib</userinput> +&prompt.root; <userinput>make -f ins_network.mk ntcontab.o</userinput> +&prompt.root; <userinput>cd $ORACLE_HOME/lib</userinput> +&prompt.root; <userinput>ar r libnetwork.a ntcontab.o</userinput> +&prompt.root; <userinput>cd $ORACLE_HOME/network/lib</userinput> +&prompt.root; <userinput>make -f ins_network.mk install</userinput></screen> + + <para>不要忘记了再运行一下<filename>root.sh</filename>!</para> + + <sect3 id="linuxemu-patch-root"> + <title>修补root.sh</title> + + <para>从CD安装<application>&oracle;</application>时,一些工作需要在<username>root</username>下执行, + 这些工作都被记录在一个叫<filename>root.sh</filename>的脚本里面。这个脚本被写在<filename>orainst</filename>目录。 + 为了使用<filename>root.sh</filename>来正确定位<command>chown</command>或在Linux本地shell下执行脚本, + 应该对它进行修补。</para> + + <programlisting>*** 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</programlisting> + + <para>当您不从CD安装<application>&oracle;</application>时, + 您可以从源代码来修补<filename>root.sh</filename>。 + 它叫做<filename>rthd.sh</filename>,定位在源代码树的<filename>orainst</filename>目录。 + </para> + </sect3> + + <sect3 id="linuxemu-patch-tcl"> + <title>修补genclntsh</title> + + <para><command>genclntsh</command>脚本用来创建一个简单的共享客户端库。在建立demos时被使用。 + 完成补丁后就注释掉了下面的<envar>PATH</envar>变量:</para> + + <programlisting>*** 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</programlisting> + </sect3> + </sect2> + + <sect2> + <title>运行&oracle;</title> + + <para>如果您已经按上面的指示去操作,您应该可以像在Linux下运行<application>&oracle;</application>了。 </para> + </sect2> + </sect1> + + <sect1 id="sapr3"> + <sect1info> + <authorgroup> + <author> + <firstname>Holger</firstname> + <surname>Kipp</surname> + <contrib>Contributed by </contrib> + </author> + </authorgroup> + <!-- holger.kipp@alogis.com --> + <authorgroup> + <author> + <firstname>Valentino</firstname> + <surname>Vaschetto</surname> + <contrib>Original version converted to SGML by </contrib> + </author> + </authorgroup> + </sect1info> + + <title>安装&sap.r3;</title> + + <indexterm> + <primary>应用程序</primary> + <secondary><application>SAP R/3</application></secondary> + </indexterm> + + <para>在FreeBSD上安装的<application>&sap;</application>系统不会被&sap; + 支持团队— 所支持——他们只支持某些特定的平台。 + </para> + + <sect2 id="preface"> + <title>前言</title> + + <para>这篇文章描述了在FreeBSD系统上安装一个带有<application>&oracle; Database</application> + for Linux的<application>&sap.r3; System</application>,包括 FreeBSD的安装和<application>&oracle;</application>的安装。 + 下面将描述两个不同的配置:</para> + + <itemizedlist> + <listitem> + <para>在FreeBSD 4.3-STABLE上安装带有<application>&oracle; 8.0.5</application> + 的<application>&sap.r3; 4.6B (IDES)</application>。 + </para> + </listitem> + + <listitem> + <para>在FreeBSD 4.5-STABLE上安装带有<application>&oracle; 8.1.7</application>的 + <application>&sap.r3; 4.6C</application>。 + </para> + </listitem> + </itemizedlist> + + <para>虽然这篇文章深入地描述了许多重要的安装步骤,但它不能取代<application>&oracle;</application>和 + <application>&sap.r3;</application>的安装指南。</para> + + <para>请参考<application>&sap.r3;</application> Linux edition自带的文档和 + <application>&oracle;</application>的特殊问题。</para> + </sect2> + + <sect2 id="software"> + <title>软件</title> + + <para>下面的CD-ROMs被用作<application>&sap;</application>的安装:</para> + + <sect3 id="software-46b"> + <title>&sap.r3; 4.6B, &oracle; 8.0.5</title> + + <informaltable frame="none"> + <tgroup cols=3> + <thead> + <row> + <entry>名称</entry> <entry>号码</entry> <entry>描述</entry> + </row> + </thead> + <tbody> + <row> + <entry>KERNEL</entry> <entry>51009113</entry> <entry>SAP Kernel Oracle / + Installation / AIX, Linux, Solaris</entry> + </row> + + <row> + <entry>RDBMS</entry> <entry>51007558</entry> <entry>Oracle / RDBMS 8.0.5.X / + Linux</entry> + </row> + + <row> + <entry>EXPORT1</entry> <entry>51010208</entry> <entry>IDES / DB-Export / + Disc 1 of 6</entry> + </row> + + <row> + <entry>EXPORT2</entry> <entry>51010209</entry> <entry>IDES / DB-Export / + Disc 2 of 6</entry> + </row> + + <row> + <entry>EXPORT3</entry> <entry>51010210</entry> <entry>IDES / DB-Export / + Disc 3 of 6</entry> + </row> + + <row> + <entry>EXPORT4</entry> <entry>51010211</entry> <entry>IDES / DB-Export / + Disc 4 of 6</entry> + </row> + + <row> + <entry>EXPORT5</entry> <entry>51010212</entry> <entry>IDES / DB-Export / + Disc 5 of 6</entry> + </row> + + <row> + <entry>EXPORT6</entry> <entry>51010213</entry> <entry>IDES / DB-Export / + Disc 6 of 6</entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>此外,我们使用<application>&oracle; 8 + Server</application> (Linux版本的8.0.5预览版,Linux内核是2.0.33)和 + FreeBSD 4.3-STABLE。</para> + + </sect3> + <sect3 id="software-46c"> + <title>&sap.r3; 4.6C SR2, &oracle; 8.1.7</title> + + <informaltable frame="none"> + <tgroup cols=3> + <thead> + <row> + <entry>名称</entry> <entry>号码</entry> <entry>描述</entry> + </row> + </thead> + + <tbody> + <row> + <entry>KERNEL</entry> <entry>51014004</entry> <entry>SAP Kernel Oracle / + SAP Kernel Version 4.6D / DEC, Linux</entry> + </row> + + <row> + <entry>RDBMS</entry> <entry>51012930</entry> <entry>Oracle 8.1.7/ RDBMS / + Linux</entry> + </row> + + <row> + <entry>EXPORT1</entry> <entry>51013953</entry> <entry>Release 4.6C SR2 / Export + / Disc 1 of 4</entry> + </row> + + <row> + <entry>EXPORT1</entry> <entry>51013953</entry> <entry>Release 4.6C SR2 / Export + / Disc 2 of 4</entry> + </row> + + <row> + <entry>EXPORT1</entry> <entry>51013953</entry> <entry>Release 4.6C SR2 / Export + / Disc 3 of 4</entry> + </row> + + <row> + <entry>EXPORT1</entry> <entry>51013953</entry> <entry>Release 4.6C SR2 / Export + / Disc 4 of 4</entry> + </row> + + <row> + <entry>LANG1</entry> <entry>51013954</entry> <entry>Release 4.6C SR2 / + Language / DE, EN, FR / Disc 1 of 3</entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>依赖于您要安装的语言,可能需要额外的语言CDs。 + 这儿我们只使用DE和EN,所以只需要第一张语言CD。 + 还要注意的是所有EXPORT CDs的号码是一样的。 + 其他3张语言CDs的号码也一样(这和4.6B IDES release CD的号码不同)。 + </para> + </sect3> + </sect2> + + <sect2 id="sap-notes"> + <title>&sap; Notes</title> + + <para>安装使用<application>&sap.r3;</application>之前,请先看看下面的注释: + </para> + + <sect3 id="sap-notes-46b"> + <title>&sap.r3; 4.6B, &oracle; 8.0.5</title> + + <informaltable frame="none"> + <tgroup cols="2"> + <thead> + <row> + <entry>号码</entry> + <entry>标题</entry> + </row> + </thead> + <tbody> + + <row> + <entry>0171356</entry> <entry>SAP Software on Linux: Essential + Comments</entry> + </row> + + <row> + <entry>0201147</entry> <entry>INST: 4.6C R/3 Inst. on UNIX - + Oracle</entry> + </row> + + <row> + <entry>0373203</entry> <entry>Update / Migration Oracle 8.0.5 --> + 8.0.6/8.1.6 LINUX</entry> + </row> + + <row> + <entry>0072984</entry> <entry>Release of Digital UNIX 4.0B for + Oracle</entry> + </row> + + <row> + <entry>0130581</entry> <entry>R3SETUP step DIPGNTAB terminates</entry> + </row> + + <row> + <entry>0144978</entry> <entry>Your system has not been installed + correctly</entry> + </row> + + <row> + <entry>0162266</entry> <entry>Questions and tips for R3SETUP on Windows + NT / W2K</entry> + </row> + </tbody> + </tgroup> + </informaltable> + </sect3> + + <sect3 id="sap-notes-46c"> + <title>&sap.r3; 4.6C, &oracle; 8.1.7</title> + + <informaltable frame="none"> + <tgroup cols="2"> + <thead> + <row> + <entry>号码</entry> + <entry>标题</entry> + </row> + </thead> + <tbody> + <row> + <entry>0015023</entry> <entry>Initializing table TCPDB (RSXP0004) + (EBCDIC)</entry> + </row> + + <row> + <entry>0045619</entry> <entry>R/3 with several languages or + typefaces</entry> + </row> + + <row> + <entry>0171356</entry> <entry>SAP Software on Linux: Essential + Comments</entry> + </row> + + <row> + <entry>0195603</entry> <entry>RedHat 6.1 Enterprise version: + Known problems</entry> + </row> + + <row> + <entry>0212876</entry> <entry>The new archiving tool SAPCAR</entry> + </row> + + <row> + <entry>0300900</entry> <entry>Linux: Released DELL Hardware</entry> + </row> + + <row> + <entry>0377187</entry> <entry>RedHat 6.2: important remarks</entry> + </row> + + <row> + <entry>0387074</entry> <entry>INST: R/3 4.6C SR2 Installation on + UNIX</entry> + </row> + + <row> + <entry>0387077</entry> <entry>INST: R/3 4.6C SR2 Inst. on UNIX - + Oracle</entry> + </row> + + <row> + <entry>0387078</entry> <entry>SAP Software on UNIX: OS Dependencies + 4.6C SR2</entry> + </row> + </tbody> + </tgroup> + </informaltable> + </sect3> + </sect2> + + <sect2 id="hardware-requirements"> + <title>硬件要求</title> + + <para>下面的设备配置对<application>&sap.r3; System</application>来说已经足够了。如果 + 用于生产用途,就需要更强的配置: + </para> + + <informaltable frame="none"> + <tgroup cols="3"> + <thead> + <row> + <entry>组件</entry> + <entry>4.6B</entry> + <entry>4.6C</entry> + </row> + </thead> + <tbody> + <row> + <entry>处理器</entry> + <entry>2 x 800MHz &pentium; III</entry> + <entry>2 x 800MHz &pentium; III</entry> + </row> + + <row> + <entry>内存</entry> + <entry>1GB ECC</entry> + <entry>2GB ECC</entry> + </row> + + <row> + <entry>Hard Disk Space</entry> + <entry>50-60GB (IDES)</entry> + <entry>50-60GB (IDES)</entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>用于生产使用,就需要使用带大缓存的&xeon;处理器,和高速大容量磁盘(SCSI, RAID hardware controller),以及USV + 和ECC-RAM内存。 配置IDES System前需要大量的硬盘空间,因为安装时将创建27 GB的数据库文件。 + 这些空间用于系统和数据的初始化也是足够的。 + </para> + + <sect3 id="hardware-46b"> + <title>&sap.r3; 4.6B, &oracle; 8.0.5</title> + + <para>对于这个安装,我的硬件配置如下:带2个800 MHz &pentium; III处理器的主板, &adaptec; 29160 Ultra160 + SCSI适配器(能够访问40/80 GB DLT磁带机和CDROM), + &mylex; &acceleraid; (2个通道, firmware 6.00-1-00 with 32 MB RAM)。 + &mylex; RAID controller被挂上2个17 GB(mirrored)硬盘和4个36 GB硬盘(RAID level 5)。</para> + </sect3> + + <sect3 id="hardware-46c"> + <title>&sap.r3; 4.6C, &oracle; 8.1.7</title> + + <para>对于这个安装,配置是&dell; &poweredge; 2500,带2个1000 MHz &pentium; III处理器的 + 主板(256 kB Cache), 2 GB PC133 ECC SDRAM, PERC/3 DC PCI RAID Controller +with 128 MB,和一个EIDE DVD-ROM驱动器。RAID controller被挂上2个18 GB硬盘(mirrored) +和4个36 GB硬盘(RAID level 5)。</para> + </sect3> + </sect2> + + <sect2 id="installation"> + <title>安装FreeBSD</title> + + <para>首先需要安装FreeBSD。有几种方法来装(FreeBSD 4.3通过FTP安装, FreeBSD 4.5直接从RELEASE CD安装)。 + 更多信息参考<xref + linkend="install-diff-media">。</para> + + <sect3 id="disk-layout"> + <title>磁盘划分</title> + + <para>为了简单,对<application>&sap.r3; 46B</application>和<application>&sap.r3; 46C + SR2</application>的安装使用相同的磁盘划分。只是设备名换了,因为是安装在不同的硬件上 + (<filename>/dev/da</filename> 和 <filename>/dev/amr</filename>, + 所以如果是使用AMI &megaraid;,我们能看到 <filename>/dev/amr0s1a</filename> 代替了 + <filename>/dev/da0s1a</filename>):</para> + + <informaltable frame="none"> + <tgroup cols="4"> + <thead> + <row> + <entry>文件系统</entry> + <entry>尺寸(1k-blocks)</entry> + <entry>尺寸(GB)</entry> + <entry>挂载点</entry> + </row> + </thead> + <tbody> + <row> + <entry><filename>/dev/da0s1a</filename></entry> + <entry>1.016.303</entry> + <entry>1</entry> + <entry><filename>/</filename></entry> + </row> + + <row> + <entry><filename>/dev/da0s1b</filename></entry> + <entry> </entry> + <entry>6</entry> + <entry>swap</entry> + </row> + + <row> + <entry><filename>/dev/da0s1e</filename></entry> + <entry>2.032.623</entry> + <entry>2</entry> + <entry><filename>/var</filename></entry> + </row> + + <row> + <entry><filename>/dev/da0s1f</filename></entry> + <entry>8.205.339</entry> + <entry>8</entry> + <entry><filename>/usr</filename></entry> + </row> + + <row> + <entry><filename>/dev/da1s1e</filename></entry> + <entry>45.734.361</entry> + <entry>45</entry> + <entry><filename>/compat/linux/oracle</filename></entry> + </row> + + <row> + <entry><filename>/dev/da1s1f</filename></entry> + <entry>2.032.623</entry> + <entry>2</entry> + <entry><filename>/compat/linux/sapmnt</filename></entry> + </row> + + <row> + <entry><filename>/dev/da1s1g</filename></entry> + <entry>2.032.623</entry> + <entry>2</entry> + <entry><filename>/compat/linux/usr/sap</filename></entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>预先用&mylex; 或PERC/3 RAID 软件配置和初始化这两个逻辑驱动器。 + 改变<acronym>BIOS</acronym>的引导顺序来启动软件。</para> + + <para>请注意这里的磁盘划分和&sap;推荐的是不一样的,&sap;建议把 + <application>&oracle;</application>子目录(及其他子目录)分离开来, + 我决定只简单的创建几个子目录。 + </para> + </sect3> + + <sect3 id="makeworldandnewkernel"> + <title><command>make world</command>和建立新内核</title> + + <para>下载最新的-STABLE源代码,配置完内核配置文件后重建系统和新内核。 + 这儿当然要包括 <application>&sap.r3;</application> + 和<application>&oracle;</application>需要的<link linkend="kerneltuning">内核参数</link>。 + </para> + </sect3> + </sect2> + + <sect2 id="installingthelinuxenviornment"> + <title>安装Linux环境</title> + + <sect3 id="installinglinuxbase-system"> + <title>安装Linux基本系统</title> + + <para>首先<link linkend="linuxemu-libs-port">linux_base</link> + port需要安装(以<username>root</username>身份):</para> + + <screen>&prompt.root; <userinput>cd /usr/ports/emulators/linux_base</userinput> +&prompt.root; <userinput>make install distclean</userinput></screen> + + </sect3> + + + <sect3 id="installinglinuxdevelopment"> + <title>安装Linux开发环境</title> + + <para>如果您想根据<xref linkend="linuxemu-oracle">在FreeBSD上安装 + <application>&oracle;</application> :</para> + + <screen>&prompt.root; <userinput>cd /usr/ports/devel/linux_devtools</userinput> +&prompt.root; <userinput>make install distclean</userinput></screen> + + <para>Linux开发环境只是安装给<application>&sap.r3; + 46B IDES</application>的,如果<application>&oracle; DB</application>不是在这个 + FreeBSD系统上重新链接,它就不需要了。 + </para> + + </sect3> + + + <sect3 id="installingnecessaryrpms"> + <title>安装必需的RPMs</title> + <indexterm><primary>RPMs</primary></indexterm> + + <para>为了启动<command>R3SETUP</command>程序, PAM支持是必需的。 + 第一次安装<application>&sap;</application>到FreeBSD 4.3-STABLE时我们先安装了 + PAM的所有依赖包再安装PAM包,它可以工作。对于<application>&sap.r3; 4.6C SR2</application>我们 + 直接安装PAM RPM也可以工作,所以依赖包不是必需的:</para> + + +<screen>&prompt.root; <userinput>rpm -i --ignoreos --nodeps --root /compat/linux --dbpath /var/lib/rpm \ +pam-0.68-7.i386.rpm</userinput></screen> + + <para>要让<application>&oracle; 8.0.5</application>运行智能代理, + 我们需要安装RedHat Tcl包<filename>tcl-8.0.5-30.i386.rpm</filename> + (否则重新链接<application>&oracle;</application>不能工作)。 + 重新链接<application>&oracle;</application>时还有其他要注意的地方, + 但那是<application>&oracle;</application> Linux的问题,不是FreeBSD的问题。 + </para> + + </sect3> + + <sect3 id="linuxprocandfallbackelfbrand"> + <title>其它一些注意的地方</title> + + <para>添加<literal>linprocfs</literal>到<filename>/etc/fstab</filename>是个好主意, + 更多信息看&man.linprocfs.5;手册页。 + 另一个要设置的参数是<literal>kern.fallback_elf_brand=3</literal>, + 在<filename>/etc/sysctl.conf</filename>里面设置。</para> + </sect3> + </sect2> + + <sect2 id="creatingsapr3env"> + <title>创建&sap.r3;环境</title> + + <sect3 id="filesystemsandmountpoints"> + <title>创建必需的文件系统和挂载点</title> + + <para>对简单的安装,创建下面的文件系统就够了:</para> + + <informaltable frame="none"> + <tgroup cols="2"> + <thead> + <row> + <entry>mount point</entry> + <entry>size in GB</entry> + </row> + </thead> + <tbody> + <row> + <entry><filename>/compat/linux/oracle</filename></entry> + <entry>45 GB</entry> + </row> + + <row> + <entry><filename>/compat/linux/sapmnt</filename></entry> + <entry>2 GB</entry> + </row> + + <row> + <entry><filename>/compat/linux/usr/sap</filename></entry> + <entry>2 GB</entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>创建一些链接也是必要的,否则<application>&sap;</application>安装程序在检查创建的链接时 + 会报错: + </para> + + <screen>&prompt.root; <userinput>ln -s /compat/linux/oracle /oracle</userinput> +&prompt.root; <userinput>ln -s /compat/linux/sapmnt /sapmnt</userinput> +&prompt.root; <userinput>ln -s /compat/linux/usr/sap /usr/sap</userinput></screen> + + <para>安装时可能出现的错误(对于<emphasis>PRD</emphasis>系统和<application>&sap.r3; 4.6C SR2</application> + 的安装):</para> + + <screen>INFO 2002-03-19 16:45:36 R3LINKS_IND_IND SyLinkCreate:200 + Checking existence of symbolic link /usr/sap/PRD/SYS/exe/dbg to + /sapmnt/PRD/exe. Creating if it does not exist... + +WARNING 2002-03-19 16:45:36 R3LINKS_IND_IND SyLinkCreate:400 + Link /usr/sap/PRD/SYS/exe/dbg exists but it points to file + /compat/linux/sapmnt/PRD/exe instead of /sapmnt/PRD/exe. The + program cannot go on as long as this link exists at this + location. Move the link to another location. + +ERROR 2002-03-19 16:45:36 R3LINKS_IND_IND Ins_SetupLinks:0 + can not setup link '/usr/sap/PRD/SYS/exe/dbg' with content + '/sapmnt/PRD/exe'</screen> + </sect3> + + <sect3 id="creatingusersanddirectories"> + <title>创建用户和目录</title> + + <para><application>&sap.r3;</application>需要两个用户和3个组。 + 用户名依赖于包含3个字母的<application>&sap;</application>系统ID(SID)。一些SIDs + 被<application>&sap;</application>保留(例如<literal>SAP</literal>和<literal>NIX</literal>)。 + 完成的列表参考<application>&sap;</application>文档。对于IDES的安装,我们使用<literal>IDS</literal>, + 对于4.6C SR2安装,使用<literal>PRD</literal>。 这样我们定义了下面的几个组: + </para> + + <informaltable frame="none"> + <tgroup cols="3"> + <thead> + <row> + <entry>组ID</entry> + <entry>组名</entry> + <entry>描述</entry> + </row> + </thead> + <tbody> + <row> + <entry>100</entry> + <entry>dba</entry> + <entry>Data Base Administrator</entry> + </row> + <row> + <entry>101</entry> + <entry>sapsys</entry> + <entry>&sap; System</entry> + </row> + <row> + <entry>102</entry> + <entry>oper</entry> + <entry>Data Base Operator</entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>对于默认的<application>&oracle;</application>安装,只有<groupname>dba</groupname>组被使用。 + 和<groupname>oper</groupname>组一样,我们也可以使用<groupname>dba</groupname>组 + (更详细的信息参考<application>&oracle;</application>和 + <application>&sap;</application>文档)。</para> + + <para>我们也需要下面的用户</para> + + <informaltable frame="none"> + <tgroup cols="6"> + <thead> + <row> + <entry>用户ID</entry> + <entry>用户名</entry> + <entry>普通名称</entry> + <entry>组</entry> + <entry>附加组</entry> + <entry>描述</entry> + </row> + </thead> + <tbody> + <row> + <entry>1000</entry> + <entry>idsadm/prdadm</entry> + <entry><replaceable>sid</replaceable>adm</entry> + <entry>sapsys</entry> + <entry>oper</entry> + <entry>&sap; Administrator</entry> + </row> + <row> + <entry>1002</entry> + <entry>oraids/oraprd</entry> + <entry>ora<replaceable>sid</replaceable></entry> + <entry>dba</entry> + <entry>oper</entry> + <entry>&oracle; Administrator</entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>使用&man.adduser.8;添加用户要求<quote>&sap; Administrator</quote>有下面的记录 + (请注意shell和home目录):</para> + + <programlisting>Name: <replaceable>sid</replaceable>adm +Password: ****** +Fullname: SAP Administrator <replaceable>SID</replaceable> +Uid: 1000 +Gid: 101 (sapsys) +Class: +Groups: sapsys dba +HOME: /home/<replaceable>sid</replaceable>adm +Shell: bash (/compat/linux/bin/bash)</programlisting> + + <para>对于<quote>&oracle; Administrator</quote>:</para> + + <programlisting>Name: ora<replaceable>sid</replaceable> +Password: ****** +Fullname: Oracle Administrator <replaceable>SID</replaceable> +Uid: 1002 +Gid: 100 (dba) +Class: +Groups: dba +HOME: /oracle/<replaceable>sid</replaceable> +Shell: bash (/compat/linux/bin/bash)</programlisting> + + <para>在您使用组<groupname>dba</groupname>和<groupname>oper</groupname>的情况下您也应该包括 + <groupname>oper</groupname>。</para> + + </sect3> + + <sect3 id="creatingdirectories"> + <title>创建目录</title> + + <para>这些目录通常建立在不同的文件系统上。这完全依赖于您的需求。 + 我们选择把它们建立在同一个目录: + </para> + + <para>首先我们将设置一些目录的所有者和权限(以<username>root</username>身份设置):</para> + + <screen>&prompt.root; <userinput>chmod 775 /oracle</userinput> +&prompt.root; <userinput>chmod 777 /sapmnt</userinput> +&prompt.root; <userinput>chown root:dba /oracle</userinput> +&prompt.root; <userinput>chown <replaceable>sid</replaceable>adm:sapsys /compat/linux/usr/sap</userinput> +&prompt.root; <userinput>chmod 775 /compat/linux/usr/sap</userinput></screen> + + <para>然后我们以<username>ora<replaceable>sid</replaceable></username>身份创建目录, + 这些目录将成为<filename>/oracle/<replaceable>SID</replaceable></filename>的子目录:</para> + + <screen>&prompt.root; <userinput>su - ora<replaceable>sid</replaceable></userinput> +&prompt.root; <userinput>cd /oracle/<replaceable>SID</replaceable></userinput> +&prompt.root; <userinput>mkdir mirrlogA mirrlogB origlogA origlogB</userinput> +&prompt.root; <userinput>mkdir sapdata1 sapdata2 sapdata3 sapdata4 sapdata5 sapdata6</userinput> +&prompt.root; <userinput>mkdir saparch sapreorg</userinput> +&prompt.root; <userinput>exit</userinput></screen> + + <para>对于<application>&oracle; 8.1.7</application>的安装,需要一些额外的目录: + </para> + + <screen>&prompt.root; <userinput>su - ora<replaceable>sid</replaceable></userinput> +&prompt.root; <userinput>cd /oracle</userinput> +&prompt.root; <userinput>mkdir 805_32</userinput> +&prompt.root; <userinput>mkdir client stage</userinput> +&prompt.root; <userinput>mkdir client/80x_32</userinput> +&prompt.root; <userinput>mkdir stage/817_32</userinput> +&prompt.root; <userinput>cd /oracle/<replaceable>SID</replaceable></userinput> +&prompt.root; <userinput>mkdir 817_32</userinput></screen> + + <note><para>目录<filename>client/80x_32</filename>必须是这个名字,不要用其他数字或字母来替换<emphasis>x</emphasis>。 + </para></note> + + <para>第三步我们要以<username><replaceable>sid</replaceable>adm</username>身份创建目录: + </para> + + <screen>&prompt.root; <userinput>su - <replaceable>sid</replaceable>adm</userinput> +&prompt.root; <userinput>cd /usr/sap</userinput> +&prompt.root; <userinput>mkdir <replaceable>SID</replaceable></userinput> +&prompt.root; <userinput>mkdir trans</userinput> +&prompt.root; <userinput>exit</userinput></screen> + </sect3> + + <sect3 id="entriesinslashetcslashservices"> + <title><filename>/etc/services</filename>中的条目</title> + + <para><application>&sap.r3;</application>在<filename>/etc/services</filename>里面需要一些条目, + 这些不会在安装过程中被正确设置,请添加下面的条目:</para> + + <programlisting> +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 +sapms<replaceable>SID</replaceable> 3600/tcp # SAP Message Server. 3600 + Instance-Number +sapgw00s 4800/tcp # SAP Secure Gateway 4800 + Instance-Number</programlisting> + </sect3> + + <sect3 id="necessarylocales"> + <title>必要的本地化</title> + <indexterm><primary>本地化</primary></indexterm> + + <para><application>&sap;</application>至少要求两个本地化设置,它不是RedHat的默认安装。 + &sap;提供从他们的FTP服务器下载必需的RPMs(只有您是OSS的客户才能访问)。 + 看注解0171356查找您需要的RPMs列表。</para> + + <para>也可以只创建适当的链接(例如从<emphasis>de_DE</emphasis>到<emphasis>en_US</emphasis>), + 但是我们不推荐在生产系统上这样做(尽管它让IDES system工作的没有一点问题)。 + 下面的本地化设置是必需的:</para> + + <programlisting>de_DE.ISO-8859-1 +en_US.ISO-8859-1</programlisting> + + <para>像这样创建链接</para> + + <screen>&prompt.root; <userinput>cd /compat/linux/usr/share/locale</userinput> +&prompt.root; <userinput>ln -s de_DE de_DE.ISO-8859-1</userinput> +&prompt.root; <userinput>ln -s en_US en_US.ISO-8859-1</userinput></screen> + + <para>如果他们不出现,在安装时可能会有问题。如果忽略这些问题(通过设置<filename>CENTRDB.R3S</filename>文件 + 里面的<literal>STATUS</literal>为<literal>OK</literal>),不费一番周折, + 您就别想登陆进<application>&sap;</application>系统。</para> + </sect3> + + <sect3 id="kerneltuning"> + <title>内核调整</title> + <indexterm><primary>内核调整</primary></indexterm> + + <para><application>&sap.r3;</application> + 需要许多资源。我因此添加了下面的参数在我的内核配置文件中: +</para> + + <programlisting># 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 SHMMAXPGS=393216 #use this for the 46C inst.parameters +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 identifiers +options SEMUME=100 #number of UNDO keys</programlisting> + + + <para>这篇文档中指定的最小值是来自&sap;。没有针对Linux的描述,看看HP-UX的相关介绍了解更多信息 。 + 安装4.6C SR2需要更多的内存,共享内存比<application>&sap;</application>和 + <application>&oracle;</application>需要的还多,所以尽量为共享内存选一个大值。 + </para> + + <note><para>FreeBSD 4.5在&i386;上缺省应该设置<literal>MAXDSIZ</literal>和 + <literal>DFLDSIZ</literal>到1 GB。否则,奇怪的错误像 + <errorname>ORA-27102: out of memory</errorname>和 + <errorname>Linux Error: 12: Cannot allocate memory</errorname> + 会出现。</para></note> + </sect3> + </sect2> + + <sect2 id="installingsapr3"> + <title>安装&sap.r3;</title> + + <sect3 id="preparingsapcdroms"> + <title>准备&sap; CDROMs</title> + + <para>在安装过程中,有许多CDROM要被挂上和卸下。建议您有多个CDROM驱动器, + 您可以把它们都挂上。我决定拷贝CDROM的内容到相应的目录:</para> + + <programlisting>/oracle/<replaceable>SID</replaceable>/sapreorg/<replaceable>cd-name</replaceable></programlisting> + + <para>对于4.6B/IDES的安装,<replaceable>cd-name</replaceable>是<filename>KERNEL</filename>, + <filename>RDBMS</filename>, <filename>EXPORT1</filename>, + <filename>EXPORT2</filename>,<filename>EXPORT3</filename>, + <filename>EXPORT4</filename>, <filename>EXPORT5</filename> 和 + <filename>EXPORT6</filename>中的一个,对于4.6C SR2的安装,是 + <filename>KERNEL</filename>, <filename>RDBMS</filename>, + <filename>DISK1</filename>,<filename>DISK2</filename>, + <filename>DISK3</filename>,<filename>DISK4</filename>和 + <filename>LANG</filename>中的一个。 + 所有挂载上的CDs里面的文件名都应该是大写, 否则要用<option>-g</option>选项来挂载。所以使用下面的命令: + </para> + + <screen>&prompt.root; <userinput>mount_cd9660 -g /dev/cd0a /mnt</userinput> +&prompt.root; <userinput>cp -R /mnt/* /oracle/<replaceable>SID</replaceable>/sapreorg/<replaceable>cd-name</replaceable></userinput> +&prompt.root; <userinput>umount /mnt</userinput></screen> + </sect3> + + <sect3 id="runningtheinstall-script"> + <title>运行安装脚本</title> + + <para>首先您需要准备一个<filename class="directory">install</filename>目录:</para> + + <screen>&prompt.root; <userinput>cd /oracle/<replaceable>SID</replaceable>/sapreorg</userinput> +&prompt.root; <userinput>mkdir install</userinput> +&prompt.root; <userinput>cd install</userinput></screen> + + <para>然后运行安装脚本,他会拷贝所有相关的文件到<filename class="directory">install</filename>目录:</para> + + <screen>&prompt.root; <userinput>/oracle/<replaceable>SID</replaceable>/sapreorg/KERNEL/UNIX/INSTTOOL.SH</userinput></screen> + + <para>由于这是一个完全定制化的&sap.r3;演示系统的IDES安装(4.6B), + 我们有6个而不仅仅是3个EXPORT CDs。 + 基于这点,安装模板<filename>CENTRDB.R3S</filename>是用来安装一个标准的中央环境 + (<application>&r3;</application>和数据库),而不是IDES中央环境, + 所以从<filename class="directory">EXPORT1</filename>目录拷贝相应的<filename>CENTRDB.R3S</filename>, + 否则<command>R3SETUP</command>只要求3个EXPORT CDs。 + </para> + + <para>新的<application>&sap; 4.6C SR2</application>发行版带有4张EXPORT CDs。 + 控制安装步骤的参数文件是<filename>CENTRAL.R3S</filename>。 + 和早期发行版不同,它没有分开的中央环境的安装模板。 + </para> + + <para>安装完后,使用<command>hostname</command>命令得到<application>&sap;</application>需要的主机名, + 不需要完整的域名。 + 所以为<username>ora<replaceable>sid</replaceable></username>和 + <username><replaceable>sid</replaceable>adm</username> + 直接设置主机名,或设置别名<command>alias hostname='hostname -s'</command>。 + 可以在<filename>.profile</filename>和<filename>.login</filename>里面为这两个用户设置。 + </para> + </sect3> + + <sect3 id="startr3setup-46B"> + <title>启动<command>R3SETUP</command> 4.6B</title> + + <para>确定<envar>LD_LIBRARY_PATH</envar>设置正确: + </para> + + <screen>&prompt.root; <userinput>export LD_LIBRARY_PATH=/oracle/IDS/lib:/sapmnt/IDS/exe:/oracle/805_32/lib</userinput></screen> + + <para>从安装目录以<username>root</username>身份启动<command>R3SETUP</command>: + </para> + + <screen>&prompt.root; <userinput>cd /oracle/IDS/sapreorg/install</userinput> +&prompt.root; <userinput>./R3SETUP -f CENTRDB.R3S</userinput></screen> + + <para>这个脚本会问一些问题(括号里面是缺省值,后面是实际输入): + </para> + + <informaltable frame="none"> + <tgroup cols="3"> + <thead> + <row> + <entry>问题</entry> + <entry>缺省值</entry> + <entry>输入</entry> + </row> + </thead> + <tbody> + <row> + <entry>Enter SAP System ID</entry> + <entry>[C11]</entry> + <entry>IDS<keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter SAP Instance Number</entry> + <entry>[00]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter SAPMOUNT Directory</entry> + <entry>[/sapmnt]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter name of SAP central host</entry> + <entry>[troubadix.domain.de]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter name of SAP db host</entry> + <entry>[troubadix]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Select character set</entry> + <entry>[1] (WE8DEC)</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter Oracle server version (1) Oracle 8.0.5, (2) Oracle 8.0.6, (3) Oracle 8.1.5, (4) Oracle 8.1.6</entry> + <entry> </entry> + <entry>1<keycap>Enter</keycap></entry> + </row> + <row> + <entry>Extract Oracle Client archive</entry> + <entry>[1] (Yes, extract)</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter path to KERNEL CD</entry> + <entry>[/sapcd]</entry> + <entry>/oracle/IDS/sapreorg/KERNEL</entry> + </row> + <row> + <entry>Enter path to RDBMS CD</entry> + <entry>[/sapcd]</entry> + <entry>/oracle/IDS/sapreorg/RDBMS</entry> + </row> + <row> + <entry>Enter path to EXPORT1 CD</entry> + <entry>[/sapcd]</entry> + <entry>/oracle/IDS/sapreorg/EXPORT1</entry> + </row> + <row> + <entry>Directory to copy EXPORT1 CD</entry> + <entry>[/oracle/IDS/sapreorg/CD4_DIR]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter path to EXPORT2 CD</entry> + <entry>[/sapcd]</entry> + <entry>/oracle/IDS/sapreorg/EXPORT2</entry> + </row> + <row> + <entry>Directory to copy EXPORT2 CD</entry> + <entry>[/oracle/IDS/sapreorg/CD5_DIR]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter path to EXPORT3 CD</entry> + <entry>[/sapcd]</entry> + <entry>/oracle/IDS/sapreorg/EXPORT3</entry> + </row> + <row> + <entry>Directory to copy EXPORT3 CD</entry> + <entry>[/oracle/IDS/sapreorg/CD6_DIR]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter path to EXPORT4 CD</entry> + <entry>[/sapcd]</entry> + <entry>/oracle/IDS/sapreorg/EXPORT4</entry> + </row> + <row> + <entry>Directory to copy EXPORT4 CD</entry> + <entry>[/oracle/IDS/sapreorg/CD7_DIR]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter path to EXPORT5 CD</entry> + <entry>[/sapcd]</entry> + <entry>/oracle/IDS/sapreorg/EXPORT5</entry> + </row> + <row> + <entry>Directory to copy EXPORT5 CD</entry> + <entry>[/oracle/IDS/sapreorg/CD8_DIR]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter path to EXPORT6 CD</entry> + <entry>[/sapcd]</entry> + <entry>/oracle/IDS/sapreorg/EXPORT6</entry> + </row> + <row> + <entry>Directory to copy EXPORT6 CD</entry> + <entry>[/oracle/IDS/sapreorg/CD9_DIR]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter amount of RAM for SAP + DB</entry> + <entry> </entry> + <entry>850<keycap>Enter</keycap> (in Megabytes)</entry> + </row> + <row> + <entry>Service Entry Message Server</entry> + <entry>[3600]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter Group-ID of sapsys</entry> + <entry>[101]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter Group-ID of oper</entry> + <entry>[102]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter Group-ID of dba</entry> + <entry>[100]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter User-ID of <replaceable>sid</replaceable>adm</entry> + <entry>[1000]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter User-ID of ora<replaceable>sid</replaceable></entry> + <entry>[1002]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Number of parallel procs</entry> + <entry>[2]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>如果没有把CD拷贝到不同的位置,那么<application>&sap;</application>安装程序就不能 + 找到需要的CD(通过CD上的<filename>LABEL.ASC</filename>来辨别), + 它会要求您挂上CD,或键入加载路径。 + </para> + + <para><filename>CENTRDB.R3S</filename>不可能是自由出错的, + 它再次请求EXPORT4 CD,但是正确的值是6_LOCATI ON,然后7_LOCATION 等,所以您可以键入正确的值。 + </para> + + + + + <para>处理下面提到的问题,一样东西都要直接通过&oracle;数据库软件安装的地方。 + </para> + </sect3> + + <sect3 id="startr3setup-46C"> + <title>Start <command>R3SETUP</command> 4.6C SR2</title> + + <para>确定<envar>LD_LIBRARY_PATH</envar>设置正确。 + 这和带<application>&oracle; 8.0.5</application>的4.6B的安装是不同的: + </para> + + <screen>&prompt.root; <userinput>export LD_LIBRARY_PATH=/sapmnt/PRD/exe:/oracle/PRD/817_32/lib</userinput></screen> + + <para>以<username>root</username>身份从安装目录启动<filename>R3SETUP</filename> :</para> + + <screen>&prompt.root; <userinput>cd /oracle/PRD/sapreorg/install</userinput> +&prompt.root; <userinput>./R3SETUP -f CENTRAL.R3S</userinput></screen> + + <para>这个脚本会问一些问题(括号里面是缺省值,后面是实际输入):</para> + + <informaltable frame="none"> + <tgroup cols="3"> + <thead> + <row> + <entry>问题</entry> + <entry>缺省值</entry> + <entry>输入</entry> + </row> + </thead> + <tbody> + <row> + <entry>Enter SAP System ID</entry> + <entry>[C11]</entry> + <entry>PRD<keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter SAP Instance Number</entry> + <entry>[00]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter SAPMOUNT Directory</entry> + <entry>[/sapmnt]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter name of SAP central host</entry> + <entry>[majestix]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter Database System ID</entry> + <entry>[PRD]</entry> + <entry>PRD<keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter name of SAP db host</entry> + <entry>[majestix]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Select character set</entry> + <entry>[1] (WE8DEC)</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter Oracle server version (2) Oracle 8.1.7</entry> + <entry> </entry> + <entry>2<keycap>Enter</keycap></entry> + </row> + <row> + <entry>Extract Oracle Client archive</entry> + <entry>[1] (Yes, extract)</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter path to KERNEL CD</entry> + <entry>[/sapcd]</entry> + <entry>/oracle/PRD/sapreorg/KERNEL</entry> + </row> + <row> + <entry>Enter amount of RAM for SAP + DB</entry> + <entry>2044</entry> + <entry>1800<keycap>Enter</keycap> (in Megabytes)</entry> + </row> + <row> + <entry>Service Entry Message Server</entry> + <entry>[3600]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter Group-ID of sapsys</entry> + <entry>[100]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter Group-ID of oper</entry> + <entry>[101]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter Group-ID of dba</entry> + <entry>[102]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter User-ID of <username>oraprd</username></entry> + <entry>[1002]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter User-ID of <username>prdadm</username></entry> + <entry>[1000]</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>LDAP support</entry> + <entry> </entry> + <entry>3<keycap>Enter</keycap> (no support)</entry> + </row> + <row> + <entry>Installation step completed</entry> + <entry>[1] (continue)</entry> + <entry><keycap>Enter</keycap></entry> + </row> + <row> + <entry>Choose installation service</entry> + <entry>[1] (DB inst,file)</entry> + <entry><keycap>Enter</keycap></entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>到目前为止, 安装阶段只在创建用户时给出了一个错误OSUSERDBSID_IND_ORA(创建 + 用户<username>ora<replaceable>sid</replaceable></username>)和 + OSUSERSIDADM_IND_ORA(创建用户<username><replaceable>sid</replaceable>adm</username>)。</para> + + <para>处理下面提到的问题,一样东西都要直接通过&oracle;数据库软件安装的地方。</para> + </sect3> + </sect2> + + <sect2 id="installingoracle805"> + <title>安装&oracle; 8.0.5</title> + + <para>请看相应的&sap;注释和 &oracle;的关于Linux的<filename>Readme</filename> + 以及<application>&oracle; DB</application>可能出现的问题。不是所有的问题都和不兼容库有关。 + </para> + + <para>关于<application>&oracle;</application>更多的安装信息,请参考<link + linkend="linuxemu-oracle">安装&oracle;</link>。</para> + + + <sect3 id="installingtheoracle805withorainst"> + <title>用<command>orainst</command>安装&oracle; 8.0.5</title> + + <para>如果<application>&oracle; 8.0.5</application>要被使用,一些其他的库需要被成功地重新链接, + 因为<application>&oracle; 8.0.5</application>是与一个老的glibc连接的(Redhat 6.0), + 但RedHat 6.1已经使用了一个新的glibc。所以您必须安装下面额外的软件包来保证链接正常: + </para> + + <para><filename>compat-libs-5.2-2.i386.rpm</filename></para> + <para><filename>compat-glibc-5.2-2.0.7.2.i386.rpm</filename></para> + <para><filename>compat-egcs-5.2-1.0.3a.1.i386.rpm</filename></para> + <para><filename>compat-egcs-c++-5.2-1.0.3a.1.i386.rpm</filename></para> + <para><filename>compat-binutils-5.2-2.9.1.0.23.1.i386.rpm</filename></para> + + <para>更多的信息,看相应的&sap;注释和&oracle;的<filename>Readme</filename>。 + 如果这不是选项,您可以使用最初的程序,或使用与最初的Redhat系统重链接的程序。 + </para> + + <para>要编译智能代理,必须安装RedHat Tcl包。如果您不能得到 + <filename>tcl-8.0.3-20.i386.rpm</filename>,一个更新的 + <filename>tcl-8.0.5-30.i386.rpm</filename>也可以用。</para> + + <para>除了重新链接,安装是直截了当的:</para> + + <screen>&prompt.root; <userinput>su - oraids</userinput> +&prompt.root; <userinput>export TERM=xterm</userinput> +&prompt.root; <userinput>export ORACLE_TERM=xterm</userinput> +&prompt.root; <userinput>export ORACLE_HOME=/oracle/IDS</userinput> +&prompt.root; <userinput>cd /ORACLE_HOME/orainst_sap</userinput> +&prompt.root; <userinput>./orainst</userinput></screen> + + <para>用<keycap>Enter</keycap>来确认所有的屏幕直到安装完成,除了您必须取消 + <emphasis>&oracle; On-Line Text Viewer</emphasis>选项,因为当前Linux下不可用。 + <application>&oracle;</application>会要求用<command>i386-glibc20-linux-gcc</command>重新链接来 + 代替<command>gcc</command>,<command>egcs</command>或者<command>i386-redhat-linux-gcc + </command>。</para> + + + <para>由于时间紧迫,我决定使用<application>&oracle; 8.0.5 PreProduction</application>版本。 + </para> + + </sect3> + + <sect3 id="installingtheoracle805preproduction"> + <title>安装&oracle; 8.0.5 Pre-production Release for + Linux (Kernel 2.0.33)</title> + + + <para>个安装很容易。挂上CD,启动安装程序。它就会要求&oracle;home目录的定位, + 然后拷贝那儿所有的程序。我不删除先前安装的RDBMS。 + + </para> + + <para>然后,<application>&oracle;</application>数据库就可以毫无问题地运行了。 + </para> + </sect3> + </sect2> + + <sect2 id="installingoracle817"> + <title>安装&oracle; 8.1.7 Linux压缩包</title> + <para>拷贝<filename>oracle81732.tgz</filename>到您要安装的目录, + 然后解压到<filename>/oracle/<replaceable>SID</replaceable>/817_32/</filename>。 + </para> + </sect2> + + <sect2 id="continuewithsapr4installation"> + <title>继续&sap.r3;安装</title> + + <para>首先检查用户<username>idsamd</username> + (<replaceable>sid</replaceable>adm)和 + <username>oraids</username>(ora<replaceable>sid</replaceable>)的环境变量。 + 他们现在都有使用主机名的<filename>.profile</filename>,<filename>.login</filename> + 和<filename>.cshrc</filename>文件。在这个例子中,系统的主机名是没有限制的名称, + 您必须在所有三个文件中改变hostname为hostname -s。 + </para> + + <sect3 id="databaseload"> + <title>加载数据库</title> + + <para>然后,可以重新启动或继续<command>R3SETUP</command>。 <command>R3SETUP</command>就使用<command>R3load</command> + 创建表空间加载数据(对46B IDES,从EXPORT1到EXPORT6,对46C从DISK1到DISK4)。 + </para> + + <para>数据加载完后(可能需要一些时间),需要创建一些口令。对于测试安装,可以使用缺省口令: + </para> + + <informaltable frame="none"> + <tgroup cols="2"> + <thead> + <row> + <entry>问题</entry> + <entry>输入</entry> + </row> + </thead> + <tbody> + <row> + <entry>Enter Password for sapr3</entry> + <entry>sap<keycap>Enter</keycap></entry> + </row> + <row> + <entry>Confirum Password for sapr3</entry> + <entry>sap<keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter Password for sys</entry> + <entry>change_on_install<keycap>Enter</keycap></entry> + </row> + <row> + <entry>Confirm Password for sys</entry> + <entry>change_on_install<keycap>Enter</keycap></entry> + </row> + <row> + <entry>Enter Password for system</entry> + <entry>manager<keycap>Enter</keycap></entry> + </row> + <row> + <entry>Confirm Password for system</entry> + <entry>manager<keycap>Enter</keycap></entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>到目前为止,我们只在安装4.6B的过程中<command>dipgntab</command>出现了几个问题。 + </para> + </sect3> + + <sect3 id="listener"> + <title>监听</title> + + <para>像下面这样用<username>ora<replaceable>sid</replaceable></username>用户启动 + <application>&oracle;</application>: + </para> + + <screen>&prompt.user; <userinput>umask 0; lsnrctl start</userinput></screen> + + <para>另外您可能得到<errorcode>ORA-12546</errorcode>错误,因为sockets没有正确的权限。 + 看&sap;注释072984。</para> + </sect3> + + <sect3 id="mnlstables"> + <title>更新MNLS表</title> + <para>如果您打算倒入non-Latin-1 languages到<application>&sap;</application>系统, + 您必须更新表的多语言支持。这在&sap; OSS注释15023和45619有描述。否则, + 您可以在安装<application>&sap;</application>的时候忽略这个问题。 + </para> + <note><para>如果您不需要MNLS,还是需要检查表TCPDB和初始化工作是否做了。 + 更多信息参考&sap;注释0015023和0045619。</para></note> + </sect3> + </sect2> + + <sect2 id="postinstallationsteps"> + <title>快速安装步骤</title> + + <sect3 id="requestsapr3licensekey"> + <title>需要&sap.r3;许可密钥</title> + + <para>您不得不要<application>&sap.r3;</application>许可密钥。这是必需的, + 因为临时许可只能用4个星期。 首先得到硬件的密匙。以用<username>idsadm</username>登入, + 然后调用<command>saplicense</command>:</para> + + <screen>&prompt.root; <userinput>/sapmnt/IDS/exe/saplicense -get</userinput></screen> + + <para>不带参数调用<command>saplicense</command>会给出一系列选项。 + 要安装上面的许可密钥,可以这样:</para> + + <screen>&prompt.root; <userinput>/sapmnt/IDS/exe/saplicense -install</userinput></screen> + + <para>您要输入下面的值:</para> + + <programlisting>SAP SYSTEM ID = <replaceable>SID, 3 chars</replaceable> +CUSTOMER KEY = <replaceable>hardware key, 11 chars</replaceable> +INSTALLATION NO = <replaceable>installation, 10 digits</replaceable> +EXPIRATION DATE = <replaceable>yyyymmdd, usually "99991231"</replaceable> +LICENSE KEY = <replaceable>license key, 24 chars</replaceable></programlisting> + </sect3> + + <sect3 id="creatingusers"> + <title>创建用户</title> + + <para>在客户机000中创建一个用户(有些工作需用客户机000来完成,但与用户<username>sap*</username>和 + <username>ddic</username>有些不同)。 作为一个用户名,我通常选择<username>wartung</username> + (或英语中的<username>service</username>)。 配置文件需要<literal>sap_new</literal>和 + <literal>sap_all</literal>。对于额外的安全的默认用户口令应当被改变(这包括用户<username>sap*</username>和 + <username>ddic</username>)。 + </para> + </sect3> + + <sect3 id="configtranssysprofileopermodesetc"> + <title>配置传送系统,配置,操作模式等</title> + + <para>在客户端000,用户不同于<username>ddic</username>和<username>sap*</username>,做下面的工作: + </para> + + <informaltable frame="none"> + <tgroup cols="2"> + <thead> + <row> + <entry>任务</entry> + <entry>处理</entry> + </row> + </thead> + <tbody> + <row> + <entry>Configure Transport System, e.g. as <emphasis>Stand-Alone + Transport Domain Entity</emphasis></entry> + <entry>STMS</entry> + </row> + <row> + <entry>Create / Edit Profile for System</entry> + <entry>RZ10</entry> + </row> + <row> + <entry>Maintain Operation Modes and Instances</entry> + <entry>RZ04</entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>些和所有其他的快速安装步骤在<application>&sap;</application>安装指南里面有描述。 + </para> + </sect3> + + <sect3 id="editintsidsap"> + <title>编辑<filename>init<replaceable>sid</replaceable>.sap</filename>(<filename>initIDS.sap</filename>)</title> + + <para>文件<filename>/oracle/IDS/dbs/initIDS.sap</filename> + 包含了<application>&sap;</application>备份配置。 + 这儿是使用的磁带机的大小,压缩的类型。要使用<command>sapdba</command> / + <command>brbackup</command>来得到这些。 + 我们可以改变下面的值:</para> + + <programlisting>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</programlisting> + + <para>解释</para> + + + + <para><varname>compress</varname>:我使用的磁带机是HP DLT1,它支持硬件压缩。 </para> + + + <para><varname>archive_function</varname>: + 这个定义了保存&oracle;文件日志的默认行为:新的日志文件被保存到磁带机上, + 保存的日志文件会被再次保存然后再删除。如果您需要恢复数据库, + 而其中一个磁带机已经损坏了,这可以防止出现麻烦。 + </para> + + <para><varname>cpio_flags</varname>:缺省使用<option>-B</option>来设置块大小为 + 5120 Bytes。对于DLT-Tapes,HP建议至少32 K,所以我们使用<option>--block-size=128</option> + 设置64 K。 <option>--format=newc</option>是必需的,因为我的inode数目超过了65535。 + 最后一个选项<option>--quiet</option>是必需的,否则<command>brbackup</command>会在用 + <command>cpio</command>来输出的时候报错。 + </para> + + <para><varname>cpio_in_flags</varname>: + 这个标志从磁带机加载回数据。格式是自动验证的。 + </para> + + <para><varname>tape_size</varname>: + 通常给出了磁带机的存储容量。出于安全原因,这个值要比实际的值要小一些。 + </para> + + <para><varname>tape_address</varname>:被<command>cpio</command>使用的非rewindable的设备。 + </para> + + <para><varname>tape_address_rew</varname>:被<command>cpio</command>使用的非rewindable的设备。</para> + </sect3> + + <sect3> + <title>安装后的配置</title> + + <para>下面的<application>&sap;</application>参数应该在安装以后调整(例子是IDES 46B, 1 GB内存): + </para> + + <informaltable frame="none"> + <tgroup cols="2"> + <thead> + <row> + <entry>名称</entry> + <entry>值</entry> + </row> + </thead> + <tbody> + <row> + <entry>ztta/roll_extension</entry> + <entry>250000000</entry> + </row> + <row> + <entry>abap/heap_area_dia</entry> + <entry>300000000</entry> + </row> + <row> + <entry>abap/heap_area_nondia</entry> + <entry>400000000</entry> + </row> + <row> + <entry>em/initial_size_MB</entry> + <entry>256</entry> + </row> + <row> + <entry>em/blocksize_kB</entry> + <entry>1024</entry> + </row> + <row> + <entry>ipc/shm_psize_40</entry> + <entry>70000000</entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>&sap;注释0013026:</para> + + <informaltable frame="none"> + <tgroup cols="2"> + <thead> + <row> + <entry>名称</entry> + <entry>值</entry> + </row> + </thead> + <tbody> + <row> + <entry>ztta/dynpro_area</entry> + <entry>2500000</entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>&sap;注释0157246:</para> + + <informaltable frame="none"> + <tgroup cols="2"> + <thead> + <row> + <entry>Name</entry> + <entry>Value</entry> + </row> + </thead> + <tbody> + <row> + <entry>rdisp/ROLL_MAXFS</entry> + <entry>16000</entry> + </row> + <row> + <entry>rdisp/PG_MAXFS</entry> + <entry>30000</entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <note> + <para>根据上面的参数,在使用1 GB内存的系统上,可以像下面这样找到内存消耗: + </para> + + <programlisting>Mem: 547M Active, 305M Inact, 109M Wired, 40M Cache, 112M Buf, 3492K Free</programlisting> + </note> + </sect3> + </sect2> + + <sect2 id="problemsduringinstallation"> + <title>安装过程出现的问题</title> + + <sect3 id="restartr3setup"> + <title>修复一个问题后重起<command>R3SETUP</command></title> + + <para>如果出现问题<command>R3SETUP</command>会停止。如果您找到相关的日志文件并修复了问题。 + 您需要再次重起<command>R3SETUP</command>,对于<command>R3SETUP</command>报的最后一个错误可以使用 + REPEAT选项。 + </para> + + <para>要重起<command>R3SETUP</command>,只要使用相应的<filename>R3S</filename>文件重起:</para> + + <screen>&prompt.root; <userinput>./R3SETUP -f CENTRDB.R3S</userinput></screen> + + <para>for 4.6B, or with</para> + + <screen>&prompt.root; <userinput>./R3SETUP -f CENTRAL.R3S</userinput></screen> + + <para>对4.6C,不管有没有错误都使用<filename>CENTRAL.R3S</filename>或 + <filename>DATABASE.R3S</filename>。</para> + + <note><para>在某些阶段,<command>R3SETUP</command>假设database和<application>&sap;</application> + 进程都启动了。但是如果发生错误使得database没有启动,您就必须手动启动database和<application>&sap;</application>。 + 修复错误后,还需要再次重起<command>R3SETUP</command>。 + </para> + <para>也不要忘记再次重起<application>&oracle;</application>监听。 + </para> + </note> + </sect3> + + <sect3 id="indoraduringduringr3setup"> + <title>OSUSERSIDADM_IND_ORA during <command>R3SETUP</command></title> + + <para>如果在这阶段<command>R3SETUP</command>报错,编辑<command>R3SETUP</command>使用的模板文件 + (<filename>CENTRDB.R3S</filename> (4.6B)或者<filename>CENTRAL.R3S</filename>或者<filename>DATABASER3S</filename> (4.6C))。定位到<literal>[OSUSERSIDADM_IND_ORA]</literal>或者搜索<literal>STATUS=ERROR</literal>条目 + 然后像下面这样编辑它: + </para> + + <programlisting>HOME=/home/<replaceable>sid</replaceable>adm (was empty) +STATUS=OK (had status ERROR) + </programlisting> + + <para>然后重起<command>R3SETUP</command>。 + </para> + </sect3> + + <sect3 id="indoraduringr3setup"> + <title>OSUSERDBSID_IND_ORA during <command>R3SETUP</command></title> + + <para><command>R3SETUP</command>也可能在这个阶段报错。修正方法和上面的OSUSERSIDADM_IND_ORA一样。 + 编辑下面的值: + </para> + + <programlisting>STATUS=OK</programlisting> + + <para>重起<command>R3SETUP</command>。 + </para> + </sect3> + + <sect3 id="oraviewvrffilenotfound"> + <title>&oracle;安装找不到<errorname>oraview.vrf文件</errorname></title> + + <para>开始安装之前没有取消<emphasis>&oracle; On-Line Text Viewer</emphasis> + + 既然这个选项当前没有用于Linux,这在安装时是需要标记的,在<application>&oracle;</application> + 安装中取消它,然后重新安装。</para> + </sect3> + + <sect3 id="textenvincalid"> + <title><errorname>TEXTENV_INVALID</errorname> during <command>R3SETUP</command>, RFC or SAPgui Start</title> + + <para>如果这个错误还出现,正确的本地化可能已经丢了。 &sap;注释0171356列出了必须的RPMs + (比如<filename>saplocales-1.0-3</filename>, + <filename>saposcheck-1.0-1</filename> for RedHat 6.1)。 在这个例子中,您忽略了所有相关的错误, + <literal>STATUS</literal>从<literal>ERROR</literal>到<literal>OK</literal>然后重起 + <command>R3SETUP</command>。<application>&sap;</application>系统不会被正确地配置, + 您就不能用一个<application>SAPgui</application>连接到系统。 + 设法使用一个旧的Linux sapgui连接会得到下面的信息:</para> + + <programlisting>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</programlisting> + + <para>这个问题归咎于<application>&sap.r3;</application>不能正确地本地化,也不能自己正确地配置。 + 要能够连接到<application>&sap;</application>, 需要在 <filename>DEFAULT.PFL</filename>(看注释0043288) + 文件中添加下面的记录: + </para> + + <programlisting>abap/set_etct_env_at_new_mode = 0 +install/collate/active = 0 +rscp/TCP0B = TCP0B</programlisting> + + <para>重起<application>&sap;</application>系统。现在,您可以连接到系统, + 即使您指定的国家语言不能正常工作。设置完国家后,这些记录会从<filename>DEFAULT.PFL</filename>文件 + 删除。然后重新启动<application>&sap;</application>系统。</para> + + </sect3> + + <sect3 id="ora-00001"> + <title><errorcode>ORA-00001</errorcode></title> + <para>这个错误只会在FreeBSD 4.5上安装<application>&oracle; 8.1.7</application> + 的时候出现。因为<application>&oracle;</application>database不能自己正确初始化。 + 在系统上保留semaphores和shared memory。 + 然后再次启动数据库会出现<errorcode>ORA-00001</errorcode>错误。 + </para> + + <para>用<command>ipcs -a</command>找到再用<command>ipcrm</command>去掉。</para> + </sect3> + + <sect3 id="ora-00445pmon"> + <title><errorcode>ORA-00445</errorcode> (后台进程PMON没有启动)</title> + <para>这个错误发生在<application>&oracle; 8.1.7</application>上。 + 如果没有用<username>prdadm</username>用户启动<command>startsap</command>脚本 + (例如<command>startsap_majestix_00</command>)会报这个错误。</para> + + <para>一种可能的解决方法是用<username>oraprd</username>用户使用<command>svrmgrl</command>: + </para> + + <screen>&prompt.user; <userinput>svrmgrl</userinput> +SVRMGR> <userinput>connect internal;</userinput> +SVRMGR> <userinput>startup</userinput>; +SVRMGR> <userinput>exit</userinput></screen> + + </sect3> + + <sect3 id="ora-12546"> + <title><errorcode>ORA-12546</errorcode>(用正确的权限启动监听)</title> + + <para>以<username>oraids</username>用户启动<application>&oracle;</application>监听: + </para> + + <screen>&prompt.root; <userinput>umask 0; lsnrctl start</userinput></screen> + + <para>如果您得到<errorcode>ORA-12546</errorcode>错误,没有权限连接到sockets。 + 请看&sap;注释0072984。</para> + </sect3> + + <sect3 id="ora-27102"> + <title><errorcode>ORA-27102</errorcode> (Out of Memory)</title> + + <para>这个错误发生在使用<literal>MAXDSIZ</literal>和<literal>DFLDSIZ</literal>大于 + 1 GB(1024x1024x1024)。 我们一般得到错误<errorname>Linux Error 12: Cannot allocate memory</errorname>。 + </para> + </sect3> + + <sect3 id="dipgntabindind"> + <title>[DIPGNTAB_IND_IND] during <command>R3SETUP</command></title> + + <para>通常,看&sap;注释0130581 (<command>R3SETUP</command>步骤里面的 + <literal>DIPGNTAB</literal>终止)。在IDES-specific安装的时候,因为某些原因 + 安装过程没有使用正确的<application>&sap;</application>系统名<quote>IDS</quote>,而是用空字符 + <literal>""</literal>代替。 这会导致一些访问目录的小问题,因为路径是动态使用 + <replaceable>SID</replaceable>来创建的(这里是IDS)。所以用下面的方法代替: + </para> + + <programlisting>/usr/sap/IDS/SYS/... +/usr/sap/IDS/DVMGS00</programlisting> + + <para>下面的路径被使用</para> + + <programlisting>/usr/sap//SYS/... +/usr/sap/D00</programlisting> + + <para>为了继续安装,我们创建了一个附加的目录: + </para> + + <screen>&prompt.root; <userinput>pwd</userinput> +/compat/linux/usr/sap +&prompt.root; <userinput>ls -l</userinput> +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</screen> + + <para>我们也发现在&sap;注释(0029227和0008401)里面描述了这个行为。 + 我们没有在<application>&sap; 4.6C</application>安装里面遭遇这些问题。 + </para> + </sect3> + + <sect3 id="rfcrswboiniindind"> + <title>[RFCRSWBOINI_IND_IND] during <command>R3SETUP</command></title> + + <para>安装<application>&sap; 4.6C</application>时,这个错误是前面发生过的一个错误的 + 结果。所以,您不得不查看相应的日志文件并修复错误。 + </para> + + <para>如果查看完日志文件后这个错误确实存在(看&sap;注释),您可以设置<literal>STATUS</literal> + 从<literal>ERROR</literal>到<literal>OK</literal>(<filename>CENTRDB.R3S</filename>文件里面) + 然后重起<command>R3SETUP</command>。安装完后,您必须从事务SE38执行 + <literal>RSWBOINS</literal>。关于<literal>RFCRSWBOINI</literal>和<literal>RFCRADDBDIF</literal>的更多信息 + 查看&sap;注释0162266。 + </para> + </sect3> + + <sect3 id="rfcraddbdifindind"> + <title>[RFCRADDBDIF_IND_IND] during <command>R3SETUP</command></title> + <para>通过查看日志文件确定这个错误,它不是由于前面的问题导致的。 + </para> + + <para>如果您确定已经应用了&sap;注释0162266,就只要设置 + <literal>STATUS</literal>从<literal>ERROR</literal>到<literal>OK</literal> + (<filename>CENTRDB.R3S</filename>文件里面)。然后重起<command>R3SETUP</command>。 + 安装完后,您必须从事务SE38执行<literal>RADDBDIF</literal>。 + </para> + </sect3> + + <sect3 id="sigactionsig31"> + <title><errorcode>sigaction sig31: File size limit exceeded</errorcode></title> + + <para>这个错误在启动<application>&sap;</application>进程<emphasis>disp+work</emphasis>时出现。 + 如果用<command>startsap</command>脚本启动<application>&sap;</application>, + 就会启动子进程,并由它启动后面所有的其他<application>&sap;</application>进程。 + 所以脚本本身不会注意到有错误发生。 + </para> + + <para>为了检查<application>&sap;</application>进程是否正确启动,可以用 + <command>ps ax | grep <replaceable>SID</replaceable></command>查看进程的状态。 + 您会得到所有<application>&oracle;</application>和<application>&sap;</application>进程列表。 + 如果看起来有些进程没有启动,或者您不能正确连接到<application>&sap;</application>系统。 + 查看相应的日志文件,可以在 + <filename>/usr/sap/<replaceable>SID</replaceable>/DVEBMGS<replaceable>nr</replaceable>/work/</filename> + 下找到, 一般查看 <filename>dev_ms</filename> 和 + <filename>dev_disp</filename> 文件。</para> + + <para>如果<application>&oracle;</application>和<application>&sap;</application>的共享内存总量超过了 + 内核配置文件定义的大小就会出现signal 31错误,并且不能解析大的内存地址: + </para> + + <programlisting># larger value for 46C production systems: +options SHMMAXPGS=393216 +# smaller value sufficient for 46B: +#options SHMMAXPGS=262144</programlisting> + + </sect3> + + <sect3 id="saposcolfails"> + <title>启动<command>saposcol</command>失败</title> + <para>使用<command>saposcol</command> (version 4.6D)会出现一些问题。 + <application>&sap;</application>系统使用<command>saposcol</command>收集系统性能数据。 + 这个程序不是必需的。所以这些问题可以看作是小问题。 + 老版本(4.6B)可以工作,但是不能收集所有的性能数据(很多调用只返回0,像CPU使用率)。 + </para> + </sect3> + </sect2> + </sect1> + + <sect1 id="linuxemu-advanced"> + <title>高级主题</title> + + <para>如果您对Linux兼容模式是如何工作的感到好奇,这节正是您所需要的。 下面的绝大部分内容是由 + Terry Lambert<email>tlambert@primenet.com</email> (Message ID: + <literal><199906020108.SAA07001@usr09.primenet.com></literal>)发表在邮件列表&a.chat;上的内容组成的。 + </para> + + <sect2> + <title>它是如何工作的?</title> + <indexterm><primary>可执行类加载器</primary></indexterm> + + <para>FreeBSD有一个<quote>可执行类加载器</quote>。它主要是嵌入了&man.execve.2;系统调用。 +</para> + + + <para>碰巧的是FreeBSD有一个引导器(loader)的列表,而不是一个简单的返回一个 + 符号 <literal>#!</literal>的引导器!</para> + + <para>从历史上来讲,只有&unix;平台的引导器会检查魔术(magic)数 + (通常是文件的前4个或8个字节)是否是二进制的, + 如果是,就调用二进制引导程序。</para> + + + + <para>如果它不是二进制类型的&man.execve.2;调用就会返回一个错误,shell就试图用shell命令执行它。 + </para> + + <para>缺省是使用<quote>当前设定的shell</quote>。</para> + + + + <para>随后,进行了一些hack, &man.sh.1;开始检查前两个字符,如果它们是<literal>:\n</literal>, + 那它就调用&man.csh.1;(我们相信是SCO最先做这个hack的)。</para> + + <para>FreeBSD现在所做的是用一个普通的<literal>#!</literal>引导器仔细检查引导器的列表, + 然后由解释程序一个接一个地解释,返回给<filename>/bin/sh</filename>。 + </para> + <indexterm><primary>ELF</primary></indexterm> + + <para>为了支持Linux ABI,FreeBSD就把魔术数看作为一个二进制ELF程序。( + 这样一来,它就使得在FreeBSD, &solaris;,Linux和其他任何操作系统之间只要使用ELF格式就都可以顺利运行)。 + </para> + <indexterm><primary>Solaris</primary></indexterm> + + <para>ELF引导器会寻找一个专门的<emphasis>标记</emphasis>, + 它是在ELF映像中的一个注释部分,但在SVR4/&solaris;的ELF中没有。 +</para> + + <para>为了执行Linux程序,它们必须被打上<literal>Linux</literal>类型的<emphasis>标记</emphasis>; + 使用&man.brandelf.1;:</para> + + <screen>&prompt.root; <userinput>brandelf -t Linux file</userinput></screen> + + + + <para>做完之后,ELF引导器就会看到文件上的<literal>Linux</literal>的标记。 + </para> + <indexterm> + <primary>ELF</primary> + <secondary>标记</secondary> + </indexterm> + + <para>当ELF引导器看到<literal>Linux</literal>的标记, + 引导器就会在<literal>proc</literal>结构中替换一个指示器。 + 所有的系统调用就会通过这个指示器来索引(在一个传统的 &unix;系统中, + 这就是<literal>sysent[]</literal>结构队列,包含系统调用)。 + 此外,为了解决由于信号杂乱所造成的陷阱向量的问题,会造成线程的剧增, + 需要切断其他(或较小的)由Linux内核模块产生的修正。 + </para> + + + + <para>Linux系统调用向量包含一个<literal>sysent[]</literal>记录的列表, + 它的地址位于内核模块之中。</para> + + <para>当一个系统调用被Linux程序调用时,有缺陷的代码会把系统调用功能的指示器从<literal>proc</literal>结构中解除, + 然后获得Linux,而不是FreeBSD,系统调用入口点。</para> + + <para>另外,Linux模式动态地<emphasis>reroots</emphasis>查找;这和启动文件系统的<option>union</option> + 选项是等效的(即时不是<literal>unionfs</literal>文件系统)。 + 首先会试图在<filename>/compat/linux/<replaceable>original-path</replaceable></filename> + 目录查找文件,如果失败了,就会在<filename>/<replaceable>original-path</replaceable></filename> + 目录下查找。这使得需要其它程序的程序可以运行(例如,Linux工具链都可以在Linux ABI的支持下工作)。 + 也就是说Linux程序可以加载和执行FreeBSD程序,如果当前没有相应的Linux程序, + 那您可以在<filename>/compat/linux</filename>目录树中放置一个&man.uname.1;,来确保Linux程序不提示它们不能运行在Linux上。 + </para> + + <para>在FreeBSD内核中有一个Linux内核;由内核提供的能够提供所有服务的各种潜在功能 + 在FreeBSD系统调用表记录和Linux系统调用表记录之间是一样的: + 文件系统操作,虚拟内存操作,信号发送,System V IPC,…等等。 + 唯一的不同是FreeBSD会得到FreeBSD的<emphasis>胶合</emphasis>功能, + 而Linux程序会得到Linux的<emphasis>胶合</emphasis>功能 + (大部分老的操作系统只有它们自己的<emphasis>胶合</emphasis>函数, + 函数地址在静态全局变量<literal>sysent[]</literal>结构数据里面, + 而不是动态的初始化到进程的<literal>proc</literal>结构)。 + </para> + + + + <para>哪一个是FreeBSD自己的ABI呢?这无关紧要。基本上, + 唯一的不同是FreeBSD的<emphasis>胶合</emphasis>功能是被静态连接到内核, + 而Linux的<emphasis>胶合</emphasis>功能可能是被静态连接到内核, + 也可能它们通过一个内核模块来访问。 + </para> + + + + <para>有一个真正的模拟器吗?没有,它只不过是一个ABI执行机制,不是一个模拟器。</para> + + <para>为什么有时它被叫做<quote>Linux模拟器</quote>? + 只是为了更容易地卖出FreeBSD罢了! + 实际上,历史上从来没有描述这样一种执行机制的名字,FreeBSD并不是真正地运行Linux程序,如果您不编译进代码, + 或加载一个模块。 + 就需要有一个名字来描述这样一种加载功能--因此就想出了<quote>Linux模拟器</quote>这样一个名字。 + </para> + </sect2> + </sect1> +</chapter> + +<!-- + Local Variables: + mode: sgml + sgml-declaration: "../chapter.decl" + sgml-indent-data: t + sgml-omittag: nil + sgml-always-quote-attributes: t + sgml-parent-document: ("../book.sgml" "part" "chapter") + End: +--> |