(1) 创建MySQL数据库osworkflow
新建osworkflow数据库,然后导入osworkflow\src\etc\deployment\jdbc\mysql.sql
(2) 在Tomcat下创建配置文件
tomcat5.5.23\conf\Catalina\localhost\osworkflow.xml
<?xml version='1.0' encoding='utf-8'?>
<Context path="/osworkflow" debug="0" reloadable="true">
<Resource
name="jdbc/DefaultDS"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
maxIdle="10"
maxWait="5000"
username="root"
password="root"
url="jdbc:mysql://localhost:3306/osworkflow?useUnicode=true&characterEncoding=utf-8"
maxActive="20"/>
</Context>
(3)修改WEB-INF\classes\osuser.xml
<opensymphony-user>
<provider class="com.opensymphony.user.provider.jdbc.JDBCAccessProvider">
<property name="user.table">os_user</property>
<property name="group.table">os_group</property>
<property name="membership.table">os_membership</property>
<property name="user.name">username</property>
<property name="user.password">passwordhash</property>
<property name="group.name">groupname</property>
<property name="membership.userName">username</property>
<property name="membership.groupName">groupname</property>
<property name="datasource">jdbc/DefaultDS</property>
</provider>
<provider class="com.opensymphony.user.provider.jdbc.JDBCCredentialsProvider">
<property name="user.table">os_user</property>
<property name="group.table">os_group</property>
<property name="membership.table">os_membership</property>
<property name="user.name">username</property>
<property name="user.password">passwordhash</property>
<property name="group.name">groupname</property>
<property name="membership.userName">username</property>
<property name="membership.groupName">groupname</property>
<property name="datasource">jdbc/DefaultDS</property>
</provider>
<provider class="com.opensymphony.user.provider.jdbc.JDBCProfileProvider">
<property name="user.table">os_user</property>
<property name="group.table">os_group</property>
<property name="membership.table">os_membership</property>
<property name="user.name">username</property>
<property name="user.password">passwordhash</property>
<property name="group.name">groupname</property>
<property name="membership.userName">username</property>
<property name="membership.groupName">groupname</property>
<property name="datasource">jdbc/DefaultDS</property>
</provider>
<authenticator class="com.opensymphony.user.authenticator.SmartAuthenticator" />
</opensymphony-user>