Tuesday, December 11, 2007

Munin not showing graphs

Fix for Munin installed by cPanel/WHM

  1. Determine where is mysqladmin program located with the one of the following command:

    which mysqladmin
    type mysqladmin
    locate mysqladmin

    If should return a path to mysqladmin which looks similar or the same to /usr/bin/mysqladmin.

  2. Edit the /etc/munin/plugin-conf.d/cpanel.conf Munin configuration file, and modify the [mysql*] to look like below:

    user root
    group wheel
    env.mysqladmin /usr/bin/mysqladmin
    env.mysqlopts --defaults-extra-file=/root/.my.cnf

    Ensure the env.mysqladmin value is path returned by step above. Also ensure that /root/.my.cnf contains correct root password to the MySQL databases.

  3. Then restart Munin service:

    /etc/init.d/munin-node restart

  4. Wait a while for MySQL statistics to be gathered, and check the graphs again.

Tuesday, October 23, 2007

PHPMyadmin Error

#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

Do a mysql.sock symlink to /tmp

ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

and restart mysql

Issue should be fixed.


Monday, July 2, 2007

Not able to see email accounts ?

Not able to see email accounts from your cpanel ?

Check the permission of /home/user/etc and /home/user/mail

For etc it should be user.mail and for mail it should be user.user

Now you will be able to see all the email accounts.

Ninad S

Tuesday, June 26, 2007

Front Page extensions not working in plesk

Microsoft discontinued FP and Plesk is no longer supporting it.
MS is not allowing any distributing of FP extensions.

FP will not work on new installs of Plesk 8.1 and anything above Fedora Core 3

For more details please have a look at http://forum.swsoft.com/printthread.php?threadid=39097

Ninad S

Wednesday, June 20, 2007

How to Disable DrWeb notification e-mails on Plesk

To Disable DrWeb notification e-mails

“%plesk_dir%\mysql\bin\mysql” -uadmin -padmin_password -P8306 psa

First, make sure that record responsible for antivirus notification exists in table psa.misc. You can check it using this query:

select val from misc where param = ‘AntivirusNotifyAdmin’;

This query should return a value: 0 or 1.

0 - notifications are disabled; 1 - notifications are enabled;

To switch this value you can use these queries:

update misc set val=’0’ where param = ‘AntivirusNotifyAdmin’; - to disable notifications update misc set val=’1’ where param = ‘AntivirusNotifyAdmin’; - to enable notifications

If there was no result returned you need to insert this record into table misc using this query:

insert into misc values (’AntivirusNotifyAdmin’,’0’);

Then you will be able to control notifications sending.

Notice: ‘AntivirusNotifyAdmin’ parameter that controls notifications for Plesk administrator. If it’s necessary to disable/enable notifications for clients you can use the following parameters instead of ‘AntivirusNotifyAdmin’:

‘AntivirusNotifySender’ - for e-mail sender ‘AntivirusNotifyRecipients’ - for e-mail recipient

Ninad S

Tuesday, June 19, 2007

Parse error when viewing web site created by Site Studio

If you receive a parse error when viewing your site in a web browser, this is because your web site coded incorrectly.

Parse errors are displayed when the web server can not read and display your web site code. The common cause of this is that you have copied and pasted code from another program into Site Studio, such as Microsoft Office that is not properly formatted. For example: Microsoft Office does not produce HTML code to industry standards and includes lots of non-standard code.

The solution is to remove the custom code you have inserted into Site Studio and insert plain text only. Once you have made the changes, republish the web site and your site should display correctly.


Ninad S

How to set up additional FTP user and give them limited access to a directory to upload in plesk

You can do this using the following steps :

login to plesk

Click on domain name--click on webusers and add a webuser.

Add this webuser by the name of directory to which you need the webuser to upload since when you add webuser a directory gets created by its name and user can upload to this directory with webuser name and password and only has access to that directory

Ninad S

Thursday, June 14, 2007

WHM not working after upgrading to cpanel 11

We all know that lot of the things dont work in cpanel 11

Recently I upgraded cpanel to version11 and the problem started. I was not able to login to whm, all mails stop working etc.

I checked the server and found that perl version was 5.8.7

To upgrade cpanel 11 you need perl 5.8.8

1) Make sure you're running Perl 5.8.8:

