Install VirtualBox on Fedora 18, 19, 20

Last Update (Jan 24 2014): Update for Fedora 20

This procedure is to install VirtualBox on Fedora 18, Fedora 19 and Fedora 20. You can also use the same procedure to install VirtualBox on Fedora 15, Fedora 16 and Fedora 17. 

If you had follow my post before and confident with my script, you can scroll down to the bottom of the post and download the script. The script will automatically download, configure and install VirtualBox.

Manual Procedure
First, you need to download the repository file from VirtualBox using the following command:
wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo 

If your system could not recognize wget using the command to install wget:
sudo yum install wget


Then you need to move the file "virtualbox.repo" to the folder /etc/yum.repos.d/. In the terminal, navigate to the location where you kept the file and use the command:
sudo mv virtualbox.repo /etc/yum.repos.d/

Then you need to install gcc, kernel-devel and dkms:
sudo yum install gcc kernel-devel dkms

To install the latest version of VirtualBox use the command:
sudo yum install VirtualBox-4.3


If you prefer the older version of VirtualBox just change the version number such as:
sudo yum install VirtualBox-4.2
sudo yum install VirtualBox-4.1
sudo yum install VirtualBox-4.0
sudo yum install virtualbox-3.2
sudo yum install virtualbox-3.1
sudo yum install virtualbox-3.0


Automation Script
I've created an automation script that perform the previous steps and install the latest version of VirtualBox. You can download this script FC00-vbox-install-noarch. If you prefer to install the older version, you need to modify the script.

The entire script is listed below:
#! /bin/bash

# IMPORTANT: READ THE FOLLOWING
# This script is to install VirtualBox in Fedora
# This script must be used with root access 
# This script will download the repository file for yum from http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
# Then this acript will move the repo file to the yum depository folder at /etc/yum.repos.d/
# VirtualBox need to recompile the kernel, if you have just updated a new kernel, you should reboot the system before running this script

# Downloading repo file
echo "Downloading repo file from VirtualBox..."
yum install -y wget
wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo

# Move repo file to the repositary directory
echo "Moving VBox repo file to Yum repo folder..."
if [ -f virtualbox.repo ]; then 
 mv virtualbox.repo /etc/yum.repos.d/
 echo "Done!"
else 
 echo "Could not find the file virtualbox.repo! Please check your Internet connection!"
 echo "If you download the file manually, make sure that the file is place in the same directory as this script"
 exit 1
fi


# Installation of VirtualBox
echo "Installing files required for running VBox..."
yum install -y gcc kernel-devel dkms

echo "Installing VirtualBox...."
yum install -y VirtualBox-4.3

echo "Installation Complete"

Please remember to change the script to execution mode:
chmod +x FC00-vbox-install-noarch

To run the script use the command:
sudo ./F00-vbox-install-noarch


*** End ***

Comments

Popular posts from this blog

Revive Old Mac Mini (2009) with Linux

Configure Unattended Upgrades on Raspberry Pi

Install and Configure RealVNC in Linux Ubuntu 18.04 LTS