If you want to support more instances of MMBase, for example if you would like to make MMBase available to more or all of your users, you can create several MMBase installations and have these all run on the same Tomcat server.
Install MMBase in the home directory of the user <user> performing all steps before:
create a directory mmbase/ in the users home directory,
copy all MMBase files into the directory /home/<user>/mmbase/,
build the directory structure and configuration files in the very same way we did before,
for MMBase version 1.7 running on Tomcat version 5, enable the Xerces libraries,
for MMBase version 1.6 running on Tomcat version 4, remove the Xerces libraries in MMBase (after you have copied these from MMBase to Tomcat the first time),
install the MySQL JDBC driver and create a new MySQL database for this user.
Make sure both the user and the Tomcat server have access to the MMBase installation:
chown -R <user>:tomcat /home/<user>/mmbase/
Make sure that the directory /home/<user>/mmbase/WEB-INF/config/builders/applications is writable and accessible by the servlet engine user (for auto-installing builders):
chmod 770 /home/<user>/mmbase/WEB-INF/config/builders/applications chmod 750 /home/<user>/mmbase/WEB-INF/config/builders/ chmod 750 /home/<user>/mmbase/WEB-INF/config/ chmod 750 /home/<user>/mmbase/WEB-INF/ chmod 750 /home/<user>/mmbase/
Now the home directory of this user has to be accessible to the Tomcat server as well. You can change the group owner of the users home directory to the tomcat user group:
chown -g tomcat /home/<user>/
Or, if you don't want this, use the Access Control Lists (ACL's) to accomplish the same:
setfacl -m u:tomcat:r-x /home/<user>/
Finally, link the new MMBase installation to the Tomcat server:
ln -s /home/<user>/mmbase /usr/local/tomcat/webapps/mmbase-<user>
and restart Tomcat:
which will make this users MMBase installation available through:
Again, you can set up a JK 2 mapping or a reverse proxy in Apache like we did before.
In order to run several instances of MMBase on a single Tomcat server, make sure you increase the available memory resources, i.e. by adding to the $CATALINA_OPTS environment variable in /etc/rc.d/init.d/tomcat: