http://download.jboss.org/drools/release/6.1.0.Final/kie-drools-wb-distribution-6.1.0.Final.ziphtml
解壓得到kie-drools-wb-distribution-wars-6.1.0.Final-tomcat7.0.warjava
複製到tomcat webapps下web
1. Set-up environmentapache create setenv.sh (or setenv.bat) file inside TOMCAT_HOME/bin and add following:windows CATALINA_OPTS="-Xmx512M -XX:MaxPermSize=512m"api NOTE: this is an example for unix like systems for Windows $CATALINA_HOME needs to be replaced with windows env variable or absolute pathtomcat 2. Configure JEE security for kie-wb on tomcat (with default realm backed by tomcat-users.xml)app 2a. Copy "kie-tomcat-integration" JAR into TOMCAT_HOME/lib (org.kie:kie-tomcat-integration)webapp 2b. Copy "JACC" JAR into TOMCAT_HOME/lib (javax.security.jacc:artifactId=javax.security.jacc-api in JBoss Maven Repository)ide 2c. Copy "slf4j-api" JAR into TOMCAT_HOME/lib (org.slf4j:artifactId=slf4j-api in JBoss Maven Repository) 2d. Add valve configuration into TOMCAT_HOME/conf/server.xml inside Host element as last valve definition: <Valve className="org.kie.integration.tomcat.JACCValve" /> 2e. Edit TOMCAT_HOME/conf/tomcat-users.xml to include roles and users, make sure there will be 'analyst' or 'admin' roles defined as it's required to be authorized to use kie-wb |
1.設置tomcat啓動參數
修改catalina.bat文件 set JAVA_OPTS=-Xms1024m -Xmx1024m -Xss1024K -XX:PermSize=64m -XX:MaxPermSize=128m
2.設置tomcat用戶,修改tomcat-users.xml文件,增長角色和用戶
<?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="analyst"/> <role rolename="manager-status"/> <role rolename="manager"/> <role rolename="manager-jmx"/> <role rolename="tomcat"/> <role rolename="manager-script"/> <role rolename="admin"/> <role rolename="manager-gui"/> <role rolename="role1"/> <user username="zanghaibin" password="1" roles="analyst"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="tomcat" password="tomcat" roles="tomcat"/> <user username="admin" password="2b" roles="admin,analyst,manager-gui,manager-script,manager-jmx,manager-status"/> <user username="role1" password="tomcat" roles="role1"/> </tomcat-users>
3.修改conf/server.xml文件
host節點下增長<Valve className="org.kie.integration.tomcat.JACCValve" />
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <!-- SingleSignOn valve, share authentication between web applications Documentation at: /docs/config/valve.html --> <!-- <Valve className="org.apache.catalina.authenticator.SingleSignOn" /> --> <!-- Access log processes all example. Documentation at: /docs/config/valve.html --> <!-- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/> --> <Valve className="org.kie.integration.tomcat.JACCValve" />
4.分別複製kie-tomcat-integration、JACC、slf4j-api3個jar文件到tomcat lib目錄
kie-tomcat-integration 可在JBoss Maven Repository 下載