How To Download Centos For Virtualbox

Posted on

If you want to learn how to administer a Linux server or have a need to test your application on a specific Linux distribution, a good point of start is to virtualize it locally using VirtualBox.This post explains how get CentOS up and running on OS X. Our goal here is to install minimal Linux server and access it for administration via ssh from your Host operating system. We will also enable the Guest system to act like a web server.

If you don't have VirtualBox already go to download page and install it. Serial number on gopro.

To get an image of CentOS go here and choose the version you want (I went for 6.5) by clicking on x86_64 then pick one of the mirror servers for downloading the desired image (my choice was CentOS-6.5-x86_64-minimal.iso).

Oct 25, 2018 - Follow the steps below to install the VirtualBox on your CentOS 7 machine. Download the Oracle Linux repo file to /etc/yum.repos.d directory. CentOS 6.7 32-bit ISO: Download Link (~354 MB) {Note: Download the minimal. Go ahead download and install Virtual Box (the download link is given above. The CentOS Linux distribution stable, Predictable Red Hat. Download and install VirtualBox from its official website, and make sure that you had downloaded. How to Install CentOS 6.3 Linux in Oracle VirtualBox/SSH access/Port forwarding Standard 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. Feb 13, 2019 - Download CentOS VM virtual machine (VHD, VDI, VMDK) images for VMware and VirtualBox and run CentOS inside your primary operating.

Instalation steps.

Run VirtualBox

  • Clik New.
  • Choose the Name of you choice, Linux for Type, Red Hat 64 bit for Version.
  • Give at least 1024 MB of memory.
  • Check Create a virtual hard drive now
  • Hard drive filetype: VDI.
  • Storage on physical hard drive: Dynamically allocated.
  • File location and size: leave 8 GB for the size.
Download

Go to Settings

  • System -> Processor: set 2 cores.
  • Mount the operating system disk image of Cent OS minimal that you have downloaded earlier: select storage tab, select Empty in Storage Tree frame. In Attributes section browse to your iso by clicking the cd icon.
  • Click start (the green arrow) - this will start the installation process in graphical mode.
  • Choose the first option.
  • Skip the media test.
  • Choose the language.
  • Check the basic storage devices button.
  • The next screen will ask you to discard data - click yes.
  • Provide a server name and a root password.
  • Choose replace existing linux in one of the following screens.
  • Reboot after installation.

After rebooting log in in the terminal with the root user and the password you created during installation.

Connection to the Internet

If you run ifconfig in the Guest console, the only network interface listed is lo (loopback device). The first action to take in this case will be setting up another two interfaces: one for accessing the Internet, second for connecting the Guest Linux from your Host OS via ssh.

To enable eth0 (access to the network) edit /etc/sysconfig/network-scripts/ifcfg-eth0 and change ONBOOT to yes. Restart the network service by running: service network restart. You can check your internet connection with ping centos.org (all must be done as root, not via sudo).

Host to Guest ssh connection

Shut down your Guest VM.

Go to VirtualBox -> Preferences, pick the Network and Host-only Network tab. Click plus on the right hand (Add host-only network) to create vboxnet0.Then go to your Guest VM settings, tab Network -> Adapter 2. Click Enable Network Adapter and choose Host-only Adapter.Now boot up your Guest VM, navigate to /etc/sysconfig/network-scripts/ and create a new file ifcfg-eth1 with the following content:

Run ifup eth1.

The last thing will be opening port 22. Go to the Guest VM settings - Network - Adapter 1 - port forwarding - add and set Host and Guest ports to 22.

Now you should be able to connect to your Guest VM from your Host OS terminal: ssh [email protected] with the root password.

From now on you can administrate the CentOS server without switching to the VirtualBox instance console.

Download Centos For Virtualbox

Enable the Guest VM to act like a web server.

First you have to open port 80 on your Guest machine. To to this edit the file /etc/sysconfig/iptables and add the following line: -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT.Restart the network service: service network restart.To test the server you can use python's SimpleHTTPServer: create a new folder for storing your http content, for example /var/www and place there a new index.html file with a content of your choice.Now run python -m SimpleHTTPServer 80. This command will start a http server listening on port 80.If you navigate a browser to http://192.168.56.101 you should be able to see the content of your index.html file.

To take the burden of remembering the IP number off your memory, let's create an easy to remember host name, both for ssh and http access.Edit the /etc/hosts file (on your Host) and attribute the IP an easy to remember name, for example: 192.168.56.101 centos.local.

Now you can access your Guest VM by ssh [email protected] and check the web server using the http://centos.local url.

How To Download Centos For Virtualbox

If you've come so far, it means that you have succesfully installed your Linux distribution.Now you are ready to dig for more information about how to install the technology stack of your choice.