old-www/HOWTO/MMBase-Inst-HOWTO/x1064.html

590 lines
7.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>&#13;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
>&#13;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
>&#13;Install <SPAN
CLASS="application"
>MMBase</SPAN
>
in the home directory
of the user <TT
CLASS="replaceable"
><I
>&#60;user&#62;</I
></TT
>
performing all steps before:
<P
></P
><UL
COMPACT="COMPACT"
><LI
><P
>&#13;create a directory <TT
CLASS="filename"
>mmbase/</TT
>
in the users home directory,
</P
></LI
><LI
><P
>&#13;copy all <SPAN
CLASS="application"
>MMBase</SPAN
> files
into the directory
<TT
CLASS="filename"
>/home/<TT
CLASS="replaceable"
><I
>&#60;user&#62;</I
></TT
>/mmbase/</TT
>,
</P
></LI
><LI
><P
>&#13;build the directory structure and configuration files
in the very same way we did before,
</P
></LI
><LI
><P
>&#13;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
>&#13;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
>&#13;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
>&#13;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"
>&#13;
chown -R &#60;user&#62;:tomcat /home/&#60;user&#62;/mmbase/
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
><P
>&#13;Make sure that the directory
<TT
CLASS="filename"
>/home/<TT
CLASS="replaceable"
><I
>&#60;user&#62;</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"
>&#13;
chmod 770 /home/&#60;user&#62;/mmbase/WEB-INF/config/builders/applications
chmod 750 /home/&#60;user&#62;/mmbase/WEB-INF/config/builders/
chmod 750 /home/&#60;user&#62;/mmbase/WEB-INF/config/
chmod 750 /home/&#60;user&#62;/mmbase/WEB-INF/
chmod 750 /home/&#60;user&#62;/mmbase/
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
><P
>&#13;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"
>&#13;
chown -g tomcat /home/&#60;user&#62;/
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
><P
>&#13;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"
>&#13;
setfacl -m u:tomcat:r-x /home/&#60;user&#62;/
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
><P
>&#13;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"
>&#13;
ln -s /home/&#60;user&#62;/mmbase /usr/local/tomcat/webapps/mmbase-&#60;user&#62;
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
><P
>&#13;and restart <SPAN
CLASS="application"
>Tomcat</SPAN
>:
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;
service tomcat restart
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
><P
>&#13;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"
>&#13;
http://&#60;hostname&#62;:8080/mmbase-&#60;user&#62;/
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
><P
>&#13;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
>&#13;<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
>&#13;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"
>&#13;
-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"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Acknowledgements</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>