Install CentOS7 in VirtualBox
Installation environment: win764-bit Operating System
Software: VirtualBox-4.2.12-84980-Win.exe
CentOS image: CentOS-7.0-1406-x86_64-DVD.iso
The installation of VirtualBox is not described here. It mainly records some problems encountered during the installation process.
1. Change yum Source
Here we use the 163 source, http://mirrors.163.com/. click the centoshelper, as shown in
Perform operations according to the instructions. Currently, the website does not provide a repo file for CentOS7. You can download the repo file for CentOS6 and modify the file as follows:
Change the RPM-GPG-KEY-CentOS-6 In the repo file to a RPM-GPG-KEY-CentOS-7, which can be found at http://developer.centos.org/centos/, as shown in
After modifying the repo file, run
[Plain] view plaincopy
- Yumcleanall
- Yummakecache
The image source is updated.
2. Install the VisualBox Enhancement Tool
Choose "device"> "Install enhancement" from the menu bar of VisualBox, as shown in.
The installation image is automatically loaded to the optical drive. Run the following command under the permissions of the Super administrator:
[Plain] view plaincopy
- [Root@localhostVBOXADDITIONS_4.2.12 _ 84980] #./VBoxLinuxAdditions. run
The following error may occur during installation:
[Plain] view plaincopy
- BuildingtheVirtualBoxGuestAdditionskernelmodules [failed] (Lookat/var/log/vboxadd-install.logtofindoutwhatwentwrong)
The cause of the problem is that compilation is required when the enhancement function is installed. Therefore, you need to execute the following command:
[Plain] view plaincopy
- Yuminstallkernel-headers
- Yuminstallkernel
- Yuminstallgcc *
- Yuminstallmake
After the update is complete, check whether the kernel version is consistent with the installed gcc, make, and kernel-headers. The command for viewing the kernel version is as follows [plain] view plaincopy
- Rpm-qa | grepkernel * | sort
If the version is the same, you must
Restart Linux (select the updated kernel to enter the system), and then install
Now we have installed CentOS7 in VirtualBox. If you have any questions, please contact us.