For installing this flavor of Linux I am going to use Cent OS 6.3 x86_64 minimal version [Don’t be fooled by its name "minimal"] and Oracle Virtual box 4.2.6 x86. These are the current releases of both softwares.What do you need for this:
1. A computer which can run oracle virtual box [ can be Windows or Mac OS X ]
2. Cent OS 6.3 ISO – No need to burn a disk for this and you can download it here [Under CD and DVD Iso images click on x86_64 and then click on one of the mirrors to download it. Look for the file name CentOS-6.3-x86_64-minimal.iso to download, if this link becomes invalid, then browse for other mirrors]
3. Oracle Virtual box 4.2.6 and you can download it here
4. SSH Client for accessing your Cent OS Linux VM Server Secure Shell. I recommend KiTTY for SSH and you can download it here or you can download Putty here
Alright, now that you have downloaded both CentOS 6.3 and Oracle Virtual Box 4.2.6 you can start installing the Linux server.
1. Installing oracle virtual box on your computer – Step by step process with screen shots
change the installation location if you have disk space constraint on your primary hard disk. See the screen shot below and update the location by browsing to the location where you want to install.
In the next screen as shown below you will see a warning message about your network interfaces going away, yes as of this version of virtual box, it does disconnect you from your internet and so be prepared for a quick network interruption.
At this point you have a successfully installed virtual box on your computer. Go ahead and click finish to launch the program
2. Now that you have your virtualization software installed you are now ready to install CensOS 6.3 server in oracle virtual box – Step by step process with screen shots
Click on new to create a new virtual machine [Keyboard shortcut : CTRL+N to create a new VM]
Name it appropriately and hit next. [If you want to install more virtual machines you want a follow good naming convention, avoid naming it too generic]. I named it as opensourcedbms_testbed. Dont worry about what version on Linux you are going to put over there as CentOS is not listed under there. We can mention it has RedHat 64bit or Fedora 64bit as these are close cousins of Cent OS.
Give appropriate memory size you want to allocate to your VM. depending on you main computer memory. I suggest for a basic Cent OS Linux server give at-least 1 GB and this can be modified at any time. If you give memory less than 1GB your CentOS Server will switch to text mode installation down the line rather than GUI. So stick with 1GB memory for now.
In the next screen its going to ask you to create a virtual hard drive and that’s what we want for a new server installation.
One nice thing in virtual box is that it can create virtual machines hard disk in multiple formats, I am not going to discuss which one is better over the other for now. I will choose the default one VDI (VirtualBox Disk Image).
In the next screen it will ask you how it wants to store this data on your main hard disk. Pick dynamically allocated to keep the size growing when needed. Fixed option will just use up all the space even if the CentOS VM does not physically use it.
In the next screen you can define the max hard disk size for this virtual machine. You can change the location of where you want to store this on your disk if want to place this virtual machine hard disk other than default. Hit create after you change the parameters as you desired.
Now you are done creating environment for your CentOS 6.3 Linux Server. Before you start the server installation we need to tweak certain things to mount the operating system ISO disk and some performance enhancements for the installation of operating system in this VM.
Select virtual machine and click settings.
Add some CPU cores to the VM if needed
Now mount the operating system disk image of Cent OS minimal that you have downloaded earlier. Browse to the download location for this image in your main computer to mount it.
Once you pick the operating system image it will indicate that as shown below and now click ok and come out from settings.
Now you are ready to install Cent OS 6 Server in your VM. Go ahead and click start after selecting your VM in virtual box.
Once you click start you virtual machine starts up for the first time in a new window. Pay attention to the little red circle I drew to indicate how to release your mouse once you are inside the VM. You need to hit Right CTRL to release your mouse from your virtual machine. Hit enter inside this console window to begin installation.
Choose Install or upgrade an existing system and hit enter [its the default option]
In the next step it will request for a disk check. You can do it, I am skipping it as I am confident that my ISO image is good. Right arrow on you key board to move the highlighter onto skip option and hit enter to continue. At this point it will switch installation to Graphical user interface[GUI] mode.
Select basic storage devices as we fall under that category
In the next screen it will ask to discard any data that exists in the hard disk that you created earlier for this VM. Go ahead and say yes to that. Note : This is not going to discard any of your main hard disk data. Only discard the VM HDD drive that you created along the way which should be empty any way.
Name your new CentOS VM Server. Name to what ever you want this server to be called as.
pick a time zone for the Cent OS VM server
Enter a password for root user. If you are a newbie to Linux, root user is like administrator.
In this screen you can choose how to layout your partitioning schema. I am not covering how to change default partitioning schema[Custom partitioning] here. Pick the default option "replace existing systems". This will clean wipe the VM HDD one more time and layout partitioning schema to install CentOS Server.
Go ahead and write changes to disk and viola ! Cent OS will start installing in your Virtual Machine.
Congratulations ! you now have successfully installed Cent OS Linux Virtual Machine Server.
Restart and log into the console for enabling SSH access from out site virtual box into virtual machine. Use root as login and the password that you have setup for root user earlier in the Cent OS Server installation.
login into console
Now before you do anything we need to disable SELINUX. I am assuming you know a little bit of vi editor here, which is the default text editor in Cent OS Linux. If you do not know how to use vi editor please read about it a bit before you proceed further.
Edit the file /etc/sysconfig/selinux to disable it. Change the string from SELINUX=enforcing to SELINUX=disabled. Save it and exit.
Now SELINUX is disabled. We now need to fix our networking. To do that we need to edit our network file at this location : /etc/sysconfig/network-scripts/ifcfg-eth0
Remove HWADDR line and change ONBOOT="no" to ONBOOT="yes". Save the file and exit. Now the changes are made restart network for gaining network access to this server. To restart network simply run the command "service network restart"
Now we have network to our server.
Almost done and we are at our final stretch. We just need to open up port 22 from outside this server to make the SSH connection come into server. To do that open up VM settings one more time from main virtual box window [Leave the console window behind – no need to shutdown].
Click on Network navigation item and then click on port forwarding
Add port 22 to the list of ports that you want main computer forward into this guest Cent OS virtual machine. Save these settings and you are ready to access this Cent OS VM server secure shell from any where in your network. You can also forward other ports like 80/3306/5432 etc if you want to make this VM a web-server or database server in future. One modification that you might have to do it enable that new port in your iptables and restart iptables for server to start listening to that port.
Go ahead and allow its access from main host.
3. Accessing CensOS 6.3 server secure shell from outside oracle virtual box – Step by step process with screen shots
Fire up the SSH client that you downloaded earlier
Put localhost or your main computer name for host name and hit enter to connect to secure shell of you newly installed CentOS 6 Server.
Login with root / password [That you creating for root while installing Cent OS Operating system] and there you are in your Cent OS Server Console.






