Install VirtualBox on CentOS7

Source: Internet
Author: User
Yesterday I installed VirtualBox for centos6.5, but it didn't take a day. today I am idle. try centos7. as a result, PS younger brother is also a beginner of linux. many of them just found a solution, but I don't know why, don't blame O (& cap ;_& cap;) O ha! 1. install centos7, which is much simpler than the old version. 2. configure the network connection. after installing centos, use ifconfig to check whether or not

Yesterday I installed VirtualBox for centos6.5, but it didn't take a day. today I am idle. try centos7. as a result, PS younger brother is also a beginner of linux. many of them just found a solution, but I don't know why.

Strange O (∩ _ ∩) O ha!

1. install centos7, which is much simpler than the old version.

2. configure the network connection. after installing centos, use ifconfig to check that there is no IP address. solution:

Cd/etc/sysconfig/network-scripts/

Vi ifcfg-eno16777736 # note, we usually see if1__eth0, what is specific, use ifconfig to see.

ONBOOT = yes # set onboot to yes

Restart the NIC:/etc/init. d/network restart

2. install virtualbox:

1> Download the RHEL software library configuration file of VirtualBox:

[Cpp]View plaincopyprint?
  1. Cd/etc/yum. repos. d
  2. Wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

2> install RPMForge.

First

For more information, see http://wiki.centos.org/zh/additionalresources/repositories/rpmforge.

[Cpp]View plaincopyprint?
  1. Rpm-ivh rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

3> install DKMS (Dynamic Kernel Module)

[Python]View plaincopyprint?
  1. Yum install dkms

4> install the development environment and kernel:

[Cpp]View plaincopyprint?
  1. Yum groupinstall "Development Tools"
  2. Yum install kernel-devel

5> install qt and qt-

[Cpp]View plaincopyprint?
  1. Yum install qt qt-x11
6> install VirtualBox

I downloaded it on the official website first, the version is VirtualBox-4.3-4.3.26_98988_el7-1.x86_64.rpm, https://www.virtualbox.org/wiki/Downloads

[Cpp]View plaincopyprint?
  1. Yum install VirtualBox-4.3-4.3.26_98988_el7-1.x86_64.rpm

7> installation extension:

[Cpp]View plaincopyprint?
  1. VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.16-95972.vbox-extpack

This is a problem.

VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ExtPackFile, interface IExtPackFile, callee nsISupports
VBoxManage: error: Context: "Install (fReplace, NULL, ptrProgress. asOutParam ()" at line 1140 of file VBoxManageMisc. cpp

However, virtualbox already exists in the system, so you can ignore this problem and continue with the next step.

[Cpp]View plaincopyprint?
  1. 8>/etc/init. d/vboxdrv setup

Here an error occurs:

Building the VirtualBox Guest Additions kernel modules [FAILED]
Your system does not seem to be set up to build kernel modules.
Look at/var/log/vboxadd-install.log to find out what went wrong.
Once you have corrected it, you can run/etc/init. d/vboxadd setup to build them.
View error logs:
/Tmp/vbox. o/Makefile. include. header: 97 :***
Error: unable to find the source of your current Linux kernel. Specify KERN_DIR = And run make again. Stop.

Solution:

 

[Cpp]View plaincopyprint?
  1. Yum install kernel
  2. Yum install kernel-devel
  3. Yum install kernel-headers
  4. Yum install gcc *
  5. Yum install make
  6. Reboot

Restart

[Cpp]View plaincopyprint?
  1. /Etc/init. d/vboxdrv setup

Success!

 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.