diff --git a/LDP/howto/docbook/HOWTO-INDEX/appsSect.sgml b/LDP/howto/docbook/HOWTO-INDEX/appsSect.sgml index 70741740..246b3bbb 100644 --- a/LDP/howto/docbook/HOWTO-INDEX/appsSect.sgml +++ b/LDP/howto/docbook/HOWTO-INDEX/appsSect.sgml @@ -497,7 +497,7 @@ Describes how to set up MMBase on a Debian GNU/Linux (Woody) system. MMBase-Inst-HOWTO, MMBase Installation HOWTO -Updated: Feb 2004. +Updated: Jan 2005. Describes the installation of the MMBase content management system on a Red Hat Linux distribution, using the Tomcat application server, and integrating it with MySQL and Apache. diff --git a/LDP/howto/docbook/HOWTO-INDEX/howtoChap.sgml b/LDP/howto/docbook/HOWTO-INDEX/howtoChap.sgml index 186e921f..8094c27a 100644 --- a/LDP/howto/docbook/HOWTO-INDEX/howtoChap.sgml +++ b/LDP/howto/docbook/HOWTO-INDEX/howtoChap.sgml @@ -2898,7 +2898,7 @@ Describes how to set up MMBase on a Debian GNU/Linux (Woody) system. MMBase-Inst-HOWTO, MMBase Installation HOWTO -Updated: Feb 2004. +Updated: Jan 2005. Describes the installation of the MMBase content management system on a Red Hat Linux distribution, using the Tomcat application server, and integrating it with MySQL and Apache. diff --git a/LDP/howto/docbook/MMBase-Inst-HOWTO/MMBase-Inst-HOWTO.xml b/LDP/howto/docbook/MMBase-Inst-HOWTO/MMBase-Inst-HOWTO.xml index c4b12120..e7ae148a 100644 --- a/LDP/howto/docbook/MMBase-Inst-HOWTO/MMBase-Inst-HOWTO.xml +++ b/LDP/howto/docbook/MMBase-Inst-HOWTO/MMBase-Inst-HOWTO.xml @@ -38,12 +38,18 @@ - 2003, 2004 + 2003 - 2005 Adrian Offerman December 20, 2003 + + 0.3.2 + 2005-01-25 + AO + Updated. + 1.0 2004-02-02 @@ -76,7 +82,7 @@ and Apache. -Version: 0.2.5, February 28, 2004. +Version: 0.3.2, January 25, 2005. @@ -193,6 +199,52 @@ extensions. Java 2 Software Developers Kit (SDK) and Java 2 Run-time Engine (J2RE) +from Sun's Java 2 Platform Standard Edition 5.0 (J2SE) (version 1.5.0-01), + + + + +Apache Jakarta Tomcat 5.5.4, + + + + +ImageMagick 6.1.3-7, + + + + +MMBase 1.7.3 with various modules, + + + + +MySQL Connector/J 3.0.16-ga, + + + + +Jikes 1.22. + + + + +And before: + + + +Red Hat 8.0 distribution +running a 2.4.20 kernel, +with Alan Cox 2 +and +EA/ACL +extensions. + + + + +Java 2 Software Developers Kit (SDK) +and Java 2 Run-time Engine (J2RE) from the Blackdown Java 2 JDK version v1.4.1-01, @@ -213,7 +265,12 @@ from the Blackdown Java 2 JDK v -MySQL Connector/J 3.0.8. +MySQL Connector/J 3.0.8, + + + + +Jikes 1.18. @@ -245,6 +302,112 @@ on your server. Installing <application class="software">Java</application> + +Download the latest versions of the +Java 2 Development Kit +(JDK) or +Run-time Engine +(JRE), +and the accompanying documentation from: + + http://java.sun.com + + + + +Installation instructions and release notes for the +JDK and +JRE +are available at the download page. + + + +Make the binary distribution of the +JDK +executable +and extract in a new directory: + + + + + + +Install the JDK +documentation +by unzipping it in the +JDK directory: + + + + + + +Change the ownership of the +JDK directory +and make it available as +/usr/local/j2sdk/: + + + + + + +If you need only the +JRE, +the installation would be like this: + + + + + + + + +Using JDK +version 1.5.0 caused +our Tomcat server +to crash every now and then: + + + +Upgrading to version 1.5.0-01 seemed to solve these problems. + + + + + + + +For the (previously used) +BlackDown Java for Linux distribution: + + Find yourself a mirror for the BlackDown Java Development Kit @@ -321,11 +484,13 @@ Do the same for the ]]> + + Since we didn't install the JDK -and RE +and JRE in our path, we have to add the bin/ directories to our $PATH environment variable. @@ -375,7 +540,7 @@ by creating the file set path = ( /usr/local/j2re/bin $path ) endif setenv JAVA_HOME /usr/local/j2sdk - setenv CLASSPATH :/usr/local/j2sdk/lib/tools.jar:/usr/local/j2re/lib/rt.jar + setenv CLASSPATH .:/usr/local/j2sdk/lib/tools.jar:/usr/local/j2re/lib/rt.jar ]]> @@ -472,7 +637,7 @@ and /etc/group): You really should not use the root account to run the Tomcat daemon; -we found out that this allows the +(using Tomcat version 4.1.27) we found out that this allows the MMBase admin user to write backup dumps of his sites anywhere on the system. @@ -495,6 +660,8 @@ in a new directory: + + Version 4.1.27 came with a hot-fix: @@ -504,6 +671,8 @@ Version 4.1.27 came with a hot-fix: ]]> + + Change the ownership of the @@ -662,7 +831,7 @@ to do this for us: export JAVA_HOME=/usr/local/j2sdk export CLASSPATH=.:/usr/local/j2sdk/lib/tools.jar:/usr/local/j2re/lib/rt.jar export CATALINA_HOME=/usr/local/tomcat - export CATALINA_OPTS="-Dbuild.compiler.emacs=true" + export CATALINA_OPTS="-server -Xms64m -Xmx512m -Dbuild.compiler.emacs=true" export PATH=/usr/local/j2sdk/bin:/usr/local/j2re/bin:$PATH [ -f /usr/local/tomcat/bin/startup.sh ] || exit 0 @@ -729,6 +898,60 @@ And add this init script to + + + +To install two (or even more) versions of +Tomcat server +on the same system, +increase the port numbers +of the second server (e.g. by 10), +by editing the configuration file +/usr/local/tomcat55/conf/server.xml: + + + ... + + + ... + + + ... + + + ... + + + + ]]> + + + + +Complete this second +Tomcat server installation +as above for the first server, +using adjusted directory and file names. + + + + @@ -831,7 +1054,7 @@ by adding to Since entering the full path to Jikes in /usr/local/tomcat/conf/web.xml -doesn't seem to work, +doesn't seem to work (version 4.1.27), make the jikes program available in your path: Download the binary distribution of -MMBase +MMBase, +and the additional applications you need +(i.e. CloudContext Security, +Media, +Email) +(see the next section), from: - http://www.mmbase.org/ --> download + http://www.mmbase.org/ --> Download --> Releases + + + +MMBase version 1.7.2 +contained a nasty bug, +resulting in problems with the editwizards. +The 1.7.3 release includes a bugfix for this problem. + + + + Make sure you pick out the right version for the Java 2 JDK @@ -944,7 +1183,61 @@ and change the ownership of the -Replace the Tomcat + + +Installing MMBase version 1.7 +on Tomcat version 5 +resulted in version incompatibilities: + + + + + + +We had to disable +the RMMCI library +to get this installation up and running: + + + + + + + + +For MMBase version 1.7 +running on Tomcat version 5, +enable the Xerces libraries: + + + +Or you will have fatal errors like: + + + + + + +For MMBase version 1.6 +running on Tomcat version 4, +replace the Tomcat Xerces libraries by those coming with MMBase: @@ -1077,6 +1370,7 @@ to the MMBase @@ -1162,6 +1456,26 @@ and password (<password>) with the values you just entered in the JBDC driver configuration file. + + + +To quickly empty +your MySQL database, +i.e. after you've updated +your MMBase configuration or +application +(replace the database name <mmbase> with your +own): + + + mysqladmin -u root -p create + ]]> + + + + + @@ -1198,6 +1512,290 @@ by adding to the configuration file + + +Installing <application class="software">MMBase</application> +additional applications + + + +With the release of version 1.7 +MMBase +was reworked into a more modular structure. +The developers decided to take several modules +(i.e. CloudContext Security, +Media, +Email) +from the MMBase tree, +and make these available as separate entities. +However, at this moment +MMBase +doesn't have a module interface at all. +So, to use these additional applications, +the library and other files need to be placed into the installation tree +and the configuration needs to be added into the existing configuration files +by hand. + + + + +Installing +the <application class="software">CloudContext Security</application> module + + + +>From the MMBase website +(www.mmbase.org): +
+ +Cloud security +uses the object mmbaseuser +to store information used for authorisation and authentication of users. +The two main advantages of this security implementation are +that the user administration can be carried out by using a webbrowser +(instead of editing a file on the filesystem) and +that the users of your +MMBase installation +are available as objects in the cloud. +For instance, it is possible to create groups of users, +which are allowed to carry out certain tasks. + + +A context exists of a set of rights +which describe what you can do within this context +with an object of +MMBase. +For example you define read access to a the context +which is used by anonymous visitors of your site and +you can define a context with edit rights for registered users of your site. + + +
+
+ + +Move the library and other files of +the CloudContext Security module +into the MMBase installation tree: + + + + + + +Save the documentation files for later reference: + + + + + + +Make sure all these new files are owned by +your tomcat user as well: + + + + + + +Disable the existing configuration +in the security configuration file +/usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/config/security/security.xml: + + + --> + ... + + ]]> + + + + +And add +(from web-app/WEB-INF/config/security/security.xml): + + + + + ]]> + + + + + + +Make sure to include the configuration above before +the <sharedsecret> statement, +or you will get an error like this: + + + + + + + +
+ + + +Installing +the <application class="software">Media</application> module + + + +<TODO> + + + + + + +Installing +the <application class="software">Email</application> module + + + +The Email module +makes it possible to send email +with MMBase, +using either SendMail +or JMSendMail. + + + +Move the library and other files of +the Email module +into the MMBase installation tree: + + + + + + +Save the documentation files for later reference: + + + + + + +Make sure all these new files are owned by +your tomcat user as well: + + + + + + +Edit the email configuration file +/usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/config/modules/sendmail.xml +(from web-app/WEB-INF/config/modules/sendmail.xml): + + active + ... + org.mmbase.applications.email.SendMail + ... + ]]> + + + + +Add to Tomcat's +root Context +(in /usr/local/tomcat/conf/context.xml for Tomcat version 5, +in /usr/local/tomcat/conf/server.xml for Tomcat version 4) +(replace <smtp.domain.tld> with the adres of your +SMTP server): + + + + + mail.smtp.host + smtp.domain.tld + + + + ]]> + + + + +Failing to do this, results in a fatal error: + + + + + + + + +Installing the Email module +in MMBase version 1.7 +running on Tomcat version 5 +resulted in a fatal error: + + + + + + + + + +
+ + Configuring initial @@ -1292,6 +1890,20 @@ by editing </tip> </para> +<para> +<tip> +<para> +You can set the <acronym>SMTP</acronym> gateway by editing +<filename>/usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/config/modules/sendmail.xml</filename>: +<programlisting> + <![CDATA[ + <property name="mailhost">localhost</property> + ]]> + </programlisting> +</para> +</tip> +</para> + </sect1> @@ -1338,6 +1950,16 @@ you just set in the security configuration file <filename>/usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/config/security/context/config.xml</filename>. </para> +<para> +<application class="software">MMBase</application> users +(i.e. front-end developers) will typically add their web files to +the <filename>/usr/local/tomcat/webapps/mmbase-webapp/</filename> directory. +Applications (defining the content) will be placed in +the +<filename>/usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/config/applications/</filename> +directory. +</para> + <para> <caution> <para> @@ -1354,7 +1976,7 @@ Make sure the dimensions of your <tip> <para> Shutting down (or restarting) the -<application class="software">Tomcat</application> server +<application class="software">Tomcat</application> server (version 1.6) in our case always left a last process running. If you experience this same problem, kill the process by hand before starting it up again: @@ -1362,7 +1984,7 @@ kill the process by hand before starting it up again: <![CDATA[ [root@hostname root]# /etc/rc.d/init.d/tomcat stop [root@hostname root]# ps -ax |grep j2 - 24535 ? S 4:12 /usr/local/j2sdk/bin/java -Dbuild.compiler.emacs=true ... + 24535 ? S 4:12 /usr/local/j2sdk/bin/java -server -Xms64m -Xmx512m-Dbuild.compiler.emacs=true ... [root@hostname root]# kill 24535 [root@hostname root]# /etc/rc.d/init.d/tomcat start [root@hostname root]# @@ -1516,7 +2138,7 @@ described in the next section. However, if you plan to build or grow to a farm of several <application class="software">Tomcat</application> servers behind an <application class="software">Apache</application> front-end -or build a high-performance system +or build a high-performance system, deploying the <systemitem class="library"><acronym>JK 2</acronym> Connector</systemitem> is the way to go. @@ -1643,7 +2265,7 @@ Here is a simple configuration that should get you up and running: <para> Most of this configuration is pretty standard. The last <classname>uri</classname> declaration -(replace <hostname> with your hostname) +(replace <replaceable><hostname></replaceable> with your hostname) is what this is all about; it maps all client requests starting with <filename class="directory">/mmbase-webapp/</filename> @@ -1671,7 +2293,7 @@ implements name based virtual hosts? <para> So now, the same application you accessed through <application class="software">Tomcat</application> as -(replace <hostname> with your hostname): +(replace <replaceable><hostname></replaceable> with your hostname): <programlisting> <![CDATA[ http://<hostname>:8080/mmbase-webapp/ @@ -1696,7 +2318,7 @@ Only name based virtual hosts are supported this way. Make sure you add the virtual host name (pointing to this very same (web) server) to the <filename>/etc/hosts</filename> file -(replace <hostname> with your hostname): +(replace <replaceable><hostname></replaceable> with your hostname): <programlisting> <![CDATA[ 192.168.3.17 <hostname> @@ -1788,7 +2410,7 @@ configuration directory <para> you can now restart <application class="software">Apache</application> and give your new entrance a try: -(replace <hostname> with your hostname): +(replace <replaceable><hostname></replaceable> with your hostname): <programlisting> <![CDATA[ http://<hostname>/mmbase-webapp/ @@ -1799,7 +2421,7 @@ and give your new entrance a try: <para> To check the status of the <systemitem class="library"><acronym>JK 2</acronym> Connector</systemitem> -(replace <hostname> with your hostname): +(replace <replaceable><hostname></replaceable> with your hostname): <programlisting> <![CDATA[ http://<hostname>/jkstatus/ @@ -1817,7 +2439,7 @@ This allows you to add new mappings without restarting <application class="software">Apache</application> or having it reload its configuration. However, existing mappings can not be removed this way -and require <application class="software">Apache</application> te reconfigure. +and require <application class="software">Apache</application> to reconfigure. </para> <para> @@ -2030,13 +2652,31 @@ and your <application class="software">MMBase</application> server as </programlisting> </para> +<para> +<caution> +<para> +Our MMBase version 1.7 installation used +absolute directory paths in the web pages it generated. +In order to get the reverse proxies to work properly, +the Apache proxy paths had to be the same +(replace <replaceable><hostname></replaceable> with your hostname): +<programlisting> + <![CDATA[ + ProxyPass /mmbase-webapp/ http://<hostname>:8080/mmbase-webapp/ + ProxyPassReverse /mmbase-webapp/ http://<hostname>:8080/mmbase-webapp/ + ]]> + </programlisting> +</para> +</caution> +</para> + </sect1> <sect1> <title> Installing more <application class="software">MMBase</application> servers -under the same <application class="software">Tomcat</application> server +on a single <application class="software">Tomcat</application> server @@ -2047,7 +2687,7 @@ to make MMBase available to more or all of your users, you can create several MMBase installations -and have these all run under the same +and have these all run on the same Tomcat server. @@ -2078,6 +2718,15 @@ 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 @@ -2186,6 +2835,24 @@ 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: + + + + + + + @@ -2229,7 +2896,27 @@ The Netherlands. -Version 0.2.5, February 28, 2004: Creative Commons copyright license adjusted, +Version 0.3.2, January 25, 2005: MMBase 1.7.3, Java 1.5.0-01, + + + + +version 0.3.1, December 26, 2004: Email module, + + + + +version 0.3.0, December 25, 2004: MMBase 1.7.2, Tomcat 5.5.4, Java 1.5.0, MySQL Connector/J 3.0.16-ga, Jikes 1.22, + + + + +version 0.2.6, July 27, 2004: minor additions, + + + + +version 0.2.5, February 28, 2004: Creative Commons copyright license adjusted, @@ -2290,16 +2977,16 @@ as endorsements of, nor commercials for, the manufacturer. Copyright -Compiled, Copyright 2003, 2004, by +Compiled, Copyright © 2003 - 2005, by Adrian Offerman. - This document is licensed under the -Creative Commons Attribution-ShareAlike copyright license. +Creative Commons Attribution-ShareAlike copyright license. @@ -2320,4 +3007,3 @@ Your fair use and other rights are in no way affected by the above. -