This is going to be very useful for me thank you very much for posting
Pingback: CENTOS install via .iso
Thank you very much.. This post very helpful and helped me much.. This tutorial worked for installing CentOS 6.4 in Virtualbox..
This webpage is really very helpful. Thanks…
Very Useful. Thank you.
owh man, i’m so happy with guys like you! thx!
Wonderful step by step description.
Worked like a charm. Thanks.
Used this instruction for Oracle Linux 6 installation. Perfect. Thanx m8.
The instructions worked great. Thank you.
It works, thank you 😉
Very clean and perfect.
Thanks.
Where is the like button 🙂 Thanks
Pingback: Centos 6.4 in VirtualBox VM on Mac OS Lion + Windows + SSH | Think Beyond
Very nice tutorial.. I just loved it and was able to install CentOS on my system. Many thanks!!
Great! Its really helpful. Thanks!
Awfully helpful !! extremely thankful to you Prashanth for the efforts and amazing help. Keep it up. 🙂
Thank you Prashanth, very helpful.
Thank you. The instructions were very clear and everything worked.
Thank you so much! Awesome how to, worked perfectly. You rock!
thx, that helped a lot!!
thanks a lot
Awesome post Prashanth !! My Heartful Thanks to such a step-by-step post which can help Newbies like me……Much Appreciated!!
Thank you, works like a charm.
Pingback: Configuring Oracle VMlocal | Resume JRC – Web Professional
Thanks a lot mate. I was browsing lot of sites to get this information. Here is where I found straight forward steps.
Your tutorial is awesome man! Thanks a lot.
Can you tell me how to handle multiple VM instances from the putty session? I can’t use the same "localhost" as the hostname, right? How do I take care of this situation?
Thanks Prashanth Goriparthi
PRASHANTH,
Very Good tutorial.
It was a cake walk to install the cent OS on the VM box.
Thanks a lot.
Poongs
Thank you for posting this solid and helpful instruction set!
Thank you so much!
Thanks for this description 🙂
thanks!!
very good tutorial, thanks 😀
nice centos tutorial.. 🙂
very helpful post! thanx a lot. Used it to install virtualbox 4.3 and CentOS 7.
Pingback: Linux Centos 6.3 | Kuplux's
nice article, thanks good 😉
perfect thanks
Hi, I have installed virtual box 5.0.10 on my Windows 8.1 64-bit Host and I want to install Linux on it. But when I am going to select Linux OS it is installing 32-bit OS. How I can 64-bit Linux OS on it.
Wonderful… I was struggling to connect my RHEL6 on Oracle virtual box.. And this page helped me a lot…
Thanks a lot dear…
It was much helpful…
Handsoff of the explanation….
Thank you very much. This is very usefull and each step worked 100%.
Wonderful explanation. It helped me a lot.
Very useful. Thank you for sharing 🙂
Thank you very much
The problem has been solved !
Thanks you very much for the snaps added to make the installation process clear.
I need a help to connect to the server as i m bit confused to give the network path and using VI editor.
Wonderful explanation Thanks!
Every step perfect thank you bro
Really thank you a lot!
I had problems with tutos on YouTube and I was disappointed and now I’m really happy to find this so explicitly explain!
Thaaannnkkk yyyooouuu