Wednesday, February 15, 2017

Installing and running Linux(CentOS 6) in VirtualBox

I have just installed CentOS 6.0 in a VirtualBox on My Windows PC .

My Pc configuration :
OS : Windows 10 64 bit
RAM : 8GB


You  need to follow three steps to  install and run the CentOS in a virtual Box.

Step 1.
1. Download Virtualbox (if you don't know what is VirtualBox find the details in wikipedia )
2. Download the CentOS vdi file
3. Download Winrar (if not done already)

Step 2.
1. Install virtual box
2. Unzip CentOS 7z file

Step 3.
Configure and Run  CentOS



Steps are in details below :

Step 1: 
1. Download the Virtual Box.
You can download the Virtualbox  from
https://www.virtualbox.org/wiki/Downloads

At the time of writing this post the latest version of virtualbox was 5.1.14
this is the direct link   Windows hosts

if above link doesn't work go directly to the Virtualbox website.





If you successfully download the file you will have a file with the following name : "VirtualBox-5.1.14-112924-Win.exe"



2. Download the CentOS 6.0  7z file .

This download will take time depending on your net speed.
Below is the direct link:
http://sourceforge.net/projects/virtualboximage/files/CentOS/6.0/CentOS-6-Gnome-i386.7z/download



If your download is succefull you should have a file with the following name "CentOS-6-Gnome-i386.7z" in your Hard disk.



3.  Download Winrar (if not done already). You will need winrar to unzip the CentOS compressed file.

Note : you  can use the Unarchiver in mac os for unziping the file:
https://itunes.apple.com/app/the-unarchiver/id425424353?mt=12&ls=1




If your Download is succesfull you should have a file with the following name "winrar-x64-540.exe". You need to install the file by double clicking on it. i am not going in to more details



Step 2 :

1. Install Virtual Box by double clicking  on the following file "VirtualBox-5.1.14-112924-Win.exe".  you should see the dialog below : Click "Next"





Click "Next"































Click "Next"































Click "Yes"































Click "Install"



Wait and Click "Next"






Click "Finish"



















Great ! you have successfully installed the virtual box. now you will have to create a new virtual machine  




2. Unzip CentOS 7z file







After extracting you should have the following files.

















Step 3.
Configure and Run  CentOS. Click on the "New" button to start creating a new Virtual Machine.



 Type as “CentOS_6_32bit” or anything you want. Set the type as “Linux“, Version as “Red Hat 32 bit“. And press “Next”.




Allocate memory. i have 8 GB memory so i have assigned  3GB. if you have less you can assign 1-2 GB.

Select the vdi file by clicking on the open directory icon.





Select the .vdi file from your hard disk









Click the "Create" Button
























Almost done ! now start the Virtual Machine by double clicking the the selected item or by click on "Start" button.




























If the virtual machine run successfully you should see the following login screen.

Login to the CentOS either root or centos user:


UserName : centos
Password: reverse

 User name : root
Password: reverse































Done ! enjoy learning Linux. ๐Ÿ˜ƒ๐Ÿ˜‚




Please Note : I have used CentOS for this blog post. but the same steps should work if you want to run other linux distribution. for example Fedora or Ubuntu. you just have to download the related linux vdi file instead of CentOS.

If you want to know more abut Ubunto vs CentOS please read the following blog
https://www.futurehosting.com/blog/what-is-the-difference-between-centos-and-ubuntu-server/



Also you might want to the install the guest addition for better performance and usability
https://www.virtualbox.org/manual/ch04.html#idm1721

just make sure to run the folowing 3 commad before installing the guest addition
yum update
yum install kernel-headers kernel-devel
yum install gcc

then reboot the linux to get the effect . enjoy !





2 comments:

  1. I must say it's a great tutorial for beginners.
    Anyone with no knowledge on Linux can understand it.

    ReplyDelete

5 Strategies for Getting More Work Done in Less Time

Summary.    You’ve got more to do than could possibly get done with your current work style. You’ve prioritized. You’ve planned. You’ve dele...