How to configure cPanel !!!


Cheap reseller Hosting


Open a web browser and connect to your cPanel Control Panel located at https://ip address:2087.
Login as the Administrator using the information sent to you in your setup email.
Under the Welcome message click Next.
Read the cPanel license agreement and click I Agree.
Enter the requested information:

Main Shared Virtual Host IP: enter the IP of your VPS Hostname: enter your domain name. If you do not currently have a domain name, you can ignore this field Primary Nameserver: enter the primary name server for your domain name; if you are using HostMySite’s nameserver, enter ns1.lnhi.net Secondary Nameserver: enter the secondary name server for your domain name; if you are using HostMySite’s nameserver, enter ns2.lnhi.net Tertiary Nameserver: enter the tertiary name server for your domain name; if you are using HostMySite’s nameserver, enter ns3.lnhi.net
Click Save.
Click Next Step to begin the Initial Quota Scan.
Click Next Step to continue past the Setup Nameserver screen.
Click Next Step to continue past the Setup Resolver Config screen.
For Step 6, enter a root MySQL password and click Change Password.
Click Finish.

Cheap web Hosting


Script to kill Roundcube stuck process !!


Cheap reseller Hosting




Create the new file roundcube.sh and insert the following code.

#!/bin/sh
for ROUNDCUBE in `ps aux | grep roundcube | awk -F ” ” ‘{print $10}’ | awk -F “:” ‘{print $1}’`;
do
if [ $ROUNDCUBE -ge 20 ]; then
pkill -u cpanelroundcube
echo “kill roundcube process roundcube”;
fi
done
You can add the cron job to run the above script after a specific time period, if you are facing the roundcube cpu usage issue continuously.Add following line under the crontab by using the crontab -e, it will run the cron after every 10 minutes.
*/10 * * * * sh /root/roundcube.sh;

Cheap web Hosting


Add SPF and Domainkeys in cPanel


Cheap reseller Hosting


If you have a cPanel based server, adding an SPF record or domain keys entries for domains are so much easier than manually entering them.
cPanel provides the following scripts/commands to help us through this task:

# /usr/local/cpanel/bin/domain_keys_installer

# /usr/local/cpanel/bin/spf_installer

Note:: This would add the records for all domains under this cPanel account. Meaning for all Addon domains too.

Cheap web Hosting


Not able to login to Horde?


Cheap reseller Hosting


Many times it happens that horde wont allow user to login to webmail.
Try following command to fix the issue

root@server[~]#/usr/local/cpanel/bin/checkperlmodulesroot@server[~]#/scripts/fullhorderesetroot@server[~]#myisamchk -r /var/lib/mysql/horde/horde_sessionhandler.MYI

If still you have problem then check the ownership for session directory present in /var/cpanel/userhomes/cpanelhorde directory.

root@server[~]#ll /var/cpanel/userhomes/cpanelhorde
drwx–x–x 4 cpanelhorde cpanelhorde 4096 June 5 2012 ./drwx–x–x 7 root root 4096 Dec 17 01:48 ../drwxr-x— 2 cpanelhorde cpanelhorde 4096 June 5 2012 mail/drwx—— 2 cpanelhorde cpanelhorde 4096 Jan 27 14:01 sessions/

Session directory should be cpanelhorde.cpanelhorde ownership recursively


Cheap web Hosting


How to Enable html view for horde?


Cheap reseller Hosting


Login to shell using root user and follow the following steps to enable HTML view of horde webmail.
root@server[~]# vi /usr/local/cpanel/base/horde/imp/config/mime_drivers.php
Search for the line
—-
/**
* HTML driver settings
*/
$mime_drivers[‘imp’][‘html’][‘inline’] = false;
—–

and replace it with
——–
/**
* HTML driver settings
*/
$mime_drivers[‘imp’][‘html’][‘inline’] = true;
——–
Save the changes and restart the following services.
root@server[~]#service cpanel restart
root@server[~]#/scripts/restartsrv_courier

Cheap web Hosting


Repairing corrupted mysql database !!


Cheap reseller Hosting