a) check perl -v to make sure it says 5.8.8

b) if you see 5.8.7 or something else, follow these steps:

1) wget http://layer1.cpanel.net/perl588installer.tar.gz
2) tar xfvz perl588installer.tar.gz
3) cd perl588installer
4) ./install
5) /usr/local/cpanel/bin/checkperlmodules

2) Upgrade YAML::Syck and File::Copy::Recurisve:
1) /scripts/realperlinstaller YAML::Syck
2) /scripts/realperlinstaller File::Copy::Recurisve

Issue was resolved :)

Ninad S

Wednesday, June 6, 2007

Getting following error while restarting the cpanel service on server.

-bash-# service cpanel restart
Stopping cPanel services: [ OK ]
Stopping pop3 services: [ OK ]
Stopping cPanel log services: [FAILED]
Stopping cPanel Chat services: [ OK ]
Stopping Melange Chat services: [FAILED]
Stopping InterChange services: [FAILED]
Stopping cPanel ssl services: [ OK ]

Stopping mailman services: Shutting down Mailman’s master qrunner

Starting eximstats: [ OK ]
Starting cPanel services: [ OK ]
Starting cPanel Log services: /usr/bin/perl: symbol lookup error: /usr/local/cpanel/3rdparty/lib/perl/auto/RRDs/RRDs.so: undefined symbol: Perl_Gthr_key_ptr
/usr/bin/perl: symbol lookup error: /usr/local/cpanel/3rdparty/lib/perl/auto/RRDs/RRDs.so: undefined symbol: Perl_Gthr_key_ptr
Starting pop3 services: [ OK ]
Starting cPanel Chat services: [ OK ]
Starting Melange Chat services:
Starting cPanel ssl services: [FAILED]
Starting mailman services: Starting Mailman’s master qrunner.

Solution : >>

1. rm -rf /usr/local/cpanel/3rdparty/bin/rrdtool

2. /scripts/rrdtoolinstall

3. restart cpanel service

That resolve your issue.


Ninad S

Create my own error pages?

To make your own error pages download templates that are initally placed in the root of /public_html/ directory.


These are the files that you will need to edit. Simply FTP these down to your home computer and then edit them with a HTML editor.

The varibles that you can insert can be found in those above documents and also in the control panel. If you look in the custom error page part then you can view the codes.

Once edited, place them in the /cpanel3-skel/public_html/ directory. You can also include a holding page (call it index.html) like the one we use.
When you then create an account with Web host manager it will automatically put these files into the newly created accounts directory.

Ninad S

Unrouteable Email error

While sending emails from your email address and you get the error Unrouteable address with RCPT reject. That means the problem at receivers end.

Check the following things.

1. Check the domains entry is available in userdoamins.

2. Check the domains entry is is available in localdomain

3. check the domain must having catchall address set if not then set
vi /etc/valiases/domain.com

*: username

4. also make sure that the mail folder having ownership user:mail

5. restart exim services once.


Ninad S

Saturday, June 2, 2007

Where to check account logs (cpanel)

cat /var/cpanel/accounting.log | grep domain

Ninad S

To view suspended account from shell (cpanel)

cd /var/cpanel/suspended
see the user which is suspended and the reason

Ninad S

Enable GET command

To give GET command
usermod -G get-users ninad

where ninad is username

Ninad S

To see the time of IP Access

Give below command to find out time of IP Access

cat access_log | domain name | grep 21/dec

Ninad S

Squirrel mail session error in global file

If you are getting squirrel mail session error in global file.
insert ob_start();
then remove the session from /tmp folder by rm command

If this doesnt work then post your comments ;)

Ninad S

VPS Functions

To create and start a VPs, run the following commands:

[server-node]# vzctl create VEID --ostemplate osname
[server-node]# vzctl set VEID --ipadd b.c.d.e --save
[server-node]# vzctl start VEID

Here VEID is the numeric ID for the VPS; osname is the name of the OS template for the VPS, and b.c.d.e is the IP address to be assigned to the VE.

For example:
[server-node]# vzctl create 102 --ostemplate centos-4-minimal
[server-node]# vzctl set 102 --ipadd b.c.d.e --save
[server-node]# vzctl start 102

Your new VPs should be up and running now. You can see its processes:
[server-node]# vzctl exec VEID ps ax

