Database changes
This page is generated by Machine Translation from Japanese.
Overview
Under normal circumstances the database use the H2 Database. You can use other databases by changing settings.
If you use the MySQL
Installation
Expand the MySQL binaries.
Setting
Create a database.
$ mysql -u root -p
mysql> create database fess_db;
mysql> grant all privileges on fess_db.* to fess_user@localhost identified by 'fess_pass';
mysql> create database fess_robot;
mysql> grant all privileges on fess_robot.* to s2robot@localhost identified by 's2robot';
mysql> FLUSH PRIVILEGES;
Create a table in the database. DDL file is located in extension/mysql.
$ mysql -u fess_user --password=fess_pass fess_db < extension/mysql/fess.ddl
$ mysql -u s2robot --password=s2robot fess_robot < extension/mysql/robot.ddl
webapps/fess/WEB-INF/lib on mysql driver jar.
$ cd webapps/fess/WEB-INF/lib/
$ rm h2-1.*.jar
$ wget http://mirrors.ibiblio.org/pub/mirrors/maven2/mysql/mysql-connector-java/5.1.18/mysql-connector-java-5.1.18.jar
$ cd ../../../../
Edit the webapps/fess/WEB-INF/classes/jdbc.dicon.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//SEASAR2.1//DTD S2Container//EN"
"http://www.seasar.org/dtd/components21.dtd">
<components namespace="jdbc">
<include path="jta.dicon"/>
<!-- MySQL -->
<component name="xaDataSource"
class="org.seasar.extension.dbcp.impl.XADataSourceImpl">
<property name="driverClassName">
"com.mysql.jdbc.Driver"
</property>
<property name="URL">
"jdbc:mysql://localhost:3306/fess_db?" +
"noDatetimeStringSync=true&" +
"zeroDateTimeBehavior=convertToNull&" +
"useUnicode=true&characterEncoding=UTF-8&" +
"autoReconnect=true"
</property>
<property name="user">"fess_user"</property>
<property name="password">"fess_pass"</property>
</component>
<component name="connectionPool"
class="org.seasar.extension.dbcp.impl.ConnectionPoolImpl">
<property name="timeout">600</property>
<property name="maxPoolSize">10</property>
<property name="allowLocalTx">true</property>
<destroyMethod name="close"/>
</component>
<component name="DataSource"
class="org.seasar.extension.dbcp.impl.DataSourceImpl"
/>
</components>
Edit the webapps/fess/WEB-INF/classes/s2robot_jdbc.dicon.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//SEASAR2.1//DTD S2Container//EN"
"http://www.seasar.org/dtd/components21.dtd">
<components namespace="jdbc">
<include path="jta.dicon"/>
<!-- for MySQL -->
<component name="xaDataSource"
class="org.seasar.extension.dbcp.impl.XADataSourceImpl">
<property name="driverClassName">
"com.mysql.jdbc.Driver"
</property>
<property name="URL">
"jdbc:mysql://localhost:3306/fess_robot?" +
"noDatetimeStringSync=true&" +
"zeroDateTimeBehavior=convertToNull&" +
"useUnicode=true&characterEncoding=UTF-8&" +
"autoReconnect=true"
</property>
<property name="user">"s2robot"</property>
<property name="password">"s2robot"</property>
</component>
<component name="connectionPool"
class="org.seasar.extension.dbcp.impl.ConnectionPoolImpl">
<property name="timeout">600</property>
<property name="maxPoolSize">10</property>
<property name="allowLocalTx">true</property>
<property name="transactionIsolationLevel">@java.sql.Connection@TRANSACTION_REPEATABLE_READ</property>
<destroyMethod name="close"/>
</component>
<component name="DataSource"
class="org.seasar.extension.dbcp.impl.DataSourceImpl"
/>
</components>