Install and configure phpVirtualBox in CentOS6.4

Source: Internet
Author: User
Tags egrep

Install and configure phpVirtualBox in CentOS6.4

Environment list:

CentOS-6.4-x86_64-minimal.iso

Dkms-2.2.0.3-1

VirtualBox-4.2.14-86644-Linux_amd64.run

Phpvirtualbox-4.2-4

Oracle_VM_VirtualBox_Extension_Pack-4.2.14-86644
Click the list name to download

Virtual machines are an indispensable learning tool for a web-based maintenance personnel. VirtualBox is favored by me for its powerful functions, high flexibility, and cross-platform features. This configuration is based on the web VirtualBox (phpVirtualBox), as follows:

EnvironmentDeployment

CentOS installation # skipped

Disable iptables # Skip

Disable Selinux # skipped

Install the required package:

[Root @ vqiu ~] # Yum-y installgccmake unzipperlwgethttpdphpphp-mysqlphp-pearphp-soapaprapr-util-sqliteapr-util-ldapr-util

1. Install kernel-devel

[Root @ vqiu ~] # Rpm-qa | egrep "^ kernel-[0-9] | kernel-devel"

Kernel-2.6.32-358.el6.x86_64

Install the kernel package

[Root @ vqiu ~] # Yuminstall kernel-headers kernel-devel

Run the command again to check whether the system has been installed. if the version is consistent (important), restart the system.

[Root @ vqiu ~] # Rpm-qa | egrep "^ kernel-[0-9] | kernel-devel"

Kernel-devel-2.6.32-358.11.1.el6.x86_64

Kernel-2.6.32-358.el6.x86_64

Kernel-2.6.32-358.11.1.el6.x86_64

If it is too troublesome, you can directly execute yum-y install update

2. Install DKMS

Because virtualBox runs in the DKMS kernel by default, DKMS must be installed.

[Root @ vqiu ~] # Rpm-ivhhttp: // linux.dell.com/dkms/permalink/dkms-2.2.0.3-1.noarch.rpm

3. Install VirtualBox

1) install yum. This method is recommended.

[Root @ vqiu ~] # Cd/etc/yum. repos. d/

[Root @ vqiu ~] # Wgethttp: // download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

[Root @ vqiu ~] # Yum-y install VirtualBox-4.2

Or

2) download the official package, upload the VirtualBox-4.2.14-86644-Linux_amd64 to the system, execute the file

[Root @ vqiu ~] # Sh VirtualBox-4.2.14-86644-Linux_amd64.run

............

We hope that you enjoy usingVirtualBox.

If the installation is successful, run the following command to test whether the startup is successful.

[Root @ vqiu ~] #/Etc/init. d/vboxdrvsetup

StoppingVirtualBoxkernel modules [OK]

Uninstalling oldVirtualBoxDKMS kernel modules [OK]

Trying to register theVirtualBoxkernel modules using DKMS [OK]

StartingVirtualBoxkernel modules [OK]

# Here through, not through can view the diary/var/log/vbox-install.log to find the reason.

[Root @ vqiu ~] # Useradd-gvboxusers-s/sbin/nologinvbox

[Root @ vqiu ~] # Passwdvbox

Create a file

[Root @ vqiu ~] # Vi/etc/default/virtualbox

VBOXWEB_USER = vbox

[Root @ vqiu ~] # Chkconfig -- levels 235vboxweb-service on

[Root @ vqiu ~] # Servicevboxweb-service start

[Root @ vqiu ~] # Netstat-tnlp

4. Configure phpVirtualBox

[Root @ vqiu ~] # Wgethttps: // phpvirtualbox.googlecode.com/files/phpvirtualbox-4.2-4.zip

[Root @ vqiu ~] # Unzip phpvirtualbox-4.1-7.zip

[Root @ vqiu ~] # Mvphpvirtualbox-4.1-7/var/www/html/vbox

Edit configuration file

[Root @ vqiu ~] # Cd/var/www/html/vbox

[Root @ vqiu ~] # Cpconfig. php-exampleconfig.php

[Root @ vqiu ~] # Viconfig. php

[...]

Var $ username = 'vbox ';

Var $ password = 'password set earlier ';

Install the extension package:

[Root @ vqiu ~] # Wgethttp: // response

[Root @ vqiu ~] # VBoxManageextpackinstallOracle_VM_VirtualBox_Extension_Pack-4.2.14-86644.vbox-extpack

Start web

[Root @ vqiu ~] # Servicehttpdstart & chkconfighttpdon

Enter http: // ip/vbox in the browser

(Default user name and password: admin)

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.