To enter VPS give the following command:
[server-node]# vzctl enter VEID
entered into VPS VEID

To exit from VPS, just type exit and press enter:
[ve]# exit
exited from VPS VEID


To stop VPs:

[server-node]# vzctl stop VEID
Stopping VPS ...
VPS was stopped
VPS is unmounted

To destroy VPs:
[server-node]# vzctl destroy VEID
Destroying VPS private area: /vz/private/VEID
VPS private area was destroyed

Ninad S

Thursday, May 24, 2007

Installing IonCube Loader

1. Download the program and store it on your server using wget or FTP.


2. Unpack the program
tar -zxvf ioncube_loaders.tar.gz

3. cd ioncube

4. copy ioncube-install-assistant.php to a web directory such as your hosting directory and open it in your browser window.
cp ioncube-install-assistant.php /home/userdirectoryhere/www

5. Now lets move the iconcube directory to a permanent location:

cd ..
mv ioncube /usr/local

6. Now that you know the location of php.ini you need to edit it.
pico /usr/local/lib/php.ini

Now find where other zend extentions are in the file.
ctrl + w: zend_extension

Paste in your new line for ioncube loader
zend_extension = /usr/local/ioncube/ioncube_loader_lin_4.3.so

(NOTE) Check php version if it is 5.2 then entry should be ioncube_loader_lin_5.2.so

7. Save the changes
ctrl + X then Y and enter

8. Restart the web server to take effect.
/etc/init.d/httpd restart

Ninad S

Tuesday, May 22, 2007

What is RAID (Redundant Array of Independent Disks)?

RAID is a type of disk, where several physical disks are combined into an array for better speed and fault tolerance. RAID 0 implements data striping where file blocks are written to separate drives. RAID 0 does not provide fault tolerance, because failure of one drive will result in data loss. RAID 1 implements data mirroring. Data is duplicated on two drives either through software or hardware. It provides faster read performance than a single drive.

Ninad S

Monday, May 21, 2007

Cron to delete mails from Inbox

Here is the syntax for deleting all email in the inbox of the default email address for a website:

echo -n > /home/youraccount/mail/inbox

Ninad S

Send Email from a PHP Script Using SMTP Authentication

To connect to an outgoing SMTP server from a PHP script using SMTP authentication and send an email:

Adapt the example below for your needs. Make sure you change the following variables at least:
* from: the email address from which you want the message to be sent.
* to: the recipient's email address and name.
* host: your outgoing SMTP server name.
* username: the SMTP user name (typically the same as the user name used to retrieve mail).
* password: the password for SMTP authentication.
require_once "Mail.php";

$from = "Bill Sender ";
$to = "Ninad Recipient ";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";

$host = "mail.example.com";
$username = "smtp_username";
$password = "smtp_password";

$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));

$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail)) {

" . $mail->getMessage() . "

} else {

Message successfully sent!

Ninad S

Saturday, May 19, 2007

Google AdSense Account Disabled

Hello Ninad Shirgaonkar,

It has come to our attention that invalid clicks and/or impressions
have been generated on the Google ads on your site(s). We have
therefore disabled your Google AdSense account. Please understand that
this was a necessary step to protect the interests of AdWords

As you may know, a publisher's site may not have invalid clicks or
impressions on any ad(s), including but not limited to clicks and/or
impressions generated by:

- a publisher on his own web pages
- a publisher encouraging others to click on his ads
- automated clicking or surfing programs, or any other deceptive
- a publisher altering any portion of the ad code or changing the
layout, behavior, targeting, or delivery of ads for any reason

These or any other such activities that violate Google AdSense Terms
and Conditions and program polices may have led us to disable your
account. The Terms and Conditions and program polices can be viewed at:


If you have any questions about invalid activity or the action taken on
your account, please do not reply to this email. You can find more
information by visiting


The Google AdSense Team

How to increase file limit

Get current limit:

ulimit -n

cat /proc/sys/fs/file-nr

The default limit is 1024.

Get current number of open file descriptors:

lsof [-p pid] | wc -l

Increase the limit:

Edit /etc/security/limits.conf:

username hard nofile 32768


Ninad S

Friday, May 11, 2007

Postfix + ClamAV + MailScanner in OpenSuse 10.2

1) Install the anti virus software (Clamav) –> (here) http://rpm.pbone.net/
rpm -ivh clamav-db-0.88.2-1.i386.rpm
rpm -ivh clamav-devel-0.88.2-1.i386.rpm
rpm -ivh clamav-server-0.88.2-1.i386.rpm
rpm -ivh clamav-0.88.2-1.i386.rpm

