How to Create Tomcat Service Daemon in CPanel Server

If you want to create a  Service Daemon for Tomcat  then follow the below steps 😕

[email protected][#] vi /etc/rc.d/init.d/tomcat

Add the below code

#!/bin/sh

JAVA_HOME=/usr/local/jdk; export JAVA_HOME

TOMCAT_HOME=/usr/local/jakarta/tomcat; export TOMCAT_HOME

$TOMCAT_HOME/bin/catalina.sh $*

Then

[email protected][#] chmod 755 /etc/rc.d/init.d/tomcat

That’s all now you can start and stop tomcat as :

To Start Tomcat :

[email protected][#] /etc/init.d/tomcat start

To Stop Tomcat :

[email protected][#] /etc/init.d/tomcat stop

That’s all you are done.

How to enable .zip file import in PHPMyAdmin

If you have cPanel server and you are not able to import .zip file in PHPMyAdmin then just  make the below changes :

[email protected][#] vi /var/cpanel/easy/apache/profile/makecpphp.profile.yaml

Search for following line

Cpanel::Easy::PHP5::Zip: 0=0

Change it to

Cpanel::Easy::PHP5::Zip: 1

Save the file  and run the command

[email protected][#] /scripts/makecpphp

That’s all  you are done.

Mysql Database size shows ‘0’ in cPanel

In cPanel >> mysql databases , it shows database size as 0 even if it is not.

You just need to make  the below changes to fix  it :

[email protected] [#] vi   var/cpanel/cpanel.config
and search for following line.

disk_usage_include_sqldbs=0 ( set it to 1 instead of 0 )

then just run the command

[email protected][#] /scripts/update_db_cache

That’s  all you are done.