Software Requirements:
1.
Java SE JDK 6 Update 26 or later
2.
Apache Maven 3.0.3 or later
3.
Eclipse IDE for Java EE Developers
4.Eclipse Plugins:
4.1
Subclipse for Subversion 1.6
4.2
Eclipse ResourceBundle Editor
4.3
Maven Integration (m2e)
4.4
FindBugs
5.
Apache Tomcat 7.0.19 or later
6.
MySQL Community Server 5.5.14 or later
7.
Oracle JDBC Driver 10.2.0.4
Installed Path:
(Windows platform)
1.C:\Program Files\Java\jdk1.6.0_26
2.C:\apache-maven-3.0.3
3.C:\eclipse
4.C:\eclipse\plugins
5.C:\apache-tomcat-7.0.19
6.C:\Program Files\MySQL\MySQL Server 5.5
7.%HOMEPATH%\.m2\repository\com\oracle\ojdbc14\10.2.0.4.0
Environment Variables:
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_26
MAVEN_HOME=C:\apache-maven-3.0.3
Path=%JAVA_HOME%\bin;%MAVEN_HOME%\bin;C:\Program Files\MySQL\MySQL Server 5.5\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
Steps:
1.Launch Eclipse, navigate with Window > Preferences > Java > Installed JREs, remove jre6 first and then add jdk1.6.0_26 with directory C:\Program Files\Java\jdk1.6.0_26
2.Under Installed JREs > Execution Environments > J2SE-1.5, check jdk1.6.0_26 on the Compatible JREs.
3.Do SVN import to get the source code: File > Import ...> SVN > Get Project From SVN
svn://svn.code.sf.net/p/jforum2/code=>trunk=>project name: jforum2-code
4.Install MySQL Server, set the root user's password to 'root'.
5.Create a database with name 'jforum', and a user with name 'jforum' and password as 'jforum' or anything you like.
mysql -u root -p
mysql> CREATE USER 'jforum'@'localhost' IDENTIFIED BY 'jforum';
mysql> CREATE DATABASE jforum DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> GRANT ALL ON jforum.* TO 'jforum'@'localhost';
6.Run the two mysql database scripts: mysql_db_struct.sql and mysql_data_dump.sql, like the following example:
(Change D:\workspace\jforum2 to where your workspace located)
mysql -u root -p
mysql> use jforum;
mysql> source D:\workspace\jforum2\src\main\config\database\mysql\mysql_db_struct.sql
mysql> source D:\workspace\jforum2\src\main\config\database\mysql\mysql_data_dump.sql
7.You need to download the
Oracle Database 10g Release 2 (10.2.0.4) drivers ojdbc14.jar from
oracle.com yourself, rename it to ojdbc14-10.2.0.4.0.jar, and then copy it into %HOMEPATH%\.m2\repository\com\oracle\ojdbc14\10.2.0.4.0 directory or use the following command to add it to your Maven local repository:
mvn install:install-file -Dfile=ojdbc14.jar -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.4.0 -Dpackaging=jar
8.Right mouse click on the project name, Run As > Maven build > Goals: package > Run
9.Copy jforum.war from the project's target directory to C:\apache-tomcat-7.0.19\webapps
10.Start up Tomcat
11.Open a browser and visit
http://localhost:8080/jforum/ to test it.
UPDATE:
1.if you want to use other database for test, you can first install jforum through the web interface or run the two database scripts for your_db: <your_db>_db_struct.sql and <your_db>_data_dump.sql.
2.you can create the jforum-custom.conf file manually under the src/main/config directory, the content can be as follows(just copy from src/main/config/database/<your_db>/<your_db>.properties):
dao.driver=net.jforum.dao.sqlserver.SqlServerDataAccessDriver
database.connection.dbname=jforum
database.connection.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
database.connection.host=localhost
database.connection.implementation=net.jforum.PooledConnection
database.connection.password=jforum
database.connection.pool.max=50
database.connection.pool.min=5
database.connection.pool.timeout=5000
database.connection.port=1433
database.connection.string=jdbc\:sqlserver\://${database.connection.host}\:${database.connection.port};databaseName\=${database.connection.dbname};user\=${database.connection.username};password\=${database.connection.password};selectMethod\=cursor;
database.connection.username=jforum
database.driver.name=sqlserver
database.support.autokeys=true
database.support.subqueries=true
dbencoding=utf-8
i18n.board.default=zh_TW
installed=true
3.for SQL Server developers, you need to copy the sqljdbc4.jar into %JAVA_HOME%\jre\lib\ext directory to avoid the No suitable driver exception.