Linux

How to install centOS in VirtualBox?

CentOS Installation

Step 1: In order to install and run centOS, you must have a minimal ISO copy so that you will be able to do some practical stuff with. To download one, go to the URL mentioned in the picture below and click on “Minimal ISO“.

download centos minimal iso

Step 2: Now as shown below, you must be having several options, they are direct download links for the ISO file and you can select any one of them, in order to download the file.

download centos minimal iso from available mirrors

Step 3: After downloading and having the file on your local machine, it is now time to “open Virtualbox” on your computer/laptop/mac/machine and from there click on the “New” as shown below.

create a new virtual machine in virtualbox

Step 4: Now you have to give a “name” and “type” as well as “version” to your virtual machine, we have given “name = centos-docker“, “type = Linux” and “version = Red Hat (64bit)” because “centos” works on same source code but with different open source license conditions, which let users use it for free of cost.

name a new virtual machine in virtualbox

Step 5: It is time to allocate the amount of RAM/Memory to your centOS virtual machine, we have given 2048 MB (2 GB) which is sufficient for us.

give memory size to a virtual machine in virtualbox

Step 6: We also have to select the type of “virtual hard disk”, so we have selected “VDI = virtualbox disk image” which is native to virtualbox.

hard disk option for virtual machine in virtualbox

Step 7: After select the type of hard disk, we also have to state that whether we want to create the virtual hard disk now or not, so we have opted for “create a virtual hard disk now“.

select type of hard disk for a virtual machine in virtualbox

Step 8: Now, we also have to specify the “location” and “size” of our virtual hard disk, so for “location = we have gone for default” and for “size = we have specified 8.00 GB”.

file location and size of a virtual machine in virtualbox

Step 9: After creating and setting the basic requirements for our virtual machine, for advance options we have to specify some other settings as well, so to do that, click on the “settings” as shown below.

edit settings of a virtual machine in virtualbox

Step 10: It is time to attach our previously downloaded “centOS ISO” file to out virtual machine, so to do that do as shown in the picture.

attach an iso image of file to a virtual machine in virtualbox

Step 11: In order to attach the “ISO file“, navigate through your system where you have saved it.

select an iso image for attaching it in virtualbox

Step 12: After attaching the file, you will be seeing something like shown in the picture.

information after attaching iso file in virtualbox

Step 13: To switch on your virtual machine, you need to click the “start button“.

click on start button to start the virtual machine in virtualbox

Step 14: After that, below shown is the “first screen” to you, and from there you need to select the “Install CentOS 7” option, in order to start the installation procedure.

first boot screen in centOS

Step 15: Now, it is time to select the “language” and “region“, we have selected as per our requirements, you should select as per yours.

select region and language in during centOS installation

Step 16: There are several things/options which needs to be set in order to process further, “installation source = local media“, “software selection = minimal install” and “installation destination = automatic partitioning“.

options to set during centos installation in virtualbox

Step 17: Your CentOS installation must be in progress till now, and there are two more options which need to set, “root password = set-a-secure-password” and “user creation = any-name-of-your-choice“.

set root password and create user during centos installation

Step 18: After setting both, you will be seeing something like shown in the picture below.

root password and user has been created during centos installation

Step 19: You must wait a few minutes, and after that you will see something like shown below, and congratulations your centOS installation has been completed successfully.

centos installation has been completed in virtualbox

Step 20: It is time to “log in” into our new created virtual machine of centOS, in our case we have set, “username = centos” and “password = top-secret“.

centos login prompt

RECOMMENDED

Comment here