oracle linux 6.5 安装 virtualbox1.安装依赖包yum -y install gcc kernel-uek-devel kernel-PAE-develwget http://linux.dell.com/dkms/permalink/dkms-2.2.0.3-1.noarch.rpmrpm -ivh dkms-2.2.0.3-1.noarch.rpm 2.下载virtualbox包https://www.virtualbox.org/wiki/Linux_Downloadswget http://download.virtualbox.org/virtualbox/4.3.6/VirtualBox-4.3-4.3.6_91406_el6-1.x86_64.rpm 3.下载virtualbox扩展包 http://www.downloadcrew.com/article/20279-virtualbox_extension_pack4.安装依赖 yum install gcc-c++ libcap-devel libcurl-devel libIDL-devel libstdc++-static \ libxslt-devel libXmu-devel openssl-devel pam-devel pulseaudio-libs-devel \ python-devel qt-devel SDL_ttf-devel SDL-static texlive-latex wine-core \ device-mapper-devel wget subversion subversion-gnome kernel-devel \ glibc-static zlib-static glibc-devel.i686 libstdc++.i686 libpng-devel5.安装virtualbox [root@oracle-v src]# rpm -ivh VirtualBox-4.3-4.3.6_91406_el6-1.x86_64.rpm warning: VirtualBox-4.3-4.3.6_91406_el6-1.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 98ab5139: NOKEYPreparing... ########################################### [100%] 1:VirtualBox-4.3 ########################################### [100%]Creating group 'vboxusers'. VM users must be member of that group!No precompiled module for this kernel found -- trying to build one. Messagesemitted during module compilation will be logged to /var/log/vbox-install.log.Stopping VirtualBox kernel modules [ OK ]Uninstalling old VirtualBox DKMS kernel modules [ OK ]Trying to register the VirtualBox kernel modules using DKMSError! echoYour kernel headers for kernel 2.6.32-431.el6.x86_64 cannot be found at/lib/modules/2.6.32-431.el6.x86_64/build or /lib/modules/2.6.32-431.el6.x86_64/source. [FAILED] (Failed, trying without DKMS)Recompiling VirtualBox kernel modules [FAILED] (Look at /var/log/vbox-install.log to find out what went wrong)重新启动后问题解决[root@oracle-v ~]# /etc/init.d/vboxdrv setupStopping VirtualBox kernel modules [ OK ]Uninstalling old VirtualBox DKMS kernel modulesError! There are no instances of module: vboxhost4.3.6 located in the DKMS tree. [ OK ]Trying to register the VirtualBox kernel modules using DKMS[ OK ]Starting VirtualBox kernel modules [ OK ]6.安装扩展[root@oracle-v ~]# VBoxManage extpack install /usr/src/Oracle_VM_VirtualBox_Extension_Pack-4.3.6.vbox-extpack 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%Successfully installed "Oracle VM VirtualBox Extension Pack".7.http://sourceforge.net/projects/phpvirtualbox/unzip phpvirtualbox-4.3-0.zip[root@oracle-v ~]# mkdir -p /data/www[root@oracle-v ~]# mv /usr/src/phpvirtualbox /data/www/phpvir8.配置vboxweb-server[root@oracle-v ~]# cat /etc/vbox/vbox.cfg VBOXWEB_USER=rootVBOXWEB_HOST=localhostVBOXWEB_PORT=18083VBOXWEB_TIMEOUT=300VBOXWEB_CHECK_INTERVAL=5VBOXWEB_THREADS=100VBOXWEB_KEEPALIVE=100VBOXWEB_LOGFILE=/var/log/vboxweb.log9.启动[root@oracle-v ~]# /etc/init.d/vboxweb-service start10.设置授权[root@oracle-v ~]# VBoxManage setproperty websrvauthlibrary null11.修改配置文件[root@oracle-v ~]# cd /data/www/phpvir/[root@oracle-v phpvir]# vim config.phpvar $username = 'root';var $password = '123456';var $language = 'en';var $vrdeports = '9000-9100';var $cachePath = '/data/www/vm';12.安装apache+phpyum -y install httpd php修改httpd.conf配置文件将:DirectoryIndex index.html index.html.var改为:DirectoryIndex index.php index.html index.html.var添加如下内容:AddType application/x-httpd-php .phpDocumentRoot "/data/www/phpvir"13.添加php扩展模块yum -y install php-soapvim /etc/php.iniextension = soap.so