Sunday 30 January 2011

How to find out the IP address of master node or unregister slave node from Virtuozzo group without access to master node.

It is not possible to login to PIM, the following error is displayed:

The Node you are trying to log in to is a Slave Node of a Virtuozzo Group. Only the address of the Master Node of this Group can be used for logging in.

The IP of master node is unknown or it is not possible to unregister the slave node.

The IP address of master node can be found out using vzagroup utility, e.g. on Virtuozzo for Linux node:
# /opt/vzagent/bin/vzagroup list

The same utility can be used to force unregistering slave node from group – “vzagroup removeFromGroup” command should be used in this case.
Additional information
Master node commands:
Note: master node credentials should be specified
Note: master node credentials should be specified

Other options are available from built-in help, which is shown when utility is invoked with no parameters:
# /opt/vzagent/bin/vzagroup

Usage: vzagroup
vzagroup addSlave [--force] USER[:PASSWORD]@ADDRESS

vzagroup removeSlave USER[:PASSWORD]@ADDRESS

vzagroup list

Note: credentials should be specified to connect to slave

Slave or single node commands:
vzagroup addToGroup USER[:PASSWORD]@ADDRESS

vzagroup removeFromGroup

Slave or single node commands:
vzagroup addToGroup USER[:PASSWORD]@ADDRESS

vzagroup removeFromGroup

How to install Ruby and Rails on cPanel

Ruby on Rails, often shortened to Rails or RoR, is an open source web application framework for the Ruby programming language. It is intended to be used with an Agile development methodology that is used by web developers for rapid development.

There is an inbuilt script in cPanel to install ruby and rails.

Login to shell using root user then execute following commands.
[root@root ~]#/scripts/installruby

[root@root ~]#gem install rails

[root@root ~]#gem install mongrel

[root@root ~]# gem install fastthread

Ruby and Rails needs some port to be open in your firewall.

If you are using IPtables then execute following commands to open ports.
iptables -A INPUT -p tcp –dport 3000 -j ACCEPT

iptables -A INPUT -p tcp –dport 12001 -j ACCEPT

Save IPtables and restart it.

Then login to WHM to check whether RoR is installed or not.

Thursday 27 January 2011

How to Install MP4Box

MP4Box is a MP4 multiplexer and used for conversion, splitting, hinting, dumping and to import MPEG-4 video, DivX, h264, XviD, 3ivx or FFmpeg and audio streams into the .MP4 container. The end result is a compliant MP4 stream.
MP4Box is part of the GPAC Project framework. It is a command line tool, but can be used with graphical user interfaces such as YAMB or my MP4box GUI.

Download Source :- http://sourceforge.net/projects/gpac/files/

Download and Install latest version of gpac from above URL.
#cd /usr/local/src/

#wget http://nchc.dl.sourceforge.net/project/gpac/GPAC/GPAC%200.4.5/gpac-0.4.5.tar.gz

#wget http://nchc.dl.sourceforge.net/project/gpac/GPAC%20extra%20libs/GPAC%20extra%20libs%200.4.5/gpac_extra_libs-0.4.5.tar.gz

# tar -zxvf gpac-0.4.5.tar.gz

# tar -zxvf gpac_extra_libs-0.4.5.tar.gz

# cd gpac_extra_libs

# cp -r * /usr/local/src/gpac/extra_lib

# cd gpac

# chmod 755 configure

# ./configure

# make lib

# make apps

# make install lib

# make install

# cp bin/gcc/libgpac.so /usr/lib

If you get following error :
/usr/bin/ld: cannot find -lglut

collect2: ld returned 1 exit status

make[1]: *** [libgpac.so] Error 1

