If you are facing a problem where databases in the Cpanel account are showing 0Mb disk usage, then usually its caused by the related Cpanel configuration being set to 0 (zero).

You can check this by finding the value of parameter ‘disk_usage_include_sqldbs‘ in the cpanel.config file using below :

root@CpanelServer [~]# grep disk_usage_include_sqldbs /var/cpanel/cpanel.config
disk_usage_include_sqldbs=0
root@CpanelServer [~]#

If its 0 like in above case, then edit the Cpanel config file at /var/cpanel/cpanel.config and update this parameter and set it to 1 and save the config file.

After that use below command to update the cache :

/scripts/update_db_cache

This should resolve your problem.

Important Note : This fix will only work on Mysql5 servers. For Mysql4 servers this is a known issue and there is no solution available yet for this from Cpanel.

Tags: , , ,

Riz Khan on May 19th, 2010

rkhunter is a good tool for server security audit, either you are doing a general proactive error or in a suspicion of server compromise.
Its easy to install and use , you can install rkhunter following below steps :

Note : It do not give accurate results in VPS environment so its only recommended for Physical servers.

Installation steps :


#switch to source directory
cd /usr/local/src
#download source
wget http://downloads.sourceforge.net/project/rkhunter/rkhunter/1.3.8/rkhunter-1.3.8.tar.gz?use_mirror=nchc
#untar (according to version number and file name)
tar -xzvf rkhunter-1.3.8.tar.gz
#Installation
cd rkhunter-1.3.8
./installer.sh --install

#Running a scan (you can run ' rkhunter --help' to see detailed options available )
rkhunter --check

The scan will give you result of scans on console, saying ok or giving warning etc for different checks (like rootkit files check, check for malware, network etc), pausing for you to press enter before performing each set of test. You can review the results on the console in real time and if you have any doubt about any output, you can search on internet for that or consult a system administrator. Or you can drop a comment and I will try to help/guide with any issues you might have.

It logs all the output in below file, so you can review that file at any time after completing the scan :

/var/log/rkhunter.log

Have a happy security audit :)

Tags: , , , , ,

This error comes many times in Virtouzzo 4 installation on 32bit or 64bit Platform on CentOS , mentioning that the network controller is not recognizable by Virtouzzo.

The exact error is similar to below :


The following devices are not supported by Virtuozzo:
If you will continue the installation, Virtuozzo Containers may fail to boot or some device may be not operational
8086:10d3 02:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
8086:10d3 06:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
--

The reason for this is that the during default installation step the kernel installed is very old and if you boot the server after installation with that kernel despite above error message then the server will fail to boot in virotuzzo kernel, though you should be able to boot it into the default CentOS kernel.

The solution for this problem is to do the installation in this sequence :

– Install Virtouzzo normally and do NOT reboot the server at end of installation
– Use vzup2date to install updates and new kernel, if it fails install the new kernel manually
– Update /etc/grub.conf to set the new kernel as default.
– Now reboot server and it will work fine.

If vzup2date fails , it will still download the latest kernel and will make it available at path like below :

/vz/vzup2date/virtuozzo/linux/i386/4.0.0/CU-2.6.18-028stab068.9/ (For 32bit)
/vz/vzup2date/virtuozzo/linux/x86_64/4.0.0/CU-2.6.18-028stab068.9/ (For 64bit)

You need to install three rpms vzkernel-xxx.rpm , vzkernel-devel-xxx.rpm and vzmodules-xxx.rpm, located at above path.

(the CU-Kernel-Name folder will of course vary as the new kernel become available)

Hope this helps some of folks out there facing same problem .

Tags: , , , ,

In many situations your resource usage may increase our the time and in this situation one simple way is to upgrade to a bigger and more powerful server. The other possible way is to setup a separate MySQL server just for databases and keep a main server running as Web and Mail server.

CPanel has automated this and provides the options to achieve this under below link in WHM :

WHM >> SQL Services >> Setup Remote MySQL server

This feature allows you to place MySQL databases for your domains on a remote server that is running MySQL, the remote server can be a Cpanel server where you can turn other services of or it can be a simple Linux server with Mysql service running on it.
Using a separate server for MySQL in this way can be useful for busy servers or servers that have large databases, which allows you to offload MySQL related activity/work to the remote MySQL server.

At this connectivity page you will need to enter the valid ssh connection information for the remote MySQL server, and thats all you need to complete this setup by pressing the ‘setup’ button on this page.

Tags: , , ,

Riz Khan on May 13th, 2010

Installing extension managers like Zend Optimizer or Ion Cube etc is not very difficult, but Cpanel provides a script to install the extension managers making it further easy.

The script is located under the normal /scripts directory on Cpanel servers :

/scripts/phpextensionmgr

It provides the options to list, check status , install or remove any of the extensions.

Using below command you can get the list of extension managers available for installation :

root@CpanelServer[~]# /scripts/phpextensionmgr list
Available Extensions:
EAccelerator
IonCubeLoader
Zendopt
SourceGuardian
PHPSuHosin
root@CpanelServer[~]#

Now you can check status of any extension using the below command :

root@CpanelServer[~]# /scripts/phpextensionmgr status Zendopt
Determining status of Zendopt
Zend Optimizer extension is NOT installed
root@CpanelServer[~]#

Now we can see that Zend Optimizer is not installed we will take its installation as example to show how you can install certain extension :

root@CpanelServer[~]# /scripts/phpextensionmgr install Zendopt
Installing Zendopt
Determining PHP version
Creating install directory at /usr/local/Zend/lib/Optimizer-3.3.9/php-5.2.x
Installing Zend Optimizer binary
Activating Zend Optimizer in /usr/local/lib/php.ini
Zend Optimizer activated
Skipping install to /usr/local/php4, missing php.ini
root@CpanelServer[~]#

Now we can see Zend Optimizer is installed , you can use similar command to install any of the available extensions.

Lets check the status again :

root@CpanelServer[~]# /scripts/phpextensionmgr status Zendopt
Determining status of Zendopt
Zend Optimizer extension is installed
root@CpanelServer[~]#

Now you can see the required installation is installed.

Happy extension managers installing .

Tags: , , , , , ,

There are instances when additional IPs are assigned to a certain server but they still do not ping or respond, and only the main IP of the server pings. For Cpanel based servers you will find them assigned at below link as well :

WHM >> IP Functions >> Show IP Address Usage

You can verify the IPs on shell using below command to see if they are attached to the virtual network interfaces are not :

ifconfig -a

Now if you find that additional IPs are not appearing , then you can make them available using below command :


service ipaliases start

For Cpanel based servers such additional IPs are listed at /etc/ips.

Tags: , , ,