If you have a site developed in J2EE and deployed on apache tomcat or glassfish, then implementing a wordpress blog on your site would be challenging since wordpress is all PHP. In this article we show how to install wordpress on a J2EE server. In the previous article we saw how to install Quercus on apache tomcat. This is the first step in installation. If you have not done that already then that’s where you should start. Once you have installed quercus, follow the steps outlined below. Our tomcat installation is on /opt/server/ and the blog home (where Quercus is installed) is at [Apache_home]/webapps/blog/. The next steps are :
- Step 1: Download wordpress –
rm -f latest.zip
mv -f wordpress/* ./
This installs wordpress in the blog directory. Note that we have overridden the quercus index.php file. The next step is to configure wordpress. We will be using mysql. You will need to install mysql on the machine. Create a database called wordpress.
Step 2 – The next step is to configure wordpress. There should be a file called wp-config-sample.php in the blog directory. do this
cp wp-config-sample.php wp-config.php
open the wp-config.php file and add the database details (database, user, password and host)
- Download and copy the mysql connector and extract the jar in the /webapps/blog/WEB-INF/lib/ directory. This will be used by Quercus to connect to mysql.
- Step 3 : If you have not already done so, start the tomcat server. Go to http://yourserver/blog. Follow the instructions to install wordpress.
- Step 4: Look at this article to see how to remove index.php from the wordpress link