Compiling Xen from source using dpkg

Compiling and installing software from source is used by developers a lot. So using ./configure , make, make install is something we all are well aware of but this is a very messy way to do so because when you uninstall the program it may leave some dependency files in the system or might not work properly when again installed.

I observed this case a lot of times when I use make install. Even sometimes a tried removing extra programs/dependencies manually.
So now I will write about a clean and very good way of installing Xen by source.

Download Xen sourcecode from git.

And run these commands:
#cd xen
#./configure –prefix=/usr
#make
#make debball
#dpkg -i dist/xen-upstream-XXXX

And whenever you want to uninstall it just use.

#dpkg -r xen-upstream
#apt-get purge xen-upstream

And yes you don’t have to worry about any of the dependencies as dpkg will take care of it. 🙂