/etc/init.d/clamd start

2. Once the anti-virus is install then we need to install the MailScanner software the RPM along with the source files can be found at

Now get ready to install the mailscanner, this is going to take a long time.

gzip -d MailScanner-4.46.2-2.rpm.tar.gz
tar -xvf MailScanner-4.46.2-2.rpm.tar
cd MailScanner-4.46.2-2

3. In your MailScanner.conf file in /etc/MailScanner, there are 5 settings you need to change. The settings are:

Run As User = postfix
Run As Group = postfix
Incoming Queue Dir = /var/spool/postfix/hold
Outgoing Queue Dir = /var/spool/postfix/incoming
MTA = postfix

4. You will need to ensure that the user “postfix” can write to

/var/spool/MailScanner/incoming and /var/spool/MailScanner/quarantine

chown postfix:postfix /var/spool/MailScanner/incoming
chown postfix:postfix /var/spool/MailScanner/quarantine

5. Edit file MailScanner.conf
Virus Scanners = clamav

6. Edit virus.scanners.conf
clamav /usr/lib/MailScanner/clamav-wrapper /var/lib/clamav

7. Now we need to edit the postfix main.cf file, go all the way to the bottom of the file and add the following
header_checks = regexp:/etc/postfix/header_checks

8. In the file /etc/postfix/header_checks add this line:
/^Received:/ HOLD

9. Set the servers to run on startup and then start them

chkconfig MailScanner on
chkconfig postfix on
chkconfig clamd on

/etc/init.d/Mailscanner start
/etc/init.d/postfix start
/etc/init.d/clamd start


Ninad S

How To use Yum

  • To seach for a application

Yum will search all your enabled repos and tell you where you can obtain the package from

yum search application_name
  • Yum can list all available packages from your enabled repos and tell you where you can obtain the package from:
yum list available
  • To find out more info about some package
yum info application_name
  • Installing applications

Inastalling is as easy as

yum install application_name
  • Listing rpms

yum can list installed rpms for you from the repos you have enabled

yum list extras
  • Removing rpms

Yum can remove a application and the dependenciesit installed with tat application. it will not remove depenencies if another application installed needs them.

yum remove application_name
  • Updating the system

Yum can update the system for you with out user interact if you want it to.

yum update
  • Not sure if you have upates?
yum check-update
  • Local install

downloaded a rpm and cannot install it with rpm because of dependencies?

yum localinstall /path/to/the/rpm


Ninad S

Thursday, May 10, 2007

To view the .html first instead of .php

Add the code in .htaceess as DirectoryIndex index.html

Ninad S

To turn off register globals for a particular user.

Put the code in .htaccess
php_flag register_globals off


Ninad S

How to Set wildcard DNS

Edit the httpd.conf and add the line in virtual host of domain.

ServerAlias *.domain.com www.*.domain.com

restart httpd/apache service.

Now edit the DNS file or db file of domain and add the line as

*.domain.com. 14400 IN A IP of server
www.*.domain.com. 14400 IN A IP of server

restart named service


Ninad S

Find out what messages are waiting for delivery?

To list the number of messages, use:

exim -bpc

To list all the messages in the queue, use:

exim -bp

To get a summary of all the messages waiting for delivery, use:

exim -bp|exiqsumm -c

This will produce a summary of all messages, listed in order of quantity to each destination (domain).


Ninad S

Nagios Installation and Configuration

You can use the following steps to install and configure Nagios.

Create the base directory where you would like to install Nagios.
mkdir /usr/local/nagios

Add a new user (and group) to your system.
adduser nagios

Download Nagois 1.0.
wget http://internap.dl.sourceforge.net/sourceforge/nagios/nagios-1.0.tar.gz
tar -zxvf nagios-1.0.tar.gz
cd nagios-1.0

Run the configure script.
./configure –prefix=/usr/local/nagios –with-cgiurl=/nagios/cgi-bin
–with-htmurl=/nagios/ –with-nagios-user=nagios –with-nagios-grp=nagios

