How to install BIND .


Cheap reseller Hosting


[Root @ example ~] # yum -y install BIND BIND-utils
It is set assuming that the global address [192.16.0.80/29], private address [10.0.0.0/24], the following settings in the domain name, and [server.world]: Setting BIND. Please replace to suit your environment. (192.16.0.80/29 is actually the address for private)

[Root @ example ~] # echo ‘OPTIONS = “-4″‘ >> / etc / sysconfig / named # If you do not want to use the IPv6 (you will not be set if used) set [Root @ example ~] # vi / etc / named.conf / / / / Named.conf / / / / Provided by Red Hat bind package to configure the ISC BIND named (8) DNS / / Server as a caching only nameserver (as a localhost DNS resolver only). / / / / See / usr / share / doc / bind * / sample / for example named configuration files. / /

options { # (Listens to port 53 on all interfaces of the server) Comment # listen-on port 53 {127.0.0.1;}; # (If you do not want to use the IPv6) change listen-on-v6 {None;}; directory “/ Var / named”; dump-file “/ Var / named / data / cache_dump.db”; statistics-file “/ Var / named / data / named_stats.txt”; memstatistics-file “/ Var / named / data / named_mem_stats.txt”; # (Where the internal network, etc.) to allow range queries allow-query {Localhost; 10.0.0.0/24; }; # (Range / the place if there is a secondary DNS) range to allow the transfer of information zone allow-transfer {localhost; 10.0.0.0/24;}; recursion yes; dnssec-enable yes; dnssec-validation yes; dnssec-lookaside auto; / * Path to ISC DLV key * / bindkeys-file “/ etc / named.iscdlv.key”; }; logging { channel default_debug { file “data / named.run”; severity dynamic; }; };

# Change the following line from all view “internal” { match-clients { localhost; 10.0.0.0/24; }; zone “.” IN { type hint; file “named.ca”; }; zone “server.world” IN { type master; file “server.world.lan”; allow-update {none;}; }; zone “0.0.10.in-addr.arpa” IN { type master; file “0.0.10.db”; allow-update {none;}; }; include “/ etc/named.rfc1912.zones”; }; view “external” { match-clients {any;}; allow-query {any;}; recursion no; zone “server.world” IN { type master; file “server.world.wan”; allow-update {none;}; }; zone “80.0.16.172.in-addr.arpa” IN { type master; file “80.0.16.172.db”; allow-update {none;}; }; };

# Allow-query ⇒ (specify the internal network, etc.) to allow range queries # Allow-transfer ⇒ (range / the place if there is a secondary DNS) range to allow the transfer of information zone # Recursion ⇒ Whether you are allowed to retrieve comeback # View “internal” {~}; ⇒ describes the definition for internal # View “external” {~}; ⇒ describes the definition for the external
# *. *. *. *. Place of in-addr.arpa is about to enter what was to reverse the network address # If the 10.0.0.0/24 # Network Address ⇒ 10.0.0.0 # Range of network ⇒ 10.0.0.0 – 10.0.0.255 # How to specify ⇒ 0.0.10.in-addr.arpa

# If 192.16.0.80/29 # Network Address ⇒ 192.16.0.80 # Range of network ⇒ 192.16.0.80 – 192.16.0.87 # How to specify ⇒ 80.0.16.172.in-addr.arpa


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


Database size doesn’t get updated in cPanel.


Cheap reseller Hosting


If the database inside the cPanel shows 0 mb, it is because the database cache file of the user is not updated. 

To fix this, login to server via SSH and edit the below file:

vi /var/cpanel/cpanel.config

check disk_usage_include_sqldbs=0 and change it to disk_usage_include_sqldbs=1, if the line noe found, simply add it to the bottom. 

You can do the same via WHM >> Main >> Server Configuration >> Tweak Settings >> SQL >>
Include databases in disk usage calculations >> Set that to On.

Then run the below command:
/scripts/update_db_cache

Cheap web Hosting


How to enable alternate port for exim?


Cheap reseller Hosting


Exim is a mail transfer agent (MTA) used on Linux/Unix-like operating systems. It is freely available under the GNU GPL and it aims to be a general and flexible mailer with extensive facilities for checking incoming e-mail.

Normally default port for exim is 25. but most of the ISP block port 25. so it is necessary that an altername port for exim is open on server. Following are the steps to configure alternate port on cpanel/WHM installed on the server.

1) Login to WHM as root.

2) In WHM click on  Main >> Service Configuration >> Service Manager

3) Now tick the check box under Exim on another port and also enter the alternate port no: in the corresponding text box.


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


1 18 19 20 21 22 24