前言
包含金蝶AAS9.0部署,前端部署,后端部署。
金蝶AAS9.0部署
1. 下载金蝶AAS9.0安装包上传至服务器;
2. 解压安装包;
unzip -d /opt/AAS-V9.0 AAS-V9.0.zip
3. 配置JAVA路径;
echo $JAVA_HOME
vim /opt/AAS-9.0/bin/setenv
4. 启动金蝶AAS9.0;
首次启动需要设置密码
cd /opt/AAS-V9.0/domains/mydomain/bin
./startapusic
根据提示设置密码,完成后关闭程序
5. 后台启动,查看管理页面;
nohup ./startapusic >/dev/null &
http://hostname:6888/admin
前端部署
1. 复制项目部署文件加;
cd /opt/AAS-V9.0/domains/
cp -r mydomain web
2. 修改端口,开启GZIP压缩;
vim /opt/AAS-V9.0/domains/web/apusic.conf
3. vue打包部署
上传包至
cd /opt/AAS-V9.0/domains/web/applications
unzip -d dict dict.zip
4. 创建WEB-INF文件夹 web.xml文件
cd /opt/AAS-V9.0/domains/web/applications/dict
mkdir WEB-INF
vim web.xml
文件内容
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaeehttp://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"version="3.1" metadata-complete="true"><display-name>Router for AAS</display-name><error-page><error-code>404</error-code><location>/index.html</location></error-page>
</web-app>
5. 启动服务
cd /opt/AAS-V9.0/domains/test/bin
#后台启动
nohup ./startapusic >/dev/null &
#查看服务
ps -ef|grep aas
#关闭服务
kill -9 41127
6. 管理端配置
访问管理页面
http://hostname:8888/admin
7. 访问项目
http://hostname:8888
后端部署
1. 修改项目打包方式
创建ApplicationServletInitializer.java类
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;public class ApplicationServletInitializer extends SpringBootServletInitializer {@Overrideprotected SpringApplicationBuilder configure(SpringApplicationBuilder application) {// 这里放入springboot的启动类return application.sources(RabbitmqDemoApplication.class);}
}
pom.xml修改去除内置tomcat,引入servlet,修改打包方式
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.6.7</version><relativePath/> <!-- lookup parent from repository --></parent><groupId>com.example</groupId><artifactId>rabbitmq-demo</artifactId><version>0.0.1</version><name>rabbitmq-demo</name><description>rabbitmq-demo</description><properties><java.version>1.8</java.version></properties><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-amqp</artifactId></dependency><!--去除内置tomcat--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId><exclusions><exclusion><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-tomcat</artifactId></exclusion></exclusions></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><optional>true</optional></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency><dependency><groupId>org.springframework.amqp</groupId><artifactId>spring-rabbit-test</artifactId><scope>test</scope></dependency><!-- swagger2--><dependency><groupId>io.springfox</groupId><artifactId>springfox-boot-starter</artifactId><version>3.0.0</version></dependency><!-- https://mvnrepository.com/artifact/io.springfox/springfox- --><dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger2</artifactId><version>3.0.0</version></dependency><!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui --><dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger-ui</artifactId><version>3.0.0</version></dependency><!-- https://mvnrepository.com/artifact/com.github.xiaoymin/knife4j-spring-boot-starter --><dependency><groupId>com.github.xiaoymin</groupId><artifactId>knife4j-spring-boot-starter</artifactId><version>3.0.3</version></dependency><!--引入servlet--><!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api --><dependency><groupId>javax.servlet</groupId><artifactId>javax.servlet-api</artifactId><version>3.1.0</version><scope>provided</scope></dependency></dependencies><!--修改打包方式--><packaging>war</packaging><build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-war-plugin</artifactId><version>2.6</version><configuration><failOnMissingWebXml>false</failOnMissingWebXml></configuration></plugin></plugins></build>
</project>
2. 复制项目部署文件夹
cd /opt/AAS-V9.0/domains/
cp -r mydomain java
3. 修改配置文件端口
vim /opt/AAS-V9.0/domains/test2/config/apusic.conf
金蝶会禁用DELETE,PUT,TRACE,OPTIONS有使用要打开
vim /opt/AAS-V9.0/domains/mydomain/config/vm.options
#修改
#apusic.http.disabledMethods=DELETE,PUT,TRACE,OPTIONS
4. maven打包war上传
cd /opt/AAS-V9.0/domains/java/applications
5. 启动服务
cd /opt/AAS-V9.0/domains/java/bin
nohup ./startapusic >/dev/null &
启动成功后war将自动解压到下面的目录
cd /opt/AAS-V9.0/domains/java/deploy
6. 访问管理页面,访问项目地址
管理页面:http://hostname:8890/admin
项目地址:http://hostname:8890/包名/请求地址
安装金蝶AAS-V10版本可查看该链接:暂无开放(后续更新)