Compile Nagios and the CGIs.
make all

Install the binaries and HTML files (documentation and main web page).
make install

Install the sample init script to /etc/rc.d/init.d/nagios.
make install-init

Installing the Plugins

In order for Nagios to be of any use to you, you’re going to have to download
and install some plugins. Plugins are scripts or binaries which perform all
the service and host checks that constitute monitoring

Download and install the Nagios Plugins.
rpm -Ivh nagios-plugins-1.3.1-1.9.i386.rpm

Configuring Nagios

Nagios is compiled and installed. Now we have to configure it or in other
words define objects (hosts, services, etc.) that should be monitored.

The main configuration file (/usr/local/nagios/etc/nagios.cfg) contains a
number of directives that affect how Nagios operates. This config file is
read by both the Nagios process and the CGIs. This is a sample nagios.cfg


Add the list of servers that you want to monitor in

# ’server42′ host definition
define host{
use generic-host
host_name (server hostname)
alias (hostname)
address IP Address
check_command check-host-alive
max_check_attempts 10
notification_interval 120
notification_period 24×7
notification_options d,u,r
# ’server43…..


Edit /usr/local/nagios/etc/hostgroups.cfg to add all the servers.

define hostgroup{
hostgroup_name tchosting
alias TotalChoice
contact_groups tchosting
members server40,server41,server42

To setup email and pager notifications edit
/usr/local/nagios/etc/contacts.cfg to add your contact info.

define contact{
contact_name Ninad
alias ninad
service_notification_period 24×7
host_notification_period 24×7
service_notification_options n
host_notification_options d,u,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email ninads123@yahoo.com

The contact name must be a member of contact group. Edit
/usr/local/nagios/etc/contactgroups.cfg to add your name.



zlib installation

wget http://www.zlib.net/zlib-1.2.3.tar.gz

tar -zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
make install


Ninad S

Missing DNS zone ?

If you are facing issue related to missing DNS zone with cpanel update do the following:

/scripts/perlinstaller Compress::Raw::Zlib
/scripts/perlinstaller –force Scalar::Util

This should fix the issue.


Ninad S

Wednesday, May 9, 2007

WHM not updating quotas

The binary /usr/sbin/repquota must be missing onthe server which is used by the Cpanel script /usr/local/cpanel/bin/cachedrepquota to write to the file

After copying this binary and executing this script and restarting Cpaneld ,
the issue should be resolved.


Ninad S

Accounts missing from WHM

There are a lot of causes if the accounts in the server are missing from WHM-->list accounts.

Any of the following will cause the issue.

1) The account is missing from httpd.conf

2) The account has no cpanel user file.

3) The account is not there in the following files.
/etc/localdomains, /etc/userdomains, /etc/trueuserdomains and /etc/trueuserowners

/etc/trueuserowners file specifies the owner of each accounts in the following manner.

user: owner

4) If the account's DNS conflicts. ie if the domain has 2 DNS entries such as domainname and www.domainname. It may cause the account not listed in WHM-->list accounts.

You can run the following script if the account is missing.

/scripts/updateuserdomains (It won't add the account in httpd.conf, that
you have to add manually)


Ninad S

Not able to view JSP pages

If you are getting code instead of JSP page then you need to install servlets.

To install servlet go to the WHM >> Account Functions >> Install Servlets. Select domain and install.

After doing this you need to restart tomcat.

Now you will be able to view JSP pages.


Ninad S

Sunday, May 6, 2007

Enabling FP extensions for an addon domain

HowTo enable FP extensions for an addon domain
A) We won’t be able to install FP extensions on addon domain basically for
two reasons.

1) There won’t be a ServerName entry for the addon domain in the Apache config file and hence the install program will show an error like
the “domain” is not a valid virtual server.

2) FrontPage extension install program won’t install extensions in a directory which comes under another domains web root having FP extensions already installed.

To overcome these hurdles you can do the following.

1) Comment out the existing ServerName entry for the subdomain.

2) Create a new ServerName entry for in the corresponding subdomain’s VirtualHost entry.

3) Create a temporary folder in the document root of main domain and MOVE all .htaccess* and _* files from public_html in to the new directory.

