You are on page 1of 20

概述

SAP ECC 6.0 是 SAP 最新的产品,相对于以前的产品来说,ECC 6.0 的功能得到


了不少扩展和集成。手头上的安装介质是 SAP ERP2005 套件,共 9 张 DVD

这个月来来回回安装了 ECC 6.0 不下 10 次,先是在 Windows 2003 上安装,按


照网上前人写的功略基本上没费什么力气,所费的就是时间而已。190G 的
Oracle 数据库,整个安装过程在我的 P4 3.0 HyperThread with 2G memory +
850G HD PC 上跑了超过 16 个小时。后来在 AIX 上安装,因为是 6 年前的老机
器了,虽然有 8.4G 的巨量内存但仍然安装超过 30 个小时!

接下来就进入本文章的主要内容:安装 SAP Dialog Instance

SAP ECC6.0 Dialog Instance 的安装

FAN DEZHI

什么是 Dialog Instance

简单的说,因为SAP是一个分布式系统,它的几层架构的核心依然是数据库和应
用服务器,这两者可以安装在同一台机器上(Central Instance),也可以安装
在不同的机器上。在真正的企业应用里,一般都是后台数据库是双机热备份环
境,然后接上若干台应用服务器Application Server。根据企业规模大小,
Application Server有可能从 1 台到几十台不等。因为Application Server上
跑的东西可以分类为Dialog, Batch, Update, Spool, Enqueue, J2EE等,所耗
费的资源是相当惊人的。以我这个系统为例,在Windows 2003 上装完了跑起来
基本的ABAP和JAVA应用,启动了Netweaver portal之后,基本上吃掉了 6G的内
存。而这还是没有什么用户在上面用的时候的情况。

在企业级环境里,我见到的是IBM顶级pSeries p5 p595 with 64G内存的机器作


为Database Server,另外若干台p5 595 作为Application Server,这样子的
硬件投资高达上千万美金!支持的用户数量达到几十万。

说了那么久,现在进入正题:其实 Dialog Instance 就是独立于 Database


Instance 之外的独立的 Application Server。本次的任务就是要在
Windows2003 上安装一个 Dialog Instance,连接到 AIX 上的 Central
Instance

步骤一:检查 Central Instance 的环境


从上图我们得知该 Central Instance 是跑在 AIX 上,主机名字是 p640,
Instance number 是’01’

步骤二:分别更改 Windows 2003 和 AIX 上的 Host 文件,请注意,这里的 Host


name 和 IP 不能用一对多的模式,否则有可能会出错!

AIX /etc/hosts 如下:

#192.168.1.77 exxept01 fandezhi ip77

192.168.1.77 exxept01

192.168.1.22 ip22

192.168.1.2 ip02

127.0.0.1 localhost loopback # loopback (lo0) name/address

192.168.1.88 mainframe_old
192.168.1.89 mainframe

192.168.1.250 wireless

192.168.1.50 p640

Win2003 C:WINDOWSsystem32driversetchosts

127.0.0.1 localhost

192.168.1.50 p640

192.168.1.77 exxept01

另外要准备的一个重要东西,就是 SAMBA Server for AIX

SAMBA

企业级用户里面,Application Server 不仅仅是 Unix 系统。为了降低硬件成


本,有的公司会采用 Windows 平台作为 Application Server。这样作的好处是
维护方便,价格低廉,特别指出的是,不少企业和微软签订的全球 discount 协
议,省下了不少的软件费用。虽然前面提及的 IBM pSeries 之类的机器可以作
Logical Partition,把一台机器模拟成若干台,但软件 license 是一笔很大的
投资。纵观现在 SAP 的新客户,因为老用户 500 强企业都占有的差不多了,都
趋向于开发新用户,因此发现有这么个现象:新用户有可能采用全套
Microsoft 平台,甚至连后台数据库都使用新版 SQL Server 2005。

按照传统的方法,DB Server 和 APP Server 都采用 Unix,这时候就必须在


Central Instance Server 上把/usr/sap 用 NFS 给 Share 出来,然后其他的
Dialog Instance Server 就去 NFS Mount。如果 Dialog Instance Server 准备
采用 Windows 平台,要去读取 Unix Central Instance 上的若干文件,比如
START.PFL 之类的,就必须找一种渠道。

这种渠道不是 ftp,也不是 http,更不是 NFS,而是自由软件 SAMBA,相关的


Note 在 SAP OSS 上非常少,有点参考价值的只有 Note 680617

SAP 在若 5 年前的 Note 28781 就指出,采用 SAMBA Server 作为共享 Unix 资源


