Thursday, September 18, 2008

Easier Installation for VirtualBox on Ubuntu

With the recent release of VirtualBox 2.2, things are working really nice for VirtualBox on Ubuntu.
When I first upgraded to VB ox 2.0 I found couple of bugs and within days there already 2.2 available and fixed the bugs. I have to say I'm impress!

With the new update checker install it's nice for me, so I do not need to go to the website every now and then to check for if new version rolls out. Also if you are using Ubuntu, the install process is easier. Simply download the .deb package then click next, next, finished and you are done. (That remind me a bit of the Windows installation)

In addition you can also add the below line to your sofware source under /etc/apt/sources.list so if VirtualBox has an update it will be included in your system update.

deb http://download.virtualbox.org/virtualbox/debian hardy non-free

Once you have add the above link to the software source, you can then download the Sun public key for apt-secure here. Once you have the key you will be able to download any update from Sun VirtualBox

Last but not least, once you have your VM set up and want to preform a backup you can always use the VBoxManage clone command to clone your VDI with a new UUID.

The below command allow me to clone the VDI name windows_xp_sp2.vdi and name the new one with SP2_bak.vdi and place it under your home directory.

VBoxManage clonevdi ~/.VirtualBox/VDI/windows_xp_sp2.vdi ~/SP2_bak.vdi

This is a very good way to preform backup of your VM also you can set up a template and keep manipulate them into different variations.

Enjoy!

Wednesday, September 17, 2008

Connect mysql via command line in Ubuntu (xampp)

Today I was trying to import my old dbs to my Ubuntu notebook (with XAMPP installed). While I was playing with the command line in Ubuntu, and using the mysql command to login to my db, it does not work! It complains command not found and ask me to install mysql-client.

Immediately I found out what the problem is. In Ubuntu a normal LAMP installation will place the mysql command under /var/run/, however xampp have everything in one place and thus the location to run mysql will be different from normal and thus when you run "mysql ..." in the terminal the system will complain and crap out.

After reviewing some info from the xampp site I found out that the mysql command is located under /opt/lampp/bin/ (provided you have xampp extract at the /opt/). Use cd to nav to the directory and key in

./mysql -p

This will get you in the mysql db with user = root and host = localhost

Enjoy!

Thursday, September 04, 2008

Hug a Developer

Base on true story :)