AWS常用参数调整

调整JVM

<!-- JVM调整的大小根据服务器配置实际调整-->

<!--修改AWS APP JVM , 文件:%AWS_HOME%/bin/aws_startup.sh(startup.bat)-->
JAVA_OPTS=-server -Xmx2g -Xms2g -XX:MetaspaceSize=1024m -XX:MaxMetaspaceSize=1024m -Xmn128m ...

<!--修改AWS WEB JVM , 文件:%AWS_HOME%/webserver/bin/catalina.sh(catalina.sh)-->
set JAVA_OPTS=%AWSClusterArgs% -server -Xms1024m -Xmx1024m ...

有关AWS PaaS平台性能优化的详细配置介绍参见这里

端口

AWSPaaS平台默认使用的端口有10008、10007、8088、8005。 外网访问AWS PaaS服务防火墙需要放行的端口为8088

<!--修改AWS APP端口,文件:%AWS_HOME%/bin/conf/server.xml#connector#port,将mainServer 和 fileServer的port进行调整-->
 <connector name="mainServer" port="10008" maxClient="800" connectionTimeout="1200000" shell="true" sessionTimeout="7200000" sessionIdleTime="1200000"/>
 <connector name="fileServer" port="10007" connectionTimeout="2400000"/>

<!--修改AWS APP端口对应WEB端配置,文件:%AWS_HOME%/webserver/webapps/portal/WEB-INF/clasess/aws-server.xml#aws-server-port和aws-file-port -->
<aws-server-port>10008</aws-server-port> <!--值应与mainServer值一致-->
<aws-file-port>10007</aws-file-port>  <!--值应与fileServer值一致-->

<!--修改AWS WEB端口,文件:%AWS_HOME%/webserver/conf/server.xml-->
<Server port="8005" shutdown="SHUTDOWN">
<Connector port="8088" protocol="org.apache.coyote.http11.Http11Nio2Protocol" ...

AWS PaaS平台出厂默认WEB容器为标准的Tomcat8.5,如需要开启SSL/TLS配置,详细请参见Apache Tomcat官方文档说明。

数据库

AWS PaaS平台已支持的数据库类型参见这里

<!--修改AWS数据库连接,文件:%AWS_HOME%/bin/conf/server.xml#database -->

 <!-- oracle-->
<database provider="ORACLE" driver="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:ORCL" username="AWS6" password="isaywzklSy40XdmfW1ZOeQ" initialSize="50" maxActive="200" extendConfig="conf/db_pool.properties" />

 <!-- sqlserver-->
<database provider="sqlserver" driver="net.sourceforge.jtds.jdbc.Driver" url="jdbc:jtds:sqlserver://localhost:1433/aws6;characterEncoding=UTF-8"  username="sa" password="1dow3oxI2Gs_nOK2gz7gmQ" initialSize="20" maxActive="50"  extendConfig="conf/db_pool.properties"/>

 <!-- sqlserver 官方驱动-->
 <database provider="sqlserver" driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://localhost:1433;databaseName=aws6;integratedSecurity=false;characterEncoding=UTF-8"  username="sa" password="1dow3oxI2Gs_nOK2gz7gmQ" initialSize="20" maxActive="50"  extendConfig="conf/db_pool.properties"/>

 <!-- DB2-->
<database provider="DB2" driver="com.ibm.db2.jcc.DB2Driver" url="jdbc:db2://localhost:50000/AWS" username="db2admin" password="isaywzklSy40XdmfW1ZOeQ" initialSize="30" maxActive="100" extendConfig="conf/db_pool.properties"/>

 <!-- 南方通用 GBase-->
<database provider="informix" driver="com.informix.jdbc.IfxDriver" url="jdbc:informix-sqli://localhost:9088/aws6:INFORMIXSERVER=gbaseserver;DB_LOCALE=zh_CN.utf8;CLIENT_LOCALE=zh_CN.utf8;NEWCODESET=UTF8,GB18030-2000,5488" username="informix" password="unA21tycsLzLLPiModAl7w" initialSize="10" maxActive="300" extendConfig="conf/db_pool.properties"/>

<!-- postgresql -->
<database provider="postgresql" driver="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/AWS6" username="postgres" password="isaywzklSy40XdmfW1ZOeQ" initialSize="5" maxActive="100" extendConfig="conf/db_pool.properties"/>

 <!-- 神通-->
<database provider="oscar" driver="com.oscar.Driver" url="jdbc:oscar://localhost:2003/AWS6" username="sysdba" password="UDOl574w_d7PYVp6fXdVIA" initialSize="10" maxActive="50" extendConfig="conf/db_pool.properties"/>

<!-- 达梦-->
<database provider="dm" driver="dm.jdbc.driver.DmDriver" url="jdbc:dm://localhos:5236/DAMENG" username="sysdba" password="vomYnW4GP-ZrxJtGYaw52w" initialSize="10" maxActive="50" extendConfig="conf/db_pool.properties"/>

<!-- 人大金仓-->
<database provider="kingbase" driver="com.kingbase8.Driver" url="jdbc:kingbase8://192.168.0.52:54321/TEST" username="SYSTEM" password="1dow3oxI2Gs_nOK2gz7gmQ" initialSize="20" maxActive="50" extendConfig="conf/db_pool.properties"/>

<!-- Mysql-->
<database provider="MYSQL" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://192.168.0.227:3306/aws6?useUnicode=true&amp;amp;characterEncoding=UTF-8" username="root" password="isaywzklSy40XdmfW1ZOeQ" initialSize="10" maxActive="300" extendConfig="conf/db_pool.properties" />

portal更名

比如将portal更改为ROOT

1. 修改 %AWS_HOME%/webserver/webapps/目录下portal文件夹名称为ROOT
2. 修改 %AWS_HOME%/bin/conf/aws-portal.xml#portal#location值为../webserver/webapps/ROOT/

<portal location="../webserver/webapps/ROOT/" url="http://locahost:8088" mobileUrl="http://localhost:8088">

URL地址和移动门户访问地址

<!--修改 %AWS_HOME%/bin/conf/aws-portal.xml#portal#url和mobileUrl -->
<portal location="../webserver/webapps/portal/" url="http://locahost:8088/portal" mobileUrl="http://localhost:8088/portal">

上传附件大小限制

AWS PaaS平台默认不允许上传大附件,管理员可通过配置开启。

<!--文件 %AWS_HOME%/bin/conf/aws-portal.xml#property#filesize.max-->
 <property name="filesize.max">200</property><!--表单附件大小限制,单位M-->

<!--文件 %AWS_HOME%/webserver/webapps/portal/WEB-INF/web.xml-->
<servlet>
    <servlet-name>DispatcherUpFile</servlet-name>
    <servlet-class>com.actionsoft.webframework.servlet.DispatcherUpFileServlet</servlet-class>
        <init-param>
            <param-name>maxSize</param-name>
<!--非表单附件场景默认最大为1024M, 表单附件场景最大取aws-portal.xml文件name="filesize.max"值 和 当前!form-ui-file- 中较大的值 -->
            <param-value>{"def":1024,"!form-ui-file-":200}</param-value>
        </init-param>
    </servlet>



Seven
 010-62962343-690
 liujx@actionsoft.com.cn
感谢您对该文档的关注!如果您对当前页面内容有疑问或好的建议,请与我联系。如果您需要解答相关技术问题请登录AWS客户成功社区