Recently, we need to test some middleware Products in different environments. Because there is no redundant hardware, we need to consider using virtual machines. When I first started using VMWare, But it occupied a large amount of memory (even when the virtual machine was not started), and the system was always very slow after installation, and there was no good solution, we accidentally discovered that sun had acquired a virtual machine named virtualbox, and the product was free of charge. I found some articles and found that the review was acceptable. The key was that it occupied a small amount of resources.
Since centos was used all the time, centos 5.4 was installed in virtualbox. After installation, it was found that the enhancement feature was not always installed. It was too troublesome to switch the mouse manually each time.
Find some information, saying that some things are not correctly installed, so follow the instructions to perform the following operations in the terminal in sequence:
- # Yum install kernel-devel
- # Yum install gcc
All of the above operations require that the virtual machine can log on to the Internet normally because the updated content needs to be downloaded. In addition, because all GCC-related packages are selected when centos is installed, the download content of the second operation is update. The preceding two steps determine the execution speed based on network conditions.
Then, enter the following content in the terminal:
# Ln-S/usr/src/kernels/2.6.18-164.15.1.el5-I686/usr/src/Linux
The bold part can be directly supplemented by the "tab" key.
All the above operations on the terminal can be performed on the terminal at any location. To ensure security, all terminals directly use "Application System"-"attachment"-"terminal", open the terminal, and locate "root ".
Because the virtualbox "device" -- "Install enhancement" has been executed before, there is a name on the desktop: vboxadditions_3.1.6_59338 virtualbox virtual optical drive (the name may vary depending on the virtualbox version). Double-click to open multiple files (after performing the preceding operations, double-click Autorun. sh file should be automatically installed ).
Finally, locate the opened folder, right-click the folder and enter the following content in the terminal:
# Sh VBoxLinuxAdditions-x86.run
The virtual opportunity automatically installs the enhancement function, restarts the virtual machine, and you no longer need to switch back and forth manually!
Description: host environment: Windows XP SP3, virtualbox 3.1.6 r59338; Virtual Machine: centos 5.4, and the desktop environment is used; When a virtual machine is created, the selected operating system type is RedHat; the network connection mode is the default "Nat". The installed virtual machine has only one root user.
It is said that the "Nat" network connection mode and the network connection content of all virtual machines must be carried out through the network of the host. Therefore, the network speed may be slow when the host and Virtual Machine access the network at the same time.
In addition, the virtualbox website clearly states that it supports centos, but why not directly provide centos options when adding new virtual machines?