Tech Junkie Blog - Real World Tutorials, Happy Coding!: Linux CentOS In-Depth: Installing CentOS On VirtualBox

Tuesday, July 3, 2018

Linux CentOS In-Depth: Installing CentOS On VirtualBox

If you are a startup or an entrepreneur, learning Linux is essential. Most of the open source and latest innovations starts out with Linux such as Docker.  That's because Linux is for the most part free and has a great community of techies supporting it.  Even Microsoft loves Linux now, it even made a commitment by releasing SQL Server on Linux.  Although it could  be a fling, instead of a long term engagement.  Also if you noticed the Virtual Machines on the clouds are cheaper if you choose the Linux version.  In this series on Linux I will go over what you need to do to get yourself started on Linux.  The best way to learn about Linux is to install it on a Virtual Machine.  We could host it on the cloud, but then we need to pay for it.  There are some free-tiers but they are limited.  So we are going to use VirtualBox from Oracle to host our CentOS instance.

On the previous blog we went over how to create a new virtual machine for CentOS in VirtualBox.  In this blog we will go over how to install the CentOS ISO file on the new virtual machine that we've just created. Below are the step by step instructions of how to install CentOS on VirtualBox.

Step-By-Step Instructions:

1. Launch VirtualBox, right-click then select "Settings"

2.  Click on "Storage", you will see the disc icon is "Empty"

3.  Select the "Empty" disc icon, the right hand side will change to "CD/DVD Drive", click on the disc icon next to the drive, like the screen shoot below.

4.  Browse to the CentOS ISO file that you've just downloaded in the previous blog.  Select the .iso file then click on the "Open" button.

5.  The disc icon will now have the CentOS iso file mounted, click on the "OK" button

6. In VirtualBox, click, right click on the CentOS machine and click "Start"

7.  An Installation screen will appear press the "I" key to choose the installation option, which is the first option on the screen.  Then press "Enter"

8.  The CentOS iso file will be run to install the CentOS operating system

9. In the welcome screen select "English" as the language for the installation.

10.  Then click "Continue"

11.  A prompt will come up to say that your mouse will be captured in the virtual machine, check "Do not show this message again", then click "Capture".  Make a note that host key is defined as the "Right Ctrl" key.  This key will allow you to release the mouse from the virtual machine when you want your mouse click back on the host machine.

12. If you see the red warning text on the "INSTALLATION DESTINATION" icon click on the icon

13.  In the next screen select the default settings and click "Done".  This screen just allows you to configure your virtual hard disk.  You can choose to encrypt the hard disk or create another partition on the disk if you want on this screen, but for now we just want to keep things simple so we will keep the default settings.  I have given my VM a disk space of 64 GB

14.  Now the red warning text is gone because we've confirm the hard disk configuration

15.  The next step is that you have to enable the network by click on the "NETWORK & HOST NAME" setting

16.  In the "NEWTORK & HOST NAME" screen make sure you have the following settings.  This is the steps that most people forget to do.  CentOS does not enable networking by default you can do it manually on the command line, but doing it during the install is much easier.
  • Host name: your host name goes here
  • Make sure networking is turned on
  • Click "Done" when you are done

17. We are now ready to proceed with the installation.  Click on the "Begin Installation"

18.  On the next screen you will be prompted to set the root user's password, and create a default user before you can proceed, so click on the "Root Password" icon first

19.  Set the root user's password in the "Root Password" and "Confirm" form fields, make sure the password string are the same in both form fields, then click on the "Done"

20.  Now the "Root Password" icon is set to blue instead of red, we can continue with the installation now, however we want to set up a default user so that we don't have to use the root user if we don't have to, so click on the "User Creation" icon

21.  Type in the user's name in the "Full name" form field, the "User name" field will be auto populated, just accept the default user name.  Then check the "Make this user Administrator" check mark.  Click "Done" to create a new user.

22.  After you finish creating the user you will see "Finish configuration" button.  Click on it.

23.  You will get the "Complete" and "Reboot" button, click on the "Reboot" button to reboot the virtual machine

24.  After a system reboot, a text login prompt is displayed

25.  Login with the user that you created during the installation.

You now have CentOS installed in your Oracle VirtualBox.  In the next blog we will go over how to install a lightweight desktop GUI to our CentOS.

26.  After logging in, type "sudo yum update" to install the latest updates

Similar Posts:

1 comment:

Search This Blog