快速入门
# 概述
本文档主要介绍金蝶Apusic应用服务器V10标准版快速入门,提供了系统环境要求、安装方法、基本使用等功能,适用于使用金蝶Apusic应用服务器进行开发的开发人员、生产环境的系统管理员、运维人员等。
# 版本变更说明
本文档根据产品实际更新情况同步更新,最新版本将会包括历史版本内容或作出对应的修改说明。
| 日期 | 手册版本 | 适用产品 | 更新说明 |
| 2023年12月 | V10P8A03F01 | AAS标准版 V10 | 更新许可证授权码获取方式 |
# 产品介绍
金蝶Apusic应用服务器V10标准版是一款符合JAVAEE规范的Web应用服务器,属于轻量级应用服务器,通常用于应用系统高效开发场合。
# 术语
AAS:金蝶Apusic应用服务器
AE:金蝶Apusic应用服务器标准版产品标识
APUSIC_HOME:金蝶Apusic应用服务器安装目录
# 环境准备
配置Java环境,建议jdk版本为1.8.0_201以上。
# 安装与卸载
# 安装
准备安装包AAMS-V10.zip或AAMS-V10.tar.gz。
解压即安装成功。
# 卸载
删除安装目录${APUSIC_HOME}/下所有文件即可完成卸载操作。
# 许可证授权
AAS需要有对应的许可证才能正常使用,通常情况下,金蝶天燕会根据用户购买的产品版本配套对应的许可证,如果在使用过程中出现许可证过期或无效等问题,建议优先联系对接的天燕服务人员,重新申请对应许可证。
许可证位置为${APUSIC_HOME}/license.xml。
# 部署应用程序
本章节描述该产品快速部署应用程序操作。
# 前提条件
准备Web应用程序文件。
已安装并启动金蝶Apusic应用服务器。
# 操作步骤
将应用程序文件拷贝至${APUSIC_HOME}/webapps/ 目录下即可完成部署。
访问http://[IP]:6888/[CONTEXT]。
# 配置数据源
本章节描述该产品配置数据源操作。
# 前提条件
已安装金蝶Apusic应用服务器。
准备数据源环境以及对应版本的驱动。
# 操作步骤
1.在${APUSIC_HOME}/config/apusic.conf中配置endpoint,如下:
<Resource name="jdbc/test" auth="Container" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://127.0.0.1:3306/test_platform?useUnicode=true&characterEncoding=utf-8" username="root"
password="root" maxTotal="100" maxIdle="30" maxWaitMillis="10000" />
2
3
2.将数据源对应版本的驱动放置${APUSIC_HOME}/lib/ 目录下。
注意: 在代码中要引用 jndi 需要加上前缀:java:comp/env,如上面的数据源的:java:comp/env/jdbc/test
3.启动应用服务器,访问https://[IP]:8443/[CONTEXT]。
# 配置HTTPS
本章节描述该产品配置HTTPS操作。
# 证书格式为 JKS
# 前提条件
已安装金蝶Apusic应用服务器。
准备证书,如示例证书 arsp_server_keystore.jks。
# 操作步骤
1.在${APUSIC_HOME}/config/apusic.conf中配置endpoint,如下:
<endpoint name="ams-https" port="8443" protocol="HTTP/1.1" SSLEnabled="true" executor="http-thread-pool">
<SSLHostConfig>
<Certificate certificateKeystoreFile="conf/cert/arsp_server_keystore.jks" certificateKeystoreType="JKS"
certificateKeystorePassword="changeit" />
</SSLHostConfig>
</endpoint>
2
3
4
5
6
2.添加server引用:
<servers>
<server name="ams-server" services="ams-service" endpoints="ams-https" executors="http-thread-pool"/>
</servers>
2
3
3.启动应用服务器,访问https://[IP]:8443/[CONTEXT]。
# 证书格式为 PEM
# 前提条件
已安装金蝶Apusic应用服务器。
准备证书,如示例证书 private_key.pem、public_key.pem、chain.pem。
# 操作步骤
1.在${APUSIC_HOME}/config/apusic.conf中配置endpoint,如下:
<endpoint name="ams-https" port="8443" protocol="HTTP/1.1" SSLEnabled="true" executor="http-thread-pool">
<SSLHostConfig>
<Certificate certificateKeyFile="conf/cert/private_key.pem" certificateKeyPassword="changeit"
certificateFile="conf/cert/public_key.pem" certificateChainFile="conf/cert/chain.pem" type="RSA" />
</SSLHostConfig>
</endpoint>
2
3
4
5
6
7
2.再添加server引用:
<servers>
<server name="ams-server" services="ams-service" endpoints="ams-https" executors="http-thread-pool"/>
</servers>
2
3
3.启动应用服务器,访问https://[IP]:8443/[CONTEXT]。
# 日志配置
# 系统日志
在${APUSIC_HOME}/config/logging.properties中配置日志相关信息。
日志文件默认位置为${APUSIC_HOME}/logs/ 。
# 访问日志
访问日志可配置在 application 或者 service 里面。配置在 host 里面则该 host 下的应用访问都会被记录日志
<Valve className="com.apusic.ams.valves.AccessLogValve" directory="logs" prefix="access_log" suffix=".txt"
pattern="common" />
2
日志文件默认位置为${APUSIC_HOME}/logs/ 。