Installation of "phpVirtualBox" Using 'PhpVirtualBox' Manage VirtualBox Web By Amit Pandey

Опубликовано: 10 Октябрь 2024
на канале: Vacnic IT Solution
6,067
26

Amitechnology
  / amitechnology  
http://ami9.com
  / amit9echnology  
  / ami9com  
https://plus.google.com/+AmiTechnolog... is an online VirtualBox front-end written in PHP that permits you to get to and control remote VirtualBox cases. It tries to look like the VirtualBox GUI however much as could reasonably be expected to make work with it as simple as would be prudent. It is a decent substitution for the VirtualBox GUI in the event that you run VirtualBox in headless servers
Manage a Headless VirtualBox Installation with phpVirtualBox Ubuntu 16.04 LTS






495 useradd -m vbox -G vboxusers
496 passwd vbox
497 vim /etc/default/virtualbox
498 systemctl enable vboxweb-service
499 systemctl start vboxweb-service
500 apt-get -y install apache2 libapache2-mod-php7.0 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libapr1 php7.0-common php7.0-mysql php7.0-soap php-pear wget
501 systemctl restart apache2.service
502 cd /var/www/html
503 wget http://downloads.sourceforge.net/proj...
504 unzip phpvirtualbox-5.0-5.zip
505 ls
506 mv phpvirtualbox-5.0-5 phpvirtualbox
507 cd /var/www/html/phpvirtualbox/
508 cp config.php-example config.php
509 vim config.php
510 vim /etc/default/virtualbox
511 systemctl restart vboxweb-service


2 Installing phpVirtualBox
First, create a system user called vbox and add it to the vboxusers group:
useradd -m vbox -G vboxusers ( vbox can be your user name which user have virtualbox installed)
Create a password for the vbox user:
passwd vbox
Create the file /etc/default/virtualbox and put the line VBOXWEB_USER=vbox in it (so that the VirtualBox SOAP API which is called vboxwebsrv runs as the user vbox):
vim /etc/default/virtualbox
VBOXWEB_USER=vbox ( vbox is a user name you can replace
Next create the system startup links for vboxwebsrv and start it:
systemctl enable vboxweb-service
systemctl start vboxweb-service
We need a web server with PHP support to serve phpVirtualBox - I'm using Apache2 here. Install Apache and PHP as follows:
apt-get -y install apache2 libapache2-mod-php7.0 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libapr1 php7.0-common php7.0-mysql php7.0-soap php-pear wget



Restart Apache:
systemctl restart apache2.service
I want to serve phpVirtualBox from Apache's default virtual host with the document root /var/www/html (I will install it in /var/www/html/phpvirtualbox) - if you have a different document root, you must adjust the following steps:
cd /var/www/html
wget http://downloads.sourceforge.net/proj...
Unzip phpVirtualBox and rename the phpvirtualbox-5.0-5 to phpvirtualbox for ease of use:
unzip phpvirtualbox-5.0-5.zip
mv phpvirtualbox-5.0-5 phpvirtualbox
Next go to the /var/www/phpvirtualbox/ directory...
cd /var/www/html/phpvirtualbox/
... and create the file config.php by copying it from config.php-example:
cp config.php-example config.php



Open config.php and fill in the password you created earlier for the vbox system user:
vim config.php
[...]
/* Username / Password for system user that runs VirtualBox */
var $username = 'vbox';
var $password = 'secret';
[...]
Now you can open a browser and access phpVirtualBox as from browser
http://www.example.com/phpvirtualbox/
or By IP:
http://192.168.1.100/phpvirtualbox/
/?auther=1