Sometimes it happens that your database get corrupted due to many reason like it does not get restored properly or server get rebooted while updating database etc…. and you have tried to repair it using phpmyadmin and it does shows that it has repaired but it is not.
Solution :
Login to server with root access
Stop mysql using following command
/etc/init.d/mysql stop
Run following command to check all teh tables in teh database
/usr/bin/myisamchk /var/lib/mysql/databasename/*.MYI
Run following command to repair all teh tables in the database
/usr/bin/myisamchk -r /var/lib/mysql/databasename/*.MYI
Then recheck again using following command
/usr/bin/myisamchk /var/lib/mysql/databasename/*.MYI
Restrart MySql service using following command
/etc/init.d/mysql restart

Cheap web Hosting


Magento – “Failed to mkdir” Error


Cheap reseller Hosting


 Magento – “Failed to mkdir” Error

Many times when you try to install a new theme or application from
“Magento Connect Manager” , you may encounter the error :

ERROR: failed to mkdir

To fix this issue follow the below steps :

root@server[#] cd /home/username/public_html/downloader
root@server[#] vi config.ini

It will show something like this :

preferred_state=stable
use_custom_permissions_mode=1
mkdir_mode=0777
chmod_file_mode=0777
chmod_file_mode_executable=0777
tmp_dir=../var/tmp

Now make the below changes :

preferred_state=stable
use_custom_permissions_mode=0
mkdir_mode=0777
chmod_file_mode=0777
chmod_file_mode_executable=0777
tmp_dir=../var/tmp

That’s all you are done.


Cheap web Hosting


Fatal error: Unable to read 32654 bytes in /home/xxx/public_html/includes/functions.php on line 0


Cheap reseller Hosting


For zend encoded files, you may face following error

Fatal error: Unable to read 32654 bytes in 
/home/xxx/public_html/includes/functions.php on line 0

Its most probable the related files for the script are uploaded in ASCII mode,
all encoded files must be uploaded in binary mode.

01. You need to reupload all files in binary mode,
or set the transfer mode to auto in FTP client.
02. Check if short_open_tags in set as On in PHP configuration ie php.ini
03. Check if you have updated versions for Zend optimizer or ionCube loaders.

In most cases, files reupload in binary mode resoves the issue.

Cheap web Hosting


How to Remove/uninstall MailScanner !!


Cheap reseller Hosting


To remove MailScanner and the MailScanner Front-End, run these commands in shell as root:
cd /usr/mscpanel
sh uninstall.msfe.sh

cd /root
wget http://www.configserver.com/free/msinstall.tar.gz
tar -xzf msinstall.tar.gz
cd msinstall/
sh uninstall.sh
Remove the sare rules and MailScanner-specific SpamAssassin configuration files (in shell as root):
cd /etc/mail/spamassassin/
rm -fv *sare* configserver.cf mailscanner.cf
To remove the MailScanner Configuration icon from cPanel, go to WHM > Packages > Feature Manager. Edit the “disabled” Feature List and uncheck the box for MailScanner Configuration.
Remove the root cron jobs that run mscpanel.pl, sa_rules.sh (or rules_du_jour), and the cronjob that restarts clamd (in shell as root):
crontab -e
Remove the following lines (if they exist – they may or may not be there) from /scripts/postupcp:
#!/bin/sh
perl /usr/mscpanel/mscheck.pl
Reset Exim Configuration (if desired), in WHM > Exim Configuration Editor > Reset All Configs to Defaults. This is not required. To remove our install of clamav, run these commands in shell as root:
killall clamd

/bin/rm -Rfv /usr/bin/clam*
/bin/rm -Rfv /usr/sbin/clam*
/bin/rm -Rfv /usr/lib/libclam*
/bin/rm -Rfv /usr/share/clam*
/bin/rm -Rfv /usr/include/clam*
/bin/rm -Rfv /usr/bin/freshclam*
/bin/rm -Rfv /usr/etc/clamav*
/bin/rm -Rfv /var/clamd

/bin/rm -Rfv /usr/local/bin/clam*
/bin/rm -Rfv /usr/local/sbin/clam*
/bin/rm -Rfv /usr/local/lib/libclam*
/bin/rm -Rfv /usr/local/share/clam*
/bin/rm -Rfv /usr/local/include/clam*
/bin/rm -Rfv /usr/local/bin/freshclam*
/bin/rm -Rfv /usr/local/etc/clamav*
/bin/rm -fv /etc/init.d/clamd
/bin/rm -fv /etc/cron.daily/freshclam
/bin/rm -fv /etc/cron.hourly/freshclam
/bin/rm -fv /etc/cron.d/freshclam
In WHM > Service Configuration > Service Manager > Additional Services uncheck both boxes for clamav.
You can then install clamavconnector via WHM > Manage Plugins if desired. if you want to re-enable SpamAssassin through cPanel:
WHM > Tweak Settings > SpamAssassin > tick
WHM > Service Manager > spamd > tick both boxes
WHM > Feature Manager > Edit a Feature List > disabled > Edit > SpamAssassin and SpamAssassin Spam Box > tick
WHM > Feature Manager > Edit Feature List – edit any feature lists that you want to allow access to the SpamAssassin configuration in cPanel

Cheap web Hosting


1 2 3 4 5 6