4) Remove the _* and .htaccess files(created by FP) from the addon domain’s folder.

5) Verify the access.conf file in apache config directory and ensure that the AllowOverride directive is set to ‘All’. Some times this will not be enough for us to continue, hence, you have to make sure that the AllowOverride is set to ‘All’(by default it will
be ‘None’) in Apache config file.
Change only the directive inside entry.

6) Restart Apache and run the install program from back end.

#/usr/local/frontpage/version5.0/bin/owsadm.exe -o install -u $USERNAME -xuser $USERNAME -xgroup $USERNAME -p 80 -m $DOMAIN -pw $PASSWORD -s /usr/local/apache/conf/httpd.conf
$USERNAME give control panel login name
$DOMAIN give addon domain use www.addon.com
$PASSWORD choose a password

7) Restore the changes you made in the Apache config file.

Cool Move the .htaccess* and _* files from the backup directory (main domain web root).

If you are still having problems with connecting to the server using
FrontPage please make sure that the server name is http://www.addondomainname and you may also want to close the FP program and
start again to clear cache.


Ninad S

WHM not updating quotas

The binary /usr/sbin/repquota is missing onthe server which is used by the Cpanel script /usr/local/cpanel/bin/cachedrepquota to write to the file

After copying this binary and executing this script and restarting Cpanel ,
the issue should be resolved.


Ninad S

Synchronize time on Cpanel servers

Command to Synchronize time on Cpanel servers

rdate -s rdate.cpanel.net


Ninad S

PHP5 install as CGI

1) Download PHP 5.1.2 and do the usual

cd /usr/local/src
tar -jxvf php-5.2.1.tar.bz2

2) Compile php as in a new directory such as /usr/local/php5

Use the same ./configure line required but with the following changes:

–with-config-file-path=/usr/local/php5/etc –prefix=/usr/local/php5 –with-mysqli=/usr/bin/mysql_config (only with Mysql 4.1)

3) Compile and install
make install

IMP Steps :

cp php.ini-dist /usr/local/php5/etc/php.ini
cp /usr/local/php5/bin/php /usr/local/cpanel/cgi-sys/php5
chown root:wheel /usr/local/cpanel/cgi-sys/php5

4) Edit httpd.conf and add lines below::

AddHandler application/x-http-php5 .php5
Action application/x-http-php5 /cgi-sys/php5

Just use .php5 and it will invoke php5.


Ninad S

How do I check how many messages are in the mail queue?

This can be done by typing in the following command:


Ninad S

Disable PHP Functions

Edit php.ini

Comment out the original disable_functions, then put this underneath

disable_functions = dl,passthru,proc_open,proc_close,shell_exec,system

/etc/rc.d/init.d/httpd restart


Ninad S

How to disable mod_security for an individual account ?

If you are receiving the error for mod_security, access denied with error code 403 when you check the error logs for any account. You can disable the mod_security for that account by adding a simple code in his .htaccess


SecFilterEngine Off
SecFilterScanPOST Off



Ninad S

How to Update stats on Plesk server

Run the following command to update stats on plesk server.



Ninad S

How to Install RvSkin


Create a account from whm called rvskin.com

1. SSH as root to server that was registered while purchasing the license and run:

mkdir /root/rvadmin

cd /root/rvadmin

wget http://download.rvglobalsoft.com/download.php/download/rvskin-auto/saveto/rvauto.tar.bz2; bunzip2 -d rvauto.tar.bz2; tar -xvf rvauto.tar; perl /root/rvadmin/auto_rvskin.pl

Answer a couple of questions on your shell, and wait until it finishes. First installation will take 2- 5 minutes to install. Installer will create a new hosting account ‘rvadmin’. Don’t terminate it. It will be used for internal RVSkin configuration management.

2. Log in to RVSkin Manager. Both root and reseller are able to access RVSkin Manager in WHM / Add-ons (at the bottom left menu). If you cannot find the RVSkin Manager menu, please close WHM and open it again.

If there is no messages display on the skin, please run this command on your SSH.

rm -f /usr/local/cpanel/Cpanel/rvversion
perl /root/rvadmin/auto_rvskin.pl

3. In RVSkin Manager:

