How to extract a .war file

If your hosting provider supports Tomcat, but not .war files, then you can extract .war file in your public_html folder to run your Tomcat application from there.

jar xvf file-name.war

How to Setup Reseller Private Nameservers in WHM

First we need to register the name servers before we set them up on the server.
Resellers can also have their own private name servers for their own clients making the server provider more anonymous.

Login to your WHM account as root.
Click on Reseller Center on the left hand side.
Under Edit Reseller Privileges/Nameservers, select the reseller account you want to provide with private name servers.
Scroll down to the very bottom of the page until you see: Primary Nameserver.

In the Primary Nameserver field enter the primary nameserver.
Click “Assign IP Address”
Click “Add an A Entry for this nameserver”
In the Secondary Nameserver field enter the secondary.
Click Save

mod_flvx FLV Progressive download streaming for Apache 2

If you are using cpanel server you should have already installed Apache. Make sure that you have apache 2.2 version on the server or else you might have errors during compiling mod_flv.

Download mod_flvx.c from http://github.com/osantana/mod_flvx

cd /usr/src

wget http://github.com/osantana/mod_flvx/blob/master/mod_flvx.c

Compile and install module:

/usr/local/apache/bin/apxs -i -a -c mod_flvx.c

Add the following handler in /usr/local/apache/conf/httpd.conf

AddHandler flv-stream .flv

Reload configuration:

service httpd restart

or

kill -1 `cat /usr/local/apache2/logs/httpd.pid`

How to upgrade Mysql on Plesk with CentOS Linux

The procedure for upgrade of Mysql is quite simple.

wget -q -O – http://www.atomicorp.com/installers/atomic.sh | sh

How to upgrade:

yum –enablerepo=atomic-testing upgrade mysql

–enablerepo=repoidglob
Enables specific repositories by id or glob that have been disabled in the configuration file using the enabled=0 option.

To upgrade php run ‘yum upgrade php

With the above methods mysql will be upgraded to latest release.

Sometimes we may see the mysql database size as zero in cPanel

This can be fixed as follows: SSH to the server as root and edit the cpanel.config file

vi /var/cpanel/cpanel.config

search for

disk_usage_include_sqldbs=0

and then make change to

disk_usage_include_sqldbs=1

If the parameter is not present, add it. Save the file and execute the following command:

/scripts/update_db_cache

This may take few minutes to get fixed if you have a large number of users with databases, but once done, we should be able see the database disk usage show up accurately in cPanel.

« Prev - Next »