Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I deploy a Java War archive/web application into a server that uses the latest version of Cpanel control panel? The server has Cent OS 6.2 OS.

share|improve this question

closed as off-topic by HopelessN00b Jan 13 '15 at 23:51

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

Is the tomcat server deployed from WHM? – Wesley Apr 24 '12 at 6:43
@WesleyDavid - I used EasyApache to install Tomcat from within WHM... – Arvind Apr 25 '12 at 8:52
This question appears to be off-topic because it is about working with a service provider's management interface, such as cPanel. – HopelessN00b Jan 13 '15 at 23:51

Update: i might have misunderstood your request, if you don't have any Java Application server, then you can install tomcat using the following commands as root at an ssh/telnet console;

# install tomcat6 and httpd
yum -y install tomcat6 java-1.6.0-openjdk httpd mysql-connector-java

that command will install a lot of dependencies, but importantly it sets up tomcat and httpd as services, which can be started like so;

service httpd start
service tomcat6 start

and to add to be started automatically every reboot;

chkconfig tomcat6 on
chkconfig httpd on

You can setup SSH from cpanel folowing these instructions; -

or this tutorial; -

So assuming that either you have tomcat or that the Java application server supports some form of auto-deployment, then you should copy the war file to the appropriate directory;

1) tomcat auto-deploy folder under CentOS is


2) glassfish supports auto-deployment under the auto-deploy folder under domain1;


You should be able to copy the file from your local machine to these folders using the cpanel File Manager.

If you do not have a war file, then the alternative is to create context fragment into the /usr/share/tomcat6/conf/Catalina/localhost/ folder like this post describes;

Both glassfish and tomcat also support their own manager interfaces via the various admin tools (which you almost certainly want to configure eventually, in order to effectively manage these apps) which you can alternatively use to deploy WAR archives remotely.

However be aware that securing tomcat manager is important, as its easy to leave open with silly easy password etc.

share|improve this answer
I have Tomcat already installed using EasyApache in cpanel- are your instructions applicable still in my case? Thanks... – Arvind Apr 26 '12 at 5:29
from what I understood, EasyApache installs Apache web server and PHP, but not apache tomcat. You might need to run the above commands to find out. If you can get a shell login try rpm -qa | grep tomcat6 – Tom H Apr 26 '12 at 7:36
ok, i did install tomcat using whm, and now i can see under "Restart Services" in WHM, an option for "Restart Tomcat Servlet Server"... so tomcat is installed... – Arvind Apr 26 '12 at 9:36
right, so using the cpanel File manager, look for the folder /var/lib/tomcat6/webapps and then copy your war file into that. – Tom H Apr 26 '12 at 9:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.