1.OSX Download and install VirtualBox
2. Create a new virtual machine (all options default)
3. Start the virtual machine and select the CentOS installation image Centos-6.7-x86_64-minimal.iso
This download is the smallest image, many software and desktop are not included, need to install
4. After the system is installed, install the Virtual enhancement tool
A. After installing the CentOS Minimal.iso, enter the terminal, the default is not open the network,
First, enable the network card to obtain IP automatically. Ifconfig eth0 up dhclient eth0
B. Installing the Desktop
Install x Window:yum groupinstall "x Window System" Install Gnome:yum groupinstall "desktop" (6.2 in Desktop is gnome) Modify the Id:3:initdefault in the/etc/inittab fileChange 3 to 5Id:5:initdefaultReboot the system reboot C. Installing the relevant components yum install GCC yum install kernel yum install kernel-devel yum groupinstall "De Velopment Tools "D. In the virtual machine, select Devices-insert Guest Additions CD image to mount the CD Cd/media mkdir additions CD/ Mount/dev/cdrom/media/additions cd/media/additions./vboxlinuxadditions.run Note: An error occurred during installation and you can view the/var/log/vboxadd-i Nstll.log files are installed with the enhanced tool, the mouse can switch between the host and the virtual machine freely. 5. Set up the shared folder A. In the VirtualBox "Settings-shared Folder" New Shared folders, select the Host shared folder directory/users/xxx/centosshare, set the shared folder name Centosshare, set the fixed allocation. B. Mount the shared folder cd/mnt mkdir share mount-t vboxsf Centosshare/mnt/share Mount succeeded 6. The above boot eth0 and Mount shared folder commands can be written to the/etc/rc.local file, so that each login automatically run.
OSX installs CentOS under VirtualBox