A


部署配置文件

本附录介绍了用于部署 Content Delivery Server 组件的部署配置文件的格式。此文件格式被设计成可通过 ANT replace 命令进行操作。有关使用配置文件的信息,请参见 3.1.3, 设置部署配置文件


A.1 配置属性

下表说明了与 Sun Java System Application Server 和 WebLogic Server 一起使用的配置文件中的常规属性。必须对这些属性进行设置。表 A-2 中说明了仅由 WebLogic Server 使用的属性。


表 A-1 常规属性

属性

描述

server.type

指定所使用的应用服务器的类型。对于 Sun Java System Application Server,请使用 sun;而对于 WebLogic Server,请使用 weblogic,例如:

server.type=sun

注 - 不要更改此属性的值。

java.mem

为应用服务器启动 Java 虚拟机时所使用的字符串,它将决定 Java 虚拟机的内存设置,例如:

java.mem=-ms512m -mx1024m -XX:MaxPermSize=256m

app.server.domain

应用服务器的域名,例如:

app.server.domain=cdsdomain

app.server.name

应用服务器使用的名称,例如:

app.server.name=cdsserver

app.server.portnumber

应用服务器在其上监听 HTTP 请求的端口,例如:

app.serverportnumber=8080

app.server.ssl.port

应用服务器在其上监听 SSL HTTP 请求的端口号,例如:

app.server.ssl.port=8081

jndi.factory

要使用的 Java Naming and Directory Interfacetrademark(JNDI) API 工厂类的名称。它必须与在所使用的应用服务器的样例配置文件中使用的值相同。请指定全限定类名。

  • 对于 Sun Java System Application Server,请指定 com.sun.jndi.fscontext.RefFSContextFactory
  • 对于 WebLogic,请指定 weblogic.jndi.WLInitialContextFactory

jndi.url

JNDI API 的 URL。

  • 对于 Sun Java System Application Server,请设置为在样例配置文件中使用的值。
  • 对于 WebLogic Server,请指定服务器的主机名。该值必须以字符串 t3:// 开头,例如:
    t3://host1.central.com:8080
注 - 不要使用 localhost

cs.internal.uri[1]

Content Delivery Server 中使用的 Catalog Manager 的 URI,例如:

cs.internal.uri=http://host1.central.com:8080/admin/

dp.internal.uri*

Content Delivery Server 中使用的 Developer Portal 的 URI,例如:

dp.internal.uri=http://host1.central.com:8080/developer/

fs.internal.uri*

Content Delivery Server 中使用的 Fulfillment Manager 的 URI,例如:

fs.internal.uri=http://host1.central.com:8080/fs/

vs.internal.uri*

Content Delivery Server 中使用的 Vending Manager 的 URI,例如:

vs.internal.uri=http://host1.central.com:8080/vsadmin/

sp.internal.uri*

Content Delivery Server 中使用的 Subscriber Portal 的 URI,例如:

sp.internal.uri=http://host1.central.com:8080/subscriber/

es.internal.uri*

Content Delivery Server 中使用的事件服务的 URI,例如:

es.internal.uri=http://host1.central.com:8080/es/

ms.internal.uri*

Content Delivery Server 中使用的消息传送服务的 URI,例如:

ms.internal.uri=http://host1.central.com:8080/ms/

ns.internal.uri*

Content Delivery Server 中使用的通知服务的 URI,例如:

ns.internal.uri=http://host1.central.com:8080/ns/

pps.internal.uri*

Content Delivery Server 中使用的后付费服务的 URI,例如:

pps.internal.uri=http://host1.central.com:8080/pps/

mos.internal.uri*

Content Delivery Server 中使用的监视服务的 URI,例如:

mos.internal.uri=http://host1.central.com:8080/mos/

css.internal.uri*

Content Delivery Server 中使用的目录搜索服务的 URI,例如:

css.internal.uri=http://host1.central.com:8080/css/

vss.internal.uri*

Content Delivery Server 中使用的售卖搜索服务的 URI,例如:

vss.internal.uri=http://host1.central.com:8080/vss/

cs.external.uri*

