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 –
cd /opt/server/apache-tomcat-8.0.9/webapps/blog/
wget http://wordpress.org/latest.zip
unzip latest.zip
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
Hi,
I was successfully able to install Quercus but unfortunately I am not able to configure WordPress database details.
I have copied the my-sql-connector jar file into /blob/WEB-INF/lib directory.
And when I run try to configure the database details, it always throws me an error like
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at xxxxxxx.rds.amazonaws.com:3306. This could mean your host’s database server is down.
Note: I have set up the database as an RDS instance from AWS.
Is there anything I am missing here?
Your help is greatly appreciated.
Did you find the solution for this problem yet !! I am facing the same issue..