<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML ><HEAD ><TITLE > Installing more MMBase servers on a single Tomcat server </TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE=" MMBase Installation HOWTO " HREF="index.html"><LINK REL="PREVIOUS" TITLE=" Installing an Apache reverse proxy as a front-end to your MMBase server " HREF="x1037.html"><LINK REL="NEXT" TITLE="Acknowledgements" HREF="x1141.html"></HEAD ><BODY CLASS="sect1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" ><SPAN CLASS="application" >MMBase</SPAN > Installation HOWTO</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="x1037.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="x1141.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="sect1" ><H1 CLASS="sect1" ><A NAME="AEN1064" ></A >14. Installing more <SPAN CLASS="application" >MMBase</SPAN > servers on a single <SPAN CLASS="application" >Tomcat</SPAN > server</H1 ><P > If you want to support more instances of <SPAN CLASS="application" >MMBase</SPAN >, for example if you would like to make <SPAN CLASS="application" >MMBase</SPAN > available to more or all of your users, you can create several <SPAN CLASS="application" >MMBase</SPAN > installations and have these all run on the same <SPAN CLASS="application" >Tomcat</SPAN > server. </P ><P > Install <SPAN CLASS="application" >MMBase</SPAN > in the home directory of the user <TT CLASS="replaceable" ><I ><user></I ></TT > performing all steps before: <P ></P ><UL COMPACT="COMPACT" ><LI ><P > create a directory <TT CLASS="filename" >mmbase/</TT > in the users home directory, </P ></LI ><LI ><P > copy all <SPAN CLASS="application" >MMBase</SPAN > files into the directory <TT CLASS="filename" >/home/<TT CLASS="replaceable" ><I ><user></I ></TT >/mmbase/</TT >, </P ></LI ><LI ><P > build the directory structure and configuration files in the very same way we did before, </P ></LI ><LI ><P > for <SPAN CLASS="application" >MMBase</SPAN > version 1.7 running on <SPAN CLASS="application" >Tomcat</SPAN > version 5, enable the <SPAN CLASS="systemitem" >Xerces</SPAN > libraries, </P ></LI ><LI ><P > for <SPAN CLASS="application" >MMBase</SPAN > version 1.6 running on <SPAN CLASS="application" >Tomcat</SPAN > version 4, remove the <SPAN CLASS="systemitem" >Xerces</SPAN > libraries in <SPAN CLASS="application" >MMBase</SPAN > (after you have copied these from <SPAN CLASS="application" >MMBase</SPAN > to <SPAN CLASS="application" >Tomcat</SPAN > the first time), </P ></LI ><LI ><P > install the <SPAN CLASS="application" >MySQL</SPAN > <SPAN CLASS="acronym" >JDBC</SPAN > driver and create a new <SPAN CLASS="application" >MySQL</SPAN > database for this user. </P ></LI ></UL > </P ><P > Make sure both the user and the <SPAN CLASS="application" >Tomcat</SPAN > server have access to the <SPAN CLASS="application" >MMBase</SPAN > installation: <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="programlisting" > chown -R <user>:tomcat /home/<user>/mmbase/ </PRE ></FONT ></TD ></TR ></TABLE > </P ><P > Make sure that the directory <TT CLASS="filename" >/home/<TT CLASS="replaceable" ><I ><user></I ></TT >/mmbase/WEB-INF/config/builders/applications</TT > is writable and accessible by the servlet engine user (for auto-installing builders): <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="programlisting" > 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/ </PRE ></FONT ></TD ></TR ></TABLE > </P ><P > Now the home directory of this user has to be accessible to the <SPAN CLASS="application" >Tomcat</SPAN > server as well. You can change the group owner of the users home directory to the <SPAN CLASS="systemitem" >tomcat</SPAN > user group: <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="programlisting" > chown -g tomcat /home/<user>/ </PRE ></FONT ></TD ></TR ></TABLE > </P ><P > Or, if you don't want this, use the Access Control Lists (<SPAN CLASS="acronym" >ACL</SPAN >'s) to accomplish the same: <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="programlisting" > setfacl -m u:tomcat:r-x /home/<user>/ </PRE ></FONT ></TD ></TR ></TABLE > </P ><P > Finally, link the new <SPAN CLASS="application" >MMBase</SPAN > installation to the <SPAN CLASS="application" >Tomcat</SPAN > server: <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="programlisting" > ln -s /home/<user>/mmbase /usr/local/tomcat/webapps/mmbase-<user> </PRE ></FONT ></TD ></TR ></TABLE > </P ><P > and restart <SPAN CLASS="application" >Tomcat</SPAN >: <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="programlisting" > service tomcat restart </PRE ></FONT ></TD ></TR ></TABLE > </P ><P > which will make this users <SPAN CLASS="application" >MMBase</SPAN > installation available through: <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="programlisting" > http://<hostname>:8080/mmbase-<user>/ </PRE ></FONT ></TD ></TR ></TABLE > </P ><P > Again, you can set up a <SPAN CLASS="acronym" >JK 2</SPAN > mapping or a reverse proxy in <SPAN CLASS="application" >Apache</SPAN > like we did before. </P ><P > <DIV CLASS="important" ><P ></P ><TABLE CLASS="important" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="../images/important.gif" HSPACE="5" ALT="Important"></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > In order to run several instances of <SPAN CLASS="application" >MMBase</SPAN > on a single <SPAN CLASS="application" >Tomcat</SPAN > server, make sure you increase the available memory resources, i.e. by adding to the <TT CLASS="envar" >$CATALINA_OPTS</TT > environment variable in <TT CLASS="filename" >/etc/rc.d/init.d/tomcat</TT >: <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="programlisting" > -Xms64m -Xmx512m </PRE ></FONT ></TD ></TR ></TABLE > </P ></TD ></TR ></TABLE ></DIV > </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="x1037.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="x1141.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Installing an <SPAN CLASS="application" >Apache</SPAN > reverse proxy as a front-end to your <SPAN CLASS="application" >MMBase</SPAN > server</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Acknowledgements</TD ></TR ></TABLE ></DIV ></BODY ></HTML >