外部实体访问 Catalog Manager 时所使用的 URI,例如:

cs.external.uri=http://webhost.domain.com:8080/admin/

dp.external.uri*

外部实体访问 Developer Portal 时所使用的 URI,例如:

dp.external.uri=http://webhost.domain.com:8080/developer/

fs.external.uri*

外部实体访问 Fulfillment Manager 时所使用的 URI,例如:

fs.external.uri=http://webhost.domain.com:8080/fs/

vs.external.uri*

外部实体访问 Vending Manager 时所使用的 URI,例如:

vs.external.uri=http://webhost.domain.com:8080/vsadmin/

sp.external.uri*

外部实体访问 Subscriber Portal 时所使用的 URI,例如:

sp.external.uri=http://webhost.domain.com:8080/subscriber/

vs.account.name

当前部署的 Vending Manager 的名称,例如,suncds.vending.server.1。此名称必须与为数据库配置文件中的相应 Vending 元素指定的名称属性相匹配。在 Catalog Manager 中创建 Vending Manager Server 帐户时,请将此名称用作帐户 ID。

注 - 如果部署了 Vending Manager 或 Catalog Manager,则需要此属性。

vs.account.password

用于访问当前部署的 Vending Manager 的密码。此密码必须与为数据库配置文件中的相应 Vending 元素指定的密码相匹配。在 Catalog Manager 中创建 Vending Manager Server 帐户时,请将此密码用作帐户密码。

注 - 如果部署了 Vending Manager 或 Catalog Manager,则需要此属性。

ms.mail.smtp.host

能够接受未经身份验证的电子邮件的邮件服务器名称。

注 - 只有在部署消息传送服务时,才需要此属性。

ms.mail.smtp.sender

电子邮件的回复地址。

注 - 只有在部署消息传送服务时,才需要此属性。

 

下表说明了仅与 WebLogic Server 一起使用的属性。如果未使用 WebLogic Server,则不需要设置这些属性。


表 A-2 与 WebLogic Server 一起使用的常规属性

属性

描述

app.server.threadcount

应用服务器处理 HTTP 请求时使用的线程数,例如, app.server.threadcount=10

app.server.ssl.enable

SSL 支持的状态。将此属性设置为 false 可以禁用应用服务器的 SSL,例如:

app.server.ssl.enabled=false

默认值为 true

app.server.ssl.port

SSL 所监听的端口,例如:

app.server.ssl.port=81

app.server.hostip

部署服务器的主机的主机名或 IP 地址,例如:

app.server.hostip=host1.central.com

注 - 不要使用 localhost

app.server.admin.port

WebLogic Server 管理控制台的端口号,例如:

app.server.admin.port=7800


 

除了常规属性外,配置文件还包含以下格式的属性,这些属性用于标识部署中包含的组件:

prefix.include

下表列出了每个组件的前缀。


表 A-3 组件前缀

前缀

组件

cs

Catalog Manager

dp

Developer Portal

vs

Vending Manager

sp

Subscriber Portal

fs

Fulfillment Manager

es

事件服务

ms

消息传送服务

ns

通知服务

pps

后付费服务

mos

监视服务

css

目录搜索服务

vss

售卖搜索服务


 