make[1]: Leaving directory `/usr/local/src/gpac/src'

make: *** [lib] Error 2

then fire following command :
yum install freeglut-devel

mp4box installed successfully, you can verify it as follows
root@ffmpeg [~]# which MP4Box

/usr/local/bin/MP4Box

What is my motherboard model?

dmidecode is a great utility that provides details about the motherboard in your server. Everything from the type of RAM to the model of the motherboard.

Run this command to get the name and model of the motherboard used in your linux server.
 dmidecode | grep -i product

Exim - Delete messages more than 24 hours old

If you need to clean up your exim queue and delete emails queued and older than 24 hours run this command.
 usr/sbin/exiqgrep -o 86400 -i | xargs exim -Mrm

Tuesday 25 January 2011

How to change date and time zone in php

If your php script is not showing correct date and time then it means your script is using date and time zone configured on your server.

If you want to set your own date and time zone for your domain then it can be done in a very simple manner.

You will need to create php.ini in document root of your domain.
nano php.ini

and enter following line.

date.timezone =Asia/Jakarta

save and exit from file.

Now create phpininfo page and open it in browser and you will see that date and time zone hve been enabled.

Monday 24 January 2011

What is an addon domain

An addon domain is a fully functional domain that can be created from within your control panel. Think of it as having multiple hosting packages all sharing the same control panel. You can give them email addresses, forwarders, and more the same way you do for your main domain on the account.

The addon domain will appear as a totally separate domain from your primary domain. There should be no evidence that your domain is an addon domain to incoming traffic when they visit your addon domain.

Saturday 22 January 2011

cPanel certificate error: Security issues? Why?

Is your SSL valid?


This certificate in fact is valid and your connection is secured. This means that all data you exchange with our server is protected and nobody except you and our server know what you do in the cPanel.

But why do I get the "untrusted" message?


It looks untrusted to third-parties authorities. This is true, because the certificate was issued by us and but not them and they just can't verify it.

Disabling that annoying SSL reminder:


In FireFox


If you see the "This Connection is Untrusted" message

  1. Please click on "I understand the risks"

  2. and then click on the "Add exception" button that will appear

  3. Make sure the "Permanently store this exception" check-box is checked

  4. Click on "Confirm this security exception"


This will add our certificate to your operating system permanently and will not warn you anymore again for that particular site

In Internet Explorer



  1. Download our certificates: onetwo

  2. Extract the certificates from the archive to your hard disk

  3. Open Internet Explorer, select Tools and Internet Options

  4. Select the Content tab and click the Certificates button

  5. In the new Certificates window select the Trusted Root Certification Authorities tab

  6. Click Import..., Next, then select whmcertificate.crt, click Next and Finish

  7. When asked if you want to import a new certificate click YES

  8. Restart Internet Explorer

Sunday 16 January 2011

Adding mime types to a Linux server

There are two ways to add a mime type to a Linux server. You can either add the mime type to the server mime type listing or you can specify a mime type via an .htaccess file in a individual hosting account. This article will explain how to do both.

Method 1.

  1. Log into the Linux server via SSH.

  2. Open the “/etc/mime.types” file using a text editor.

  3. Add the new mime type into the end of the “/etc/mime.types” file and save it.

  4. Restart Apache by typing either of the following commands;


“service httpd restart”

“/etc/init.d/httpd restart”

Method 2.

  1. Loging the Linux server via SSH.

  2. Navigate to the account that you wish to add the mime type. You will need to be in the web accessible portion of the account.

  3. Either create or modify the existing “.htaccess” file and add the mime type entry and save the file.

  4. Restart Apache by typing either of the following commands;


“service httpd restart”

“/etc/init.d/httpd restart”

Sunday 9 January 2011

What is the difference between a Sub-Domain, Parked Domain and an Add-On Domain?

This article is a basic outline of the differences between a Sub-Domains, Parked Domains, and Add-On Domains. Creation of each domain type on your selected hosting service may differ depending on what control control panel is offered.

Here are some basic differences between the three:

Sub domain

  • Lets say you own domain site1.com.

  • You only own 1 domain or only wish to have a forum on one domain.

  • You decide to install a forum and want the forum installed in a directory called forum

  • Once the sub-domain forum is created, people can access your forum as either site1.com/forum or forum.site1.com