Next Previous Contents

4. Getting MMBase and setting up some things

4.1 Getting MMBase

Now that you have all supporting packages up and running (you did follow the instructions in the previous section, didn't you?) get yourself a copy of MMBase. As said before, this document describes the works for MMbase version 1.4.

Download MMBase from http://www.mmbase.org/releases/mmbase-1.5.zip with a browser, or even easier:

  wget http://www.mmbase.org/releases/mmbase-1.5.zip  

From version 1.5 MMBase can be used as an webapp within Tomcat. So I recommend unpacking the distribution in a temporary directory and copying the mmbase-webapp/ tree to /var/lib/tomcat4/webapps/. If MMBase is your only (or main) application on Tomcat, you can also install it as ROOT, by copying everything from mmbase-webapp/ to /var/lib/tomcat4/webapps/ROOT/.

In this document I will assume that MMBase is unpacked in /var/lib/tomcat4/webapps/mmbase-webapp/

4.2 Getting mm.mysql

You will also need mysql.jar (JDBC driver for MySQL) which can be downloaded from http://mmmysql.sourceforge.net/.
Make sure you get the binary jar, which means you may have to unjar the complete distribution first and locate the file mm.mysql-2.0.14-bin.jar (2.0.14 was the latest release when writing this HOWTO) Put the file in /var/lib/tomcat4/webapps/mmbase-webapp/WEB-INF/lib/.

4.3 Creating a database for MMBase

MMbase needs a database and a user that has full rights on that database. The user seems to needs rights via localhost and the real hostname. This was not entirely clear to me.

Issue the following commands on the MySQL prompt. I chose a database called MMBase, a user named mmbaseuser and the password secret.

CREATE DATABASE MMBase
USE MMBase
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON MMBase.* TO mmbaseuser@'%' IDENTIFIED BY 'secret';
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON MMBase.* TO mmbaseuser@localhost IDENTIFIED BY 'secret'
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON MMBase.* TO mmbaseuser@realhostname IDENTIFIED BY 'secret'
flush privileges;

4.4 Tomcat security manager

The Tomcat java security manager somehow interferes with MMBase. I haven't found out what settings are needed to run MMBase with the security manager active. Please let me know. For now I disabled the security manager, which you should never not do. (Big Disclaimer!)

In /etc/default/tomcat4 change the security line to:
TOMCAT4_SECURITY="no"

4.5 Copying xml-apis

For some odd reason, Tomcat wants to find the file WEB-INF/lib/xml-apis.jar also in /usr/share/tomcat/common/lib/xml-apis.jar, so you have to copy it.


Next Previous Contents

Hosting by: Hurra Communications Ltd.
Generated: 2007-01-26 17:57:54