的方法。但是对 SAMBA 不提供支持。哎!这也难怪,人家 SAMBA 是自由软件,
对于 SAP 卖得那么贵的软件来说,采用自由软件有点见不得人,似乎表达出自
身研发实力不够强的样子。但这个 Note 28781 有点很不好的地方是,它给出的
配置例子 smb.conf 不能正常运行在 SAMBA 最新版本 3.0.23d 上。因此得自己
写 smb.conf。下面把 Note 28781 的 smb.conf 贴出来,它这里是共享
/usr/sap/trans,到时候我们准备共享的是/usr/sap。也许有的人能正常使用
吧?
[global]
; SECURITY OPTION guest account: the guest has the file access
; rights of this UNIX-user
guest account = nobody

debug level = 0
security = server
password server = pswdf004
getwd cache = yes
wide links = no
password level = 8
case sig names = yes
preserve case = yes
case sensitive = yes
read prediction = yes

[transdir]
comment = us0011:/usr/sap/trans
path = /usr/sap/trans
; SECURITY OPTION public: all users can access the share as a guest
; no password is checked
public = yes
; SECURITY OPTION writable: files + directories can
; be changed if writable = yes
writable = yes
; SECURITY OPTION browsable: Share is visible if browsable = yes
browsable = yes
create mask = 0664
map hidden = no
map system = no
preserve case = yes
wide links = yes
; SECURITY OPTION allow hosts: only specified hosts can access the
; share
allow hosts = us0011

SAMBA 的安装

在 AIX 上面,我决定自己编译 SAMBA,因为如果采用 binary 包的话,有可能出


现 coredump,想来是和系统里面的动态库不匹配的缘故。

首先下载 SAMBA

root:/install/src > wget http://us3.samba.org/samba/ftp/samba-3.0.23d.tar.gz


