In this tutorial, we will show you how to install and configuration of phpVirtualbox on your Ubuntu 15.04 server. For those of you who didn’t know, phpVirtualBox is an open-source, a web-based client written using PHP. It can be used to manage and administer Oracle VirtualBox headless instances.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you through the step by step installation phpVirtualbox on Ubuntu 15.04 server.
Install PhpVirtualbox on Ubuntu 15.04
Step 1. First, make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.
sudo apt-get update sudo apt-get upgrade
Step 2. Install LAMP server.
A Ubuntu 15.04 LAMP server is required. If you do not have LAMP installed, you can follow our guide here. Also, install the required PHP modules:
sudo apt-get install php5 php5-mysql libapache2-mod-php5 php-soap
Step 3. Install phpVirtualbox.
Download the latest stable version of phpVirtualbox, At the moment of writing this article it is version 5.0-3:
wget http://sourceforge.net/projects/phpvirtualbox/files/phpvirtualbox-5.0-3.zip sudo unzip phpvirtualbox-5.0-3.zip sudo rm -f phpvirtualbox-5.0-3.zip sudo mv phpvirtualbox-5.0-3 /var/www/html/phpvirtualbox
We will need to change some folders permissions:
chown www-data:www-data -R /var/www/html/phpvirtualbox
Step 4. Configure phpVirtualBox.
We need to modify the phpVirtualBox configuration to make the successful communication with VirtualBox installation, first we need to rename the sample config file (config.php-example to config.php):
sudo cp /var/www/html/phpvirtualbox/config.php-example /var/www/html/phpvirtualbox/config.php sudo nano /var/www/html/phpvirtualbox/config.php
Change the user name and password to that user there is running Virtualbox:
[...] var $username = 'idroot'; var $password = 'password'; [...]
VirtualBox setup creates init script vboxweb-service when it is installed, this is used to start and stop the vboxwebserv, before starting the service, we need to have /etc/default/virtualbox file because it contains settings for the service. We need to create it manually if it does not exists:
sudo nano /etc/default/virtualbox
You should add this line in the file:
Now you should start the vboxweb-service, and make it start automatically on boot:
sudo /etc/init.d/vboxweb-service start
Step 5. Accessing phpVirtualbox.
phpVirtualbox will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com/phpvirtualbox or http://server-ip/phpvirtualbox and complete the required steps to finish the installation. Where the default phpVirtualBox’s username name and password is admin/admin. If you are using a firewall, please open port 80 to enable access to the control panel.
Congratulations! You have successfully installed a phpVirtualbox. Thanks for using this tutorial for installing phpVirtualbox in Ubuntu 15.04 system. For additional help or useful information, we recommend you to check the official phpVirtualbox website.