如果属性前面没有井号 (#),则会在部署中包括某个组件。例如,如果部署配置文件中包含下列语句,则部署中包括 Catalog Manager 和 Developer Portal,而不包括 Vending Manager 和 Subscriber Portal。


cs.include
dp.include
#vs.include
#sp.include
 


A.2 与 Sun Java System Application Server 一起使用的样例文件

下列代码示例是一个与 Sun Java System Application Server 一起使用的样例部署配置文件。此文件显示了本附录中所描述的配置设置。此文件位于 $CDS_HOME/cfg 目录中,名为 sn_sample.cfg

请在使用该文件前编辑这些属性,或者使用设置创建一个新文件。样例设置通常不适用于您的环境。非超级用户无法访问小于 1024 的端口号,因此,如果没有以超级用户身份运行 Content Delivery Server,则确保将端口号更改为大于 1024 的数字。

注意,以井号 (#) 开始的行为注释,Content Delivery Server 将忽略这些行。


代码示例 A-1 与 Sun Java System Application Server 一起使用的样例部署配置文件
######################################################################
#
# Configuration File
#
# This Java properties file defines all of the required properties
# that are used to deploy and configure a server.Your deployment
# can consist of any combination of the following components:
#
# CATALOG MANAGER         (cs)
# DEVELOPER PORTAL        (dp)
# VENDING MANAGER         (vs)
# SUBSCRIBER PORTAL       (sp)
# FULFILLMENT MANAGER     (fs)
# EVENT SERVICE           (es)
# MESSAGING SERVICE       (ms)
# NOTIFY SERVICE          (ns)
# POSTPAID SERVICE        (pps)
# MONITORING SERVICE      (mos)
# CATALOG SEARCH SERVICE  (css)
# VENDING SEARCH SERVICE  (vss)
#
# NOTE:Be careful not to leave trailing spaces.....
#
######################################################################
#=====================================================================
# General Properties
#=====================================================================
# Specifies your application server to be Sun Java System (DO NOT CHANGE)
server.type=sun
# ------------ Java Settings ------------- #
java.mem=-Xms512m -Xmx1024m -XX:MaxPermSize=256m
# --------- App Server Settings ---------- #
app.server.domain=cdsdomain
app.server.name=cdsserver
app.server.portnumber=80
app.server.ssl.port=81
# --------- JNDI Server Settings --------- #
# Specifies the JNDI factory (DO NOT CHANGE)
jndi.factory=com.sun.jndi.fscontext.RefFSContextFactory
# Specifies the JNDI URL (DO NOT CHANGE)
jndi.url=file://[[deployment]]/sun
# ------------- URI Settings ------------- #
cs.internal.uri=http://webhost.domain.com:80/admin/
dp.internal.uri=http://webhost.domain.com:80/developer/
fs.internal.uri=http://webhost.domain.com:80/fs/
vs.internal.uri=http://webhost.domain.com:80/vsadmin/
sp.internal.uri=http://webhost.domain.com:80/subscriber/
es.internal.uri=http://webhost.domain.com:80/es/
ms.internal.uri=http://webhost.domain.com:80/ms/
ns.internal.uri=http://webhost.domain.com:80/ns/
pps.internal.uri=http://webhost.domain.com:80/pps/
mos.internal.uri=http://webhost.domain.com:80/mos/
css.internal.uri=http://webhost.domain.com:80/css/
vss.internal.uri=http://webhost.domain.com:80/vss/
cs.external.uri=http://webhost.domain.com:80/admin/
dp.external.uri=http://webhost.domain.com:80/developer/
fs.external.uri=http://webhost.domain.com:80/fs/
vs.external.uri=http://webhost.domain.com:80/vsadmin/
sp.external.uri=http://webhost.domain.com:80/subscriber/
# ----------- Vending Settings ----------- #
vs.account.name=cds.vending.server.1
vs.account.password=vending
# ------------ Mail Settings ------------- #
ms.mail.smtp.host=mailhost.domain.com
ms.mail.smtp.sender=info@domain.com
#=====================================================================
# Included Managers, Portals, & Services
#=====================================================================
# Make any of the following lines a comment if the manager, portal, or service
# should not be deployed
cs.include
dp.include
vs.include
sp.include
fs.include
es.include
ms.include
ns.include
pps.include
mos.include
css.include
vss.include
 


A.3 与 WebLogic Server 一起使用的样例文件

下列代码示例是一个与 WebLogic Server 一起使用的样例配置文件。此文件显示了本附录中所描述的配置设置。此文件位于 $CDS_HOME/cfg 目录中,名为 wl_sample.cfg

请在使用该文件前编辑这些属性,或者使用设置创建一个新文件。样例设置通常不适用于您的环境。非超级用户无法访问小于 1024 的端口号,因此,如果没有以超级用户身份运行 Content Delivery Server,则确保将端口号更改为大于 1024 的数字。

注意,以井号 (#) 开始的行为注释,Content Delivery Server 将忽略这些行。


代码示例 A-2 与 WebLogic Server 一起使用的样例部署配置文件
######################################################################
#
# Configuration File
#
# This Java properties file defines all of the required properties
# that are used to deploy and configure a server.Your deployment
# can consist of any combination of the following components:
#
# CATALOG MANAGER         (cs)
# DEVELOPER PORTAL        (dp)
# VENDING MANAGER         (vs)
# SUBSCRIBER PORTAL       (sp)
# FULFILLMENT MANAGER     (fs)
# EVENT SERVICE           (es)
# MESSAGING SERVICE       (ms)
# NOTIFY SERVICE          (ns)
# POSTPAID SERVICE        (pps)
# MONITORING SERVICE      (mos)
# CATALOG SEARCH SERVICE  (css)
# VENDING SEARCH SERVICE  (vss)
#
# NOTE:Be careful not to leave trailing spaces.....
#
######################################################################
#=====================================================================
# General Properties
#=====================================================================
# Specifies your application server to be BEA WebLogic (DO NOT CHANGE)
server.type=weblogic
# ------------ Java Settings ------------- #
java.mem=-Xms512m -Xmx1024m -XX:MaxPermSize=256m
# --------- App Server Settings ---------- #
app.server.domain=cdsdomain
app.server.name=cdsserver
app.server.portnumber=80
      # Number of listening threads
app.server.threadcount=10
      # true for SSL support
app.server.ssl.enabled=true
      # SSL listen port
app.server.ssl.port=81
      # Host Name or IP address of the system where server is deployed
      # You should change it if you are running with multiple IP addresses
app.server.hostip=webhost.domain.com
      # WL administration console port, ONLY IF SSL IS ENABLED
app.server.admin.port=7800
# --------- JNDI Server Settings --------- #
# Specifies the JNDI factory (DO NOT CHANGE)
jndi.factory=weblogic.jndi.WLInitialContextFactory
# Specifies the JNDI URL (MUST BEGIN WITH t3://)
jndi.url=t3://webhost.domain.com:80
# ------------- URI Settings ------------- #
cs.internal.uri=http://webhost.domain.com:80/admin/
dp.internal.uri=http://webhost.domain.com:80/developer/
fs.internal.uri=http://webhost.domain.com:80/fs/
vs.internal.uri=http://webhost.domain.com:80/vsadmin/
sp.internal.uri=http://webhost.domain.com:80/subscriber/
es.internal.uri=http://webhost.domain.com:80/es/
ms.internal.uri=http://webhost.domain.com:80/ms/
ns.internal.uri=http://webhost.domain.com:80/ns/
pps.internal.uri=http://webhost.domain.com:80/pps/
mos.internal.uri=http://webhost.domain.com:80/mos/
css.internal.uri=http://webhost.domain.com:80/css/
vss.internal.uri=http://webhost.domain.com:80/vss/
cs.external.uri=http://webhost.domain.com:80/admin/
dp.external.uri=http://webhost.domain.com:80/developer/
fs.external.uri=http://webhost.domain.com:80/fs/
vs.external.uri=http://webhost.domain.com:80/vsadmin/
sp.external.uri=http://webhost.domain.com:80/subscriber/
# ----------- Vending Settings ----------- #
vs.account.name=cds.vending.server.1
vs.account.password=vending
# ------------ Mail Settings ------------- #
ms.mail.smtp.host=mailhost.domain.com
ms.mail.smtp.sender=info@domain.com
#=====================================================================
# Included Managers, Portals, & Services
#=====================================================================
# Make any of the following lines a comment if the manager, portal, or service
# should not be deployed
cs.include
dp.include
vs.include
sp.include
fs.include
es.include
ms.include
ns.include
pps.include
mos.include
css.include
vss.include
 

 


1 (表格注解) 指定的值必须是主机名和端口号,或者是 IP 地址和端口号。不要使用 localhost。无论使用哪种格式,都必须将其用于对该组件的每个引用。例如,如果指定主机名和端口号,则无法使用 IP 地址来引用组件。在使用 SSL 时,必须将 URI 属性设置为部署该组件的主机的数字证书所使用的主机名。