In this post i will show you what steps  I followed to adapt RAID1 on an existing installation of Debian Squeeze.

Step1. Make sure you have the following packages are installed:

apt-get update && apt-get upgrade
apt-get install mdadm rsync initramfs-tools grub-pc

Step2.  Partitioning the new drive:

First connect the new drive (/dev/sdb) and boot into your sistem.
Then use fdisk to display the partition informations for the existing drive (/dev/sda).

[email protected]:~# fdisk -l /dev/sda

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0007384e

Device Boot Start End Blocks Id System
/dev/sda1 * 1 9330 74936320 83 Linux
/dev/sda2 9330 9730 3212289 5 Extended
/dev/sda5 9330 9730 3212288 82 Linux swap / Solaris

Now create partitions of the same size on the new drive.

NOTE:If the new drive is bigger leave the rest of the drive unpartitioned.

Step3. Create new degraded RAID1 arrays:

Continue Reading…

In this guide I will explain how to install and use KVM to create and run virtual machines on a Debian Squeeze Server.
In this tutorial I will show how to create image-based virtual machines.
KVM makes use of hardware virtualization. For that you need a CPU that supports hardware virtualization such as Intel VT or AMD-V.

Step 1. Check if your CPU supports hardware virtualization using the following command:

egrep ‘(vmx|svm)’ –color=always /proc/cpuinfo

If your result is nothing, then your processor doesn’t support hardware virtualization.

Step 2. Install KVM and virtinst :

apt-get install kvm qemu-kvm libvirt-bin virtinst

Step 3. Now we need to add the user as which we’re currently logged in to the groups libvirt and kvm. Run the following commands:

adduser `id -un` libvirt
adduser `id -un` kvm

Step 4. You also  need to set up a network bridge on our server.  You need that for virtual machines to can be accessed from outside.
For that you need to  install the package bridge-utils.

apt-get install bridge-utils

Continue Reading…

This bash script was cread for you to help you to set up a VPN that will let you do many things.

This bash script is based primarily on another tutorials, but I have updated and I added some more infos.

This is the script:

# OpenVPN install script
# Tested on Debian Squeeze
# Please submit feedback and questions at [email protected]

ip=`grep address /etc/network/interfaces | grep -v | awk ‘{print $2}’`
apt-get update
apt-get install openvpn libssl-dev openssl
cd /etc/openvpn/
cp -R /usr/share/doc/openvpn/examples/easy-rsa/ /etc/openvpn/
cd /etc/openvpn/easy-rsa/2.0/
chmod +rwx *
. ./vars
source ./vars

echo -e “\n\n\n\n\n\n\n” | ./build-ca

Continue Reading…

eAccelerator is a free open-source PHP accelerator & optimizer. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.

eAccelerator stores compiled PHP scripts in shared memory and executes code directly from it. It creates locks only for a short time, while searching for a compiled PHP script in the cache, so one script can be executed simultaneously by several engines. Files that can’t fit in shared memory are cached on disk only.

The latest release,, features support for PHP 5.3 and also works with PHP 5.1 and 5.2.

1. Installation:

apt-get update && apt-get upgrade && apt-get install php5-dev

Now  you  have to download and install eAccelerator from the eAccelerator website.

Now Install eAccelerator using the following commands:

cd /usr/src
tar -xvfj eaccelerator-
cd eaccelerator-
make install

2. Integrate eAccelerator in PHP5:

Continue Reading…

Varnish is a web accelerator. Its mission is to sit in front of a web server an cache the content. It makes your web site go fast.
In this mode, Varnish will stop incomplete HTTP requests from reaching your Apache webserver.

Installing Varnish:

Varnish is distributed in the Debian package repositories, but the version there might be out of date, and  generally recommend using the packages provided by or packages from

To use the repository and install varnish, do the following:

Change Varnish settings:

1. First change the default port.  Edit /etc/default/varnish:

Continue Reading…

Page 1 of 212