Here will be shown how to manually configure and install JForum. It is assumed that you have some knowledge of how to install / configure a Java servlet container (or already have one up and running), and the database is properly configured.
For automated installation, check the Installation & configuration - Wizard section.
Note: These instructions are for the installation of JForum, release version 2.3.x and later. Some of the steps here described may not be valid for older versions, which are no longer supported.
To get JForum, go to the download page and get the latest version.
If you're running on a JDK other than Oracle's, also get the jcaptcha-1.0.jar file, and use it instead of the one that comes in the war file.
After the download, unpack the .war file into your webapp's directory (or any place you want to put it). A directory named jforum-<
release>
will be created, where <
release>
is the version, which may be "2.3.0", "2.3.1" etc... this it just for easy version identification.
You can rename the directory if you want. The next step you should do is register the JForum application within your Servlet Container, like Tomcat. This document will use the context name "jforum", but of course you can use any name you want.
JForum expects that some directories are writable by the web server. Before you start installing, please check if the following directories, and their sub-directories, exist and have full write permissions:
First of all, you must have MySQL, PostgreSQL, Oracle or SQL Server installed and properly configured. HSQLDB is supported as well, and has built-in support, so you don't need to download it (eg, it is an embedded database).
Open the file WEB-INF/config/SystemGlobals.properties. Now search for a key named database.driver.name
and configure it according to the following table:
Database | Key value |
---|---|
MySQL | mysql |
PostgreSQL | postgresql |
HSQLDB | hsqldb |
Oracle | oracle |
SQL Server | sqlserver |
The default value is mysql, which means JForum will try to use MySQL. Note that the value should be in lowercase.
Next, you can tell JForum whether to use a Connection Pool or not. A connection pool will increase the performance of your application, but there are some situations where the use of a connection pool is not recommended or even possible, so you can change it according to your needs.
By default JForum uses a connection pool, option which is specified by the key database.connection.implementation
. The following table shows the possible values for this key:
Connection Storage Type | Key value |
---|---|
Pooled Connections | net.jforum.PooledConnection |
Simple Connections | net.jforum.SimpleConnection |
DataSource Connections | net.jforum.DataSourceConnection |
If you have chosen net.jforum.DataSourceConnection, then set the name of the datasource in key database.datasource.name
, and ignore the table below. Otherwise, do the following steps:
Edit the file WEB-INF/config/database/<
DBNAME>
/<
DBNAME>
.properties, where <
DBNAME>
is the database name you are using - for instance, mysql, postgresql or hsqldb. In this file there are some options you should change, according to the table below:
Key Name | Key value description |
---|---|
database.connection.username | Database username |
database.connection.password | Database password |
database.connection.host | The host where the database is located |
dbname | The database name. The default value is jforum. All JForum tables are preceded by "jforum_ ", so you don't need to worry about conflicting table names. |
The other properties you may leave with the default values if you don't know what to put.
The next step is to create the tables. To do that, use the create script named "<
DBNAME>_
db_struct.sql", placed at WEB-INF/config/database/<
DBNAME>
. This script will create all necessary tables to run JForum. The script was tested and should work with no problem at all. Also, please keep in mind that if you are upgrading JForum you need to take a look to see if a migration script exists. Look in the file named "Readme.txt" in the root directory to see.
Now it is time to run the script to populate the database tables. To do that, use the script named "<
DBNAME>_
data_dump.sql", also located at WEB-INF/config/database/<
DBNAME>
. One more time, you should have no problems with this step. If you do, please remember to inform the error message, as well the database name and version you're using.
The main configuration file for JForum is WEB-INF/config/SystemGlobals.properties. The file is well documented, and you certainly will want to change some of the settings there, like forum's URL, name, description, location of some directories and etc.
You need to create a customed configuration file named jforum-custom.conf under WEB-INF/config/ directory. Add the following key and value into it: installed=true
Many of these settings are also available via Admin Control Panel -> Configurations once the web app is up and running, but some of them take effect only after a web app restart.
install = net.jforum.view.install.InstallAction
" from the file WEB-INF/config/modulesMapping.properties*
.page, and is already properly configured at WEB-INF/web.xml. If you are running JForum on an ISPs which have Apache HTTPD in front of Tomcat, you may need to contact their Technical Support and ask them to explicity enable the mapping for you. The username is Admin and the password is admin
user.hash.sequence
. There is already a default value to the key, but is VERY RECOMMENDED that you change the value. It may be anything, and you won't need to remember the value. You can just change one or other char, insert some more... just type there some numbers and random characters, and then save the file. This value will be used to enhance the security of your JForum installation, and you will just need to do this step once.