Archive for November 2010

A fatal error has occurred DB Error: connect failed

A fatal error has occurred
DB Error: connect failed
Details have been logged for the administrator
.

If you are getting the above error while logging in the Wemail using horde , it means that there is problem with the horde database on the server and you can easily fix this by running the below command on the server as a root user.

[email protected][#] /usr/local/cpanel/bin/update-horde –force

The above command will fix the database for horde by updating the current database.

That’s all you are done.

How to add Additional swap Space in linux

Steps to create Additional Swap space :

[email protected][#] dd if=/dev/zero of=/home/.additionalswap bs=1M count=4096

[email protected][#] mkswap /home/.additionalswap

The mkswap command formats a partition to be used as a swap device

[email protected][#] swapon /home/.additionalswap

Swapon is used to specify devices on which paging and swapping are to take place

[email protected][#] swapon -s

Display swap usage summary by device. Equivalent to “cat /proc/swaps”

Then to make the changes permanent open the /etc/fstab


[email protected][#] vi /etc/fstab

And add this line at the end

/home/.additionalswap none swap defaults 0 0

This will make the changes permanent

That’s all you are done.

How to add/bind additional IP’s in Debian/Ubuntu

If you have a single NIC (Network Interface Card) card on your server and you want to add or bind few new IP’s on the same server using the same NIC card then you need to create the aliases for eth0 .

For example if you want to add the below two IP’s on the server :


10.10.10.02

10.10.10.03

Assuming that the eth0 has IP 10.10.10.01

then you need to create the aliases as :

eth0:1 for 10.10.10.02

eth0:2 for 10.10.10.03

Follow the belows steps to find out how you can add/bind the above two IP’s on the server :

[email protected][#] cat /etc/network/interfaces

The above command will display the below output :

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0

iface eth0 inet static
address 10.10.10.01
netmask 255.255.255.0
network 10.10.10.0
broadcast 10.10.10.255
gateway 10.10.10.1

And then open the file :


[email protected][#] vi /etc/network/interfaces

and add the below lines at the end

auto eth0:1

iface eth0:1 inet static
address 10.10.10.02
netmask 255.255.255.0
gateway 10.10.10.1

So, at the end the file does looks like :

[email protected][#] vi /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0

iface eth0 inet static
address 10.10.10.01
netmask 255.255.255.0
network 10.10.10.0
broadcast 10.10.10.255
gateway 10.10.10.1

auto eth0:1

iface eth0:1 inet static
address 10.10.10.02
netmask 255.255.255.0
gateway 10.10.10.1

Save and quit.

Finally restart the network service :

[email protected][#] /etc/init.d/networking restart

That’s all you are done.

Repeat the same steps for eth0:2 .