I want to share a possible configuration and environment setup for developers who want to work with the open source WCM Jahia 6.5 and MySQL database. The main idea is to configure Jahia 6.5 Beta Community Edition on a windows machine and integrate it with MySQL database. Additionally, I am going to use a separate instance of Tomcat in order to not use the embedded Tomcat that Jahia offers.
The first step is to install Apache Tomcat separately or you can use the embedded tomcat that Jahia includes. For now I am going to use Tomcat 6.0.30.
For the second step we need to install a MySQL database for our purposes instead of using the default Derby Database embedded with Jahia. In my case I am going to use MySQL 5.0.51a-community-nt. After installing MySQL, you need to create a database and name it “jahia”.
The next step that we need to perform is to install Jahia 6.5-Beta. In my case I am using a windows machine, and I’m using the installer .exe for windows distributions. Follow the wizard:
- On the first screen click on next.
- Accept the conditions terms, next.
- Choose a location for the installation; remember that you cannot use a path in which directories name’s contain spaces. In my case I used C:\jahia65mysql.
- Select custom installation.
- Uncheck Apache Tomcat.
- Choose a Server type, in my case Apache Tomcat 6.0.X.
- Choose Stand Alone DBMS, next.
- Choose MySQL 5.x.
- Fill the Database details form.
- Fill the root user form.
- Configure your mail server (optionally).
- Check the installation information, and click Next.
- Installation starts.
After completing the installation wizard, in the installation dir you are going to have a structure similar to:
C:\<installation Jahia dir>/bin/
C:\<installation Jahia dir>/logs/
C:\<installation Jahia dir>/docs/
C:\<installation Jahia dir>/licenses/
C:\<installation Jahia dir>/How-to-install.html
C:\<installation Jahia dir>/shared-libraries.zip/
C:\<installation Jahia dir>/icons/
C:\<installation Jahia dir>/Uninstaller/
C:\<installation Jahia dir>/ROOT.war
Now, we need to deploy the war into Tomcat. In my case I installed Tomcat in the same directory where Jahia is located - C:\<installation Jahia dir>/tomcat. The following are the steps that you need to perform:
- Stop Tomcat. The start and stop bats for Tomcat are located on \tomcat\bin\ startup.bat and \tomcat\bin shutdown.bat.
- Delete the root folder located on \tomcat\webapps\ROOT and put the war on \tomcat\webapps\ROOT.war
- Update the file \tomcat\bin\ catalina.bat, you need to add the line: set CATALINA_OPTS=%CATALINA_OPTS% -Dsun.io.useCanonCaches=false -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -server -Dhibernate.jdbc.use_streams_for_binary=true -verbose:gc
- Uncompress the file C:\<installation Jahia dir>/shared-libraries.zip/ and put the jar files into /tomcat/lib.
- Start Tomcat and enjoy Jahia 6.5 Beta!