* Set global configuration
* Set default language
* Create defaul feature list for user and for reseller
* Set tweak setting, reseller feature control, body links, top links, help, tutorial links, and etc.
* Test configuration setting in 2 hosting accounts.
* rvadmin: this account can consider to be account belong to root
*reseller’s client: this account will reflect setting from reseller skin manager. If it is not configued, it will remain anonymous.

4. Change user cPanel to RVSkin themes
5. Change cPanel language to the new language


Ninad S

How to enable/disable PING

To Enable PING on the server

echo “0″ >> /proc/sys/net/ipv4/icmp_echo_ignore_all

To Disable PING on the server

echo “1″ >> /proc/sys/net/ipv4/icmp_echo_ignore_all


Ninad S

RAM disk

A RAM disk is a portion of RAM which is being used as if it were a disk drive. RAM disks have fixed sizes, and act like regular disk partitions. Access time is much faster for a RAM disk than for a real, physical disk. However, any data stored on a RAM disk is lost when the system is shut down or powered off. RAM disks can be a great place to store temporary data.The Linux kernel version 2.4 has built-in support for ramdisks. Ramdisks are useful for a number of things, including:

  • Working with the unencrypted data from encrypted documents
  • Serving certain types of web content
  • Mounting Loopback file systems (such as run-from-floppy/CD distributions)

Ninad S

Steps for Kernel Upgrade

Following are steps to upgrade kernel on live servers.

1. Check current version of kernel on server using command uname -a, if
its 2.4 then download latest release for 2.4 please do not download 2.6
You can download kernel from
if its 2.4 then http://www.kernel.org/pub/linux/kernel/v2.4/, you can
check latest stable release from http://www.kernel.org

2. wget kernel in /usr/local/src
3. untar it using tar -zxvf linux-2.x-xxxx
4. cd linux-2.x-x
5. make clean
6. make mrproper
7. If kernel is 2.4 then copy current version of config file from
/boot/config-’uname-r’ as .config in /usr/local/src/linux-2.x-xx, if
kernel is 2.6 then you do not need to make .config in current directory
8. make menuconfig, select and check if all required modules are
also make sure that your kernel supports multiple cpu
you can check it and select from processor type, if it displays support
for more then 2 kernel then you do not need to modify anything there.
9. save configuration and exit
10. make modules if kernel is 2.4 then need to run make dep before
make modules
11. make modules_install
12. make
13. if 2.4 kernel then need to run make bzImage and then make install,
you can directly run make install if kernel is 2.6
15. now make sure bootloader and modify default kernel accordingly
grubby –bootloader-probe if it displays grub then edit /etc/grub.conf
if its lilo then edit lilo.conf and make compiled kernel as default
16. If your boot loader is lilo then you need to run one more command
/sbin/lilo which will update lilo
17. now its time to reboot server


Ninad S

Lost Mysql root password ?

Few Simple steps to change your mysql root password.

service mysql stop

wait until MySQL shuts down. Then run

mysqld_safe –skip-grant-tables &

then you will be able to login as root with no password.

mysql -uroot mysql

In MySQL command line prompt issue the following command:

UPDATE user SET password=PASSWORD(”abcd”) WHERE user=”root”;

At this time your root password is reset to “abcd” and MySQL will now
know the privileges and you’ll be able to login with your new password:

mysql -uroot -pabcd mysql


Ninad S

How do you password protect your pages?

Using a password protected folder. With this method, you create the passwords ans usernames, and let users (members) have them. This method is used when a limited number of users will use the site.

Go the cpanel >> Password protection >> Select the name of the directory that you wish to protect >> Check the folder requires a password to access via http:// give a name such as Members now go back and create a user and password. Now when visitors will create this directory they will be prompted for username and password.

Ninad S

Using RPM

Installing software (rpm -i)
rpm -ivh package.rpm

Uninstalling software (rpm -e)
rpm -e software name

Updating packages (rpm -U)

Note :: This will uninstall and install the new package avoiding this annoying messages. It is also usual to install packages with –U flag in this way:

rpm -Uvh software.rpm

Ninad S

How to Install Mod_evasive

cd /root

wget http://www.zdziarski.com/projects/mod_evasive/mod_evasive_1.10.1.tar.gz

tar xvfz mod_ev*

cd mod_evasive*

CPANEL & Apache 1

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

/etc/init.d/httpd restart

