Virtualbox+phpvirtualbox full virtualized environment deployment on CentOS 7

Source: Internet
Author: User
Tags oracle vm virtualbox vm virtualbox vmware server

I. Introduction of Phpvirtualbox

VirtualBox is a set of x86 virtualization products for different operating systems. It is a machine/hardware virtualization product that is functionally similar to VMware Server, Parallels Workstation, QEMU, KVM, and Xen, and supports a variety of guest operating systems, including Windows. Its supporters claim that it is "the only professional solution under the GNU general public License (GPL) that is free from open source programs". It is easy to install and use, although it is less efficient than operating system-level virtualization programs that modify the Linux kernel, such as KVM-like efficiency. Benefits include:

1. RPM Components Available

2. Active Community Support

3. Perform various guest operating systems

4. Good hardware access support, including sound, USB, and serial port

5. Support for many main operating systems

Phpvirtualbox is an open source VirtualBox web interface, a PHP-based VirtualBox front-end interface that can be managed by the browser for VirtualBox hosts, and the Web interface uses AJAX technology When VirtualBox is managed remotely in a browser, it looks similar to the local VirtualBox console. Features of Phpvirtualbox:

      1. Turn on/off virtual machines

      2. Snapshot View virtual machine

      3. Configuring Virtual Machine Media Management

      4. Create Virtual Machine Wizard Global Network configuration

      5. Import/export virtual machine Access virtual Machine console

      6. Multi-lingual support

Virtualbox

Http://download.virtualbox.org/virtualbox/5.1.2/

Phpvirtualbox

Https://sourceforge.net/projects/phpvirtualbox/?source=typ_redirect

The following is the deployment process for the Virtualbox+phpvirtualbox full virtualized environment on CentOS 7

second, the installation process 1. Install dkms (Dynamic Kernel Module)

When installing VirtualBox, you need to create a kernel module. If DKMS (Dynamic Kernel Module support) has been installed, it will be applied and will simplify kernel upgrades. We recommend that you first install the DKMS from the EPEL Software library before installing VirtualBox.

Yum Install epel-release-7-5. Noarchyuminstall dkms
2. Install the development environment and kernel:

If you do not use DKMS, the development environment and the source code for the kernel are still not installed:

Yum ' Development Tools ' SDL Kernel-devel Kernel-headers
3. Installing Virutalbox

Add VirtualBox Source

cd/etc/Yumrepos.d/&&  sudowget http://  Download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo

Download install repository authentication key file

wget -Q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc-- Import ORACLE_VBOX.ASC

View and install VirtualBox

Yum check-update  yum list|  grep  virtualboxyuminstall virtualbox-5.1. x86_64

If the development environment has been set correctly, this installer will create the Vboxusers group and the kernel modules it requires.

4. Download and install the virutalbox Enhancement Pack

Only after installing VirtualBox enhancement, can we make the function of sharing clipboard, folder sharing and so on between host and virtual machine, in order to use it properly

Command installation

Cd/tmp &&wgethttp//Download.virtualbox.org/virtualbox/5.1.2/oracle_vm_virtualbox_extension_pack-5.1.2.vbox-extpackvboxmanage ExtpackInstalloracle_vm_virtualbox_extension_pack-5.1.2. vbox-Extpack0%...Ten%... -%... -%... +%... -%... -%... -%... the%... -%... -%successfully installed"Oracle VM VirtualBox Extension Pack".

Graphical installation

5. Start VirtualBox

Execute as a member of the Vboxusers group VirtualBox

VirtualBox &

command-line mode startup

Graphical Start-up

Start configuring Phpvirtualbox Below

6. Create user, and add to Vboxusers group
Useradd VBox passwd  -G vboxusers VBox

In the future, each user who executes the VirtualBox will also add additional groups Vboxusers

Usermod-a-G vboxusers User name
7. Install Apache2, PHP and Modules

Yum install httpd php php-devel php-gd php-common Php-soap
8. Download Phpvirtualbox, unzip to the appropriate directory
wget http://ufpr.dl.sourceforge.net/project/phpvirtualbox/phpvirtualbox-5.0-5.zip Unzip phpvirtualbox-5.0-5. Zip MV phpvirtualbox-5.0-5 /var/www/html/phpvirtualbox### #更改权限 chown -R Vbox:vbox   /var/www/html/phpvirtualbox/
9. Copy and modify the configuration file

Copy configuration file

CP /var/www/html/phpvirtualbox/config.php-example/var/www/html/phpvirtualbox/config.php

Modifying a configuration file vim/var/www/html/phpvirtualbox/config.php

[...] var $username = ' VBox '; var $password = ' VBox '; [...]
10. Create this configuration file/etc/default/virtualbox
Vi/etc/default/virtualbox

The content is as follows, Vboxweb-service need to access when booting

Vboxweb_user=vbox
11. Start Vboxweb-service
Systemctl Restart  vboxweb-/etc/init.d/vboxweb-service start

Check if Port 18083 is listening after boot

[Email protected] tmp]# netstat  -nltp|  grep18083tcp        0      0127.0.  0.1:18083    0.0.  0.0:*   LISTEN      10717/vboxwebsrv
12. Restart Apache
systemctl Restart httpd/etc/init.d/httpd restart
13 Firewall Settings
# #Addfirewall-cmd--permanent--zone=public--add-port=/tcp# #Reloadfirewall- CMD--reload

Access to http://localhost will display Apache pages

14 Turn off SELinux

Permanently closed

vi /etc/sysconfig/selinux### #Change the line as shown below.[ ...] SELINUX=disabled[...]

Temporarily shut down to avoid restarting

0
15. Verification

Http://server_IP_address/phpvirtualbox

Username = Admin

Password = admin

Different warnings for VirtualBox and Phpvirtualbox versions

Reference:
    1. Installing VirtualBox in CentOS 7 Headless Server with support for Phpvirtualbox
    2. Installing and using VirtualBox on CentOS

    3. Install ' Phpvirtualbox ' to Manage VirtualBox Virtual machines via Web Browser in Linux
    4. https://www.linuxhelp.com/how-to-install-phpvirtualbox-in-centos-manage-virtualbox/

    5. http://solutionsatexperts.com/how-to-install-virtualbox-phpvirtualbox-on-centos-redhat/

Virtualbox+phpvirtualbox full virtualized environment deployment on CentOS 7

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.