--14:51:36-- http://us3.samba.org/samba/ftp/samba-3.0.23d.tar.gz
=> `samba-3.0.23d.tar.gz'
Resolving us3.samba.org... 216.251.47.16
Connecting to us3.samba.org[216.251.47.16]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 17,704,221 [application/x-tar]

42%
[================================================>
] 7,591,006 305.30K/s ETA 00:34

其次是解压、编译和安装

下面来看看如何配置 SAMBA

这一点非常重要,为此我大概耗时 2 个晚上,在 windows 2003 上安装 Dialog


Instance 的时候,当最后一步要启动 Instance 的时候,一直出用户权限不对
的问题。现在想想,绝对和 SAMBA 有关

关键因素:在 Windows 2003 上,在安装 ECC 6.0 Dialog Instance 的时候,会


产生两个 Windows 用户 er1adm 和 SAPServiceER1(我的 Instance 名字是
ER1)。请注意:SAPServiceER1 这个用户超过了 AIX 用户名默认标准长度的 8
位,因此必须先扩展 AIX 的 sys0 默认值。

root:/etc/security > getconf LOGIN_NAME_MAX


9
root:/etc/security > chdev -l sys0 -a max_logname=65
sys0 changed
root:/etc/security > lsattr -El sys0
SW_dist_intr false Enable SW distribution of interrupts True
autorestart true Automatically REBOOT system after a crash True
boottype disk N/A False
capacity_inc 1.00 Processor capacity increment False
capped true Partition is capped False
conslogin enable System Console Login False
cpuguard disable CPU Guard True
dedicated true Partition is dedicated False
ent_capacity 4.00 Entitled processor capacity False
frequency 93750000 System Bus Frequency False
fullcore false Enable full CORE dump True
fwversion IBM,NAN04194 Firmware version and revision levels False
id_to_partition 0X036E4090D5C5AF00 Partition ID False
id_to_system 0X036E4090D5C5AF00 System ID False
iostat false Continuously maintain DISK I/O history True
keylock normal State of system keylock at boot time False
max_capacity 4.00 Maximum potential processor capacity False
max_logname 65 Maximum login name length at boot time True
maxbuf 20 Maximum number of pages in block I/O BUFFER CACHE True
maxmbuf 0 Maximum Kbytes of real memory allowed for MBUFS True
maxpout 0 HIGH water mark for pending write I/Os per file True
maxuproc 500 Maximum number of PROCESSES allowed per user True
min_capacity 1.00 Minimum potential processor capacity False
minpout 0 LOW water mark for pending write I/Os per file True
modelname IBM,7026-B80 Machine name False
ncargs 6 ARG/ENV list size in 4K byte blocks True
nfs4_acl_compat secure NFS4 ACL Compatibility Mode True
pre430core false Use pre-430 style CORE dump True
pre520tune disable Pre-520 tuning compatibility mode True
realmem 8650752 Amount of usable physical memory in Kbytes False
rtasversion 1 Open Firmware RTAS version False
sed_config select Stack Execution Disable (SED) Mode True
systemid IBM,01108CA0F Hardware system identifier False
variable_weight 0 Variable processor capacity weight False
root:/etc/security > getconf LOGIN_NAME_MAX
9
root:/etc/security > reboot

重启完毕以后请在 AIX 下面增加 3 个用户: er1adm, SAPServiceER1 和


Administrator(不一定要 Administrator)。

接下来是使用 SAMBA 功能增加 samba 用户:

root:/usr/local/samba/bin > smbpasswd -a er1adm

root:/usr/local/samba/bin > smbpasswd -a SAPServiceER1

root:/usr/local/samba/bin > smbpasswd -a Administrator

接下来是非常重要的一步,配置 smb.conf

root:/usr/local/samba/lib > more smb.conf

[sapmnt]

comment = SAP mnt share directory

path = /usr/sap/

valid users = root er1adm SAPServiceER1 Administrator

public = no

writable = yes

printable = no

create mask = 0765

然后启动/usr/local/samba/sbin/smbd,在 Windows2003 下面尝试登陆,看看


是否能用用户 er1adm 等正常读写 file.
这里有个很有用的 Log,在/var/log/samba/log.smbd,在待会儿 Windows 2003
安装 SAP Dialog Instance 的时候,只要有用户试图连接到 AIX 的时候,就会
在这里留下行踪。如果我早知道这个 Log,就不会花那么多时间作 Trouble
shooting,直接判断是哪个用户没权限访问了。

root:/var/log/samba > more log.smbd

[2006/12/13 02:34:07, 0] printing/pcap.c:pcap_cache_reload(159)

Unable to open printcap file /etc/printcap for read!

[2006/12/13 02:34:08, 0] printing/pcap.c:pcap_cache_reload(159)

Unable to open printcap file /etc/printcap for read!

[2006/12/13 02:34:08, 0] smbd/server.c:open_sockets_smbd(443)

open_sockets_smbd: accept: A connection is ended by software.

[2006/12/13 02:34:08, 1] smbd/service.c:make_connection_snum(950)

exxept01 (192.168.1.77) connect to service sapmnt initially as user


SAPServiceER1 (uid=7, gid=15) (pid 917584)

[2006/12/13 02:48:00, 0] printing/pcap.c:pcap_cache_reload(159)

步骤三:选择安装包

这里不知何故,我开始选的 ERP 2005 装了 2 个晚上都失败了,出错为

ERROR 2006-12-12 21:58:26

CJSlibModule::writeError_impl()

MOS-01011 'D:/usr/sap/ER1/D10/exe/sapstartsrv.exe' returned with '-


1'.

TRACE [iaxxejsbas.hpp:388]

handleException<ESAPinstJSError>()

Converting exception into JS Exception EJSException.

ERROR 2006-12-12 21:58:26


CJSlibModule::writeError_impl()

MOS-01011 'D:/usr/sap/ER1/D10/exe/sapstartsrv.exe' returned with '-


1'.

TRACE [iaxxejsbas.hpp:460]

EJS_Base::dispatchFunctionCall()

JS Callback has thrown unknown exception. Rethrowing.

ERROR 2006-12-12 21:58:26 [iaxxgenimp.cpp:736]

showDialog()

FCO-00011 The step createService with step key


|NW_DI|ind|ind|ind|ind|0|0|NW_DI_Instance|ind|ind|ind|ind|10|0|NW_Ins
tance|ind|ind|ind|ind|1|0|createService was executed with status
ERROR .

后来无奈安装Netweaver 2004S下面的,居然成功
步骤四:安装 wizard
>
下图显示的是内存不够,可以忽略
步骤五:修改 Instance number

这里有可能要修改,否则和 Central Instance 的 Number 重复,导致不能启动


Dialog Instance

下图我把’00’修改为’15’
步骤六:继续安装
步骤七:有可能遇到错误

x lib/util.jar

x properties.format.txt

x sharedlib

x sharedlib/antlr.jar

x sharedlib/bootstrap.jar

x sharedlib/exception.jar

x sharedlib/iq-lib.jar

SAPCAR: checksum error in sharedlib/iq-lib.jar (error 12).


这个时候需要重新拷贝文件 D51031693/J2EE_OSINDEP/J2EE-
INST/J2EEINSTALL.SAR

步骤八:完成安装

最后一个步骤有可能耗时比较长,在我 windows2003 机器上跑了半个小时以上

步骤八:After task 检查

检查 SM51
登陆进入 Dialog Instance 检查 System 状况
如果您有什么问题,欢迎来信询问lpcome (at) gmail (dot) com,或者到论坛
上发言http://www.efglobe.com/modules.php?name=Forums&file=index

谢谢!

You might also like