Upgrading from JForum version 2.0.2 to version 2.1 is quite simple. First,
make a backup of the database and the current directoy where JForum is installed. Backup everything (templates, images etc). The suggested approach to use is to unpack JForum 2.1 into some directory, made the changes there and then, when all is finished, copy it over the directory where JForum 2.0.2 is located.
Now follow these steps, in the order they're shown:
:arrow:
New configuration options
The file
WEB-INF/config/SystemGlobals.properties has some new keys. To make the task easier,
you should update the new file instead of trying to change the current (from 2.0.2). Compare both files and look for differences, updating the keys as necessary. Note that if your current version of SystemGlobals does not have some of the keys present in version 2.1, just leave with the defaults.
Important: You should not forget to change the value of the key "
installation.config" to "
${config.dir}/jforum-custom.conf".
Open jforum-custom.conf. If there is a key named "database.connection.string",
remove it.
Good programs to help finding differences are WinMerge -
http://winmerge.sf.net -, for the Windows Plataform, and diff, for Unix like machines. Good candidates for updating are "user.hash.sequence", "database.driver.name" and the mail settings.
:arrow:
Database settings
Open the file
WEB-INF/config/<dbname>/<dbname>.properties and check the username, password and host to connect. If you're going to use MySQL 4.1 or more recent, please set the value of the keys
mysql.encoding and
mysql.unicode to empty, as shown below:
Just make sure that there isn't any blank space after the "=" signal.
Also for MySQL 4.1+ users, go to
WEB-INF/config/database/mysql and rename the file "mysql_41.sql" to "mysql.sql" (delete the existing mysql.sql file, which does not work for MySQL 4.1+)
:arrow:
Renaming files
Next, go to
WEB-INF/config and rename the file "<username>.conf" - where "<username" is the login account which is running the webserver, like "root.conf", "somehost.conf", "blah.con" etc - to "jforum-custom.conf". >
Dont't forget this step. If the <username>.conf file does not exist, then ignore.
:arrow:
Checking jforum-custom.conf
Now, open jforum-custom.conf and make sure that the configuration options are as expected. It may sound like an unnecessary step, since your forum is working already, but even that, just to be sure that none of the keys you changes in SystemGlobals.properties are being overwritten by this file.
Also in this file, search for a key named "
database.connection.string". If you find,
remove it.
:arrow:
Upgrading the database
Now, import the SQL file named "<database>_2.0.2_to_2.1.sql" (like "mysql_2.0.2_to_2.1.sql") to your database. This script will convert the tables and create the new ones.
:arrow:
About permissions
The security model in JForum 2.1 changed a little bit, so much probably you'll have to re-save the permissions from all groups again. The step is simple: just to to the
Admin Control Panel -> Groups -> Permissions, check the options and then click "Save".
:arrow:
Removing installation files
Now, do this:
rename the file "new_rename.htm" to "index.htm" (you can remove the existing index.htm)
delete the directory "install"
Open SystemGlobals.properties and add the following line:
Open WEB-INF/config/modulesMapping.properties and remove from it the following line:
:arrow: Testing
Now, if possible, test JForum 2.1 before copying it over 2.0.2. The easier way is to put it under some another Context. If the system started without problems, then you can proceed to the final step. As mentioned in the previous section, you may experience some issues with access rights. If the user you use in JForum 2.0.2 does for the administrative tasks does not have access to the control panel in JForum 2.1, please do this:
Find the user id of your user by executing the query
Go to your database console (or any administration tool use may use) and run the following SQL query:
and then restart the servlet container.
:arrow: Final Step
Before copying the new files over the old ones, remove the following files from the directory WEB-INF/lib: "commons-fileupload-1.0-cvs.jar", "pgsql_driver74.213.jar", "mysql-connector-java-3.0.15-ga-bin.jar" and "hsqldb-1.7.2.6.jar".
Now, the last step: copy all files and directories from JForum 2.1 over the files from version 2.0.2. Make sure you have backup of all 2.0.2 data before you do this. Restart the servlet container, and start using JForum 2.1.
Now, re-save ALL permissions for ALL groups. Improvements to the permission model were made, so it is necessary that you save again the roles.
That's all. For a complete list of new features and improvements, please access http://www.jforum.net/release-notes.htm
Rafael
[originally posted on jforum.net by Rafael Steil]