CPANEL & Apache 2

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

/etc/init.d/httpd restart

PLESK & Apache 1

/usr/sbin/apxs -i -a -c mod_evasive.c

/etc/init.d/httpd restart

PLESK & Apache 2

/usr/sbin/apxs -i -a -c mod_evasive20.c

/etc/rc.d/init.d/httpd restart


Ninad S

To view Stats without login to cpanel

You can view webalizer stats without login to your cpanel.

cd /home/user/www
mkdir stats
cd stats
ln -s /home/user/tmp/webalizer webalizer
cd ../
chown -R user:user stats
cd ../
chmod -R 0775 tmp

You can access it as http://domain/stats/


Ninad S

Port Forwarding

To forward port 411 to port 4411

/sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 -d xxx.xxx.xxx.xxx –dport 411 -j DNAT –to xxx.xxx.xxx.xxx:4411

/sbin/iptables -A FORWARD -p tcp -i eth0 -d xxx.xxx.xxx.xxx –dport 4411 -j ACCEPT


Ninad S

Cpanel license error

If you are getting cpanel license error then run this command


If that doesnt clear it the first time, remove the file called “lisc” in
/usr/local/cpanel and then run that cpkeyclt again


Ninad S

Zend Optimizer

For i386
wget http://downloads.zend.com/optimizer/3.0.2/ZendOptimizer-3.0.2-linux-glibc21-i386.tar.gz
tar xvfz ZendOptimizer-3.0.2-linux-glibc21-i386.tar.gz
cd ZendOptimizer-3.0.2-linux-glibc21-i386

For x86_64
wget http://downloads.zend.com/optimizer/3.0.1/ZendOptimizer-3.0.1-linux-glibc23-x86_64.tar.gz
tar xvfz ZendOptimizer-3.0.1-linux-glibc23-x86_64.tar.gz
cd ZendOptimizer-3.0.1-linux-glibc23-x86_64


Ninad S


cd /usr/local/src
mkdir ea
cd ea
wget http://kent.dl.sourceforge.net/sourc…r-0.9.5.tar.gz

tar zxvf eaccelerator-0.9.5.tar

cd eaccelerator-0.9.5

export PHP_PREFIX=”/usr”
./configure –enable-eaccelerator=shared –with-php-config=$PHP_PREFIX/bin/php-config
make install

For PLESK: vi /etc/php.ini

For CPANEL: vi /usr/local/lib/php.ini

If Zend is already installed, vi /usr/local/Zend/etc/php.ini

Find this:

;Windows Extensions

Above this, comment out the PHPA or ZEND lines if you have them. Replace them with this:


mkdir /tmp/eaccelerator

chmod 0777 /tmp/eaccelerator

service httpd restart


Ninad S

Lame Server Resolve

service named stop

vi /etc/named.conf

add the three lines at the top

logging {

category lame-servers { null; };


service named restart


Ninad S

Open DNS Servers

vi /etc/named.conf

Before the line that says “directory /var/named”; (it could be /var, /var/named, etc)
recursion no;

service named restart

Make sure you can ping yahoo.com and google.com afterwards.


Ninad S

Configuring APF Firewall

cd /usr/local/src
wget http://rfxnetworks.com/downloads/apf-current.tar.gz
tar -zxf apf-current.tar.gz
cd apf-0.*

Now edit config file
vi /etc/apf/conf.apf
Scroll down to the “Common ingress (inbound) TCP ports section. At this point you need to find the correct configuration for your control panel.



save the file
start apf
apf -s
If everything still works then edit the config file and turn dev mode off. Make sure you can start a new ssh session before changing dev mode off. If you are kicked out you need to go back and look at what caused the problem!

restart APF
apf -r


Ninad S

SIM (System Integrity Monitor)

How to Install SIM

Login to your server via SSH as root.

wget http://www.r-fx.org/downloads/sim-current.tar.gz

tar xvfz sim-3*.gz

cd sim-3.0

./install.sh -i


sim -j

If ifconfig is not eth0 (eg eth1, or venet0)

nano -w /etc/conf.sim


Ninad S

Install Chkrootkit

cd /root

wget ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz

tar xvzf chkrootkit.tar.gz

mv chkrootkit-* chkrootkit

cd chkrootkit

make sense



View My Stats