7. Installing MMBase

Download the binary distribution of MMBase from:

  http://www.mmbase.org/ --> download

Make sure you pick out the right version for the Java 2 JDK installed on your system. You can find out the version currently installed by typing:

  
  java -version
  
  

Extract the binary distribution of MMBase, copy it into the Tomcat directory, and change the ownership of the MMBase directory:

  
  unzip mmbase-xxx.zip
  cd /usr/local/tomcat/webapps/
  mkdir mmbase-webapp/
  cp -R .../mmbase-x.x.x/mmbase-webapp/* ./mmbase-webapp/
  chown -R tomcat:tomcat ./mmbase-webapp/
  
  

Replace the Tomcat Xerces libraries by those coming with MMBase:

  
  mv -i /usr/local/tomcat/common/endorsed/xercesImpl.jar ~/
  mv -i /usr/local/tomcat/common/endorsed/xmlParserAPIs.jar ~/
  cp /usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/lib/xalan.jar \
      /usr/local/tomcat/common/endorsed/
  chown tomcat:tomcat /usr/local/tomcat/common/endorsed/xalan.jar
  chmod 644 /usr/local/tomcat/common/endorsed/xalan.jar
  cp /usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/lib/xerces.jar \
      /usr/local/tomcat/common/endorsed/
  chown tomcat:tomcat /usr/local/tomcat/common/endorsed/xerces.jar
  chmod 644 /usr/local/tomcat/common/endorsed/xerces.jar
  cp /usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/lib/xml-apis.jar \
      /usr/local/tomcat/common/endorsed/
  chown tomcat:tomcat /usr/local/tomcat/common/endorsed/xml-apis.jar
  chmod 644 /usr/local/tomcat/common/endorsed/xml-apis.jar
  
  

Tip

If you will not be using an Apache JK 2 mapping or reverse proxy (see further below) as a front-end to your MMBase server, you can add to the file /usr/local/tomcat/conf/server.xml:

  
  <Context path="/mmbase" docBase="/usr/local/tomcat/webapps/mmbase-webapp" debug="0">
  <!-- if you want symlinks to work: -->
  <Resources className="org.apache.naming.resources.FileDirContext" allowLinking="true" />
  </Context>
  
  

This will allow you to access your MMBase server using (replace <hostname> with your hostname):

  
  http://<hostname>:8080/mmbase
  
  

instead of:

  
  http://<hostname>:8080/mmbase-webapp
  
  

Check if the ImageMagick convert tool is in your path:

  
  which convert
  
  

If not, add it to /usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/config/applications/Resources/builders/images.xml. For example:

  
  <property name="ImageConvert.ConverterCommand">/usr/bin/X11/convert</property>
  
  

Make sure that the directory /usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/config/builders/applications is writable by the servlet engine user (for auto-installing builders):

  
  chown tomcat:tomcat /usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/config/builders/applications
  chmod 775 /usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/config/builders/applications