Installing PhpVirtualBox under Ubuntu
On March 10,2022 by Tom RoutleyWhat is PhpvirtualBox ?
This is an open source implementation via Ajax/PHP. An administration interface intended for use in an Intranet to facilitate the task of system administrators who must manage a virtual computionenvironment without a GUI.
OS platforms
Installing PhpVirtualBox was carried out under an Ubuntu 10.04 LTS server and desktop version.
The version of VirtualBox installed on the OS is the 4.0.12 from Oracle.
For more information on installing virtualbox see this very good tutorial:
https://www.howtoforgeom/virtualbox_ubuntu
Prerequisites
Download the appropriate zip file acccording to the version of Virtualbox installed at the following address:
Create a folder named 'public_html' in your homedirectory.
mkdir public_html
Install the Oracle package: Oracle_VM_VirtualBox_Extension_Pack-4.0.12-72916.vbox-extpack
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.0.12-72916.vbox-extpack
Load the userdir module in apache2
sudo a2enmod userdir
Activation
To enable and use 'public_html' folder with php pages, edit the userdironf file located in:
sudo nano /etc/apache2/mods-available/userdironf
Comment the line below with a # in front #AllowOverride FileInfo AuthConfig Limit Indexes
Add at the top of the line AllowOverride All
Allow execution of PHP pages
Edit the 'php5onf' file located in:
sudo nano /etc/apache2/mods-available/php5onf
Comment the five lines below, as such:
#
#
#php_admin_value engine Off
#
#
Restart apache2 so that it takes all into account
sudo /etc/init.d/apache2 restart (or) service apache2 restart
Testing a single page in your 'public_html' folder
Create a file called index.php and add these lines inside:
cd public_html
touch index.php | echo "" > index.php
Test the page
Launch your web browser and enter the IP address of your server(or hostname):
Unzip the archive and rename it
unzip phpvirtualbox-4.0-7.zip -d ~/public_html
mv phpvirtualbox-4.0-7 phpvirtualbox
cd phpvirtualbox
Rename 'config.php-example' to 'config.php'
mv config.php-exemple config.php
nano config.php
Change the following lines replace 'vbox' and 'pass' by your 'user_name' and your 'password':
var $username = 'vbox';
var $password = 'pass';
At this point you can also modify the language settings:
var $language = 'fr_fr';
Start the vboxwebsrv executable in a terminal
/usr/lib/virtualbox/vboxwebsrv --background
The lines below should appear:
Oracle VM VirtualBox web service version 4.0.12 (C) 2005-2011 Oracle Corporation All rights reserved. 00:00:00.000 main VirtualBox web service 4.0.12 r72916 linux.x86 (Jul 15 2011 16:50:08) release log 00:00:00.000 main Log opened 2011-08-04T19:35:55.956308000Z 00:00:00.000 main OS Product: Linux 00:00:00.000 main OS Release: 2.6.32-33-generic 00:00:00.000 main OS Version: #71-Ubuntu SMP Wed Jul 20 17:30:40 UTC 2011 00:00:00.000 main OS Service Pack: #71-Ubuntu SMP Wed Jul 20 17:30:40 UTC 2011 00:00:00.000 main Executable: /usr/lib/virtualbox/vboxwebsrv 00:00:00.000 main Process ID: 3853 00:00:00.000 main Package type: LINUX_32BITS_UBUNTU_10_04 00:00:00.367 SQPmp Socket connection successful: host = default (localhost), port = 18083, master socket = 8
Test your phpvirtualbox in your web browser
Launch your web browser and enter the IP address of your server (or hostname):
http://ip_server/~user_name/phpvirtualbox
The default username 'admin' and Password: 'admin'
IMPORTANT: The people who put the 'phpvirtualbox' directory in /var/www/ will never see the VM created after first connection.
It is imperative to place this directory in the public_htmlof your homedirectory. That's why the tutorial begins with the activation of the userdir module in apache2.
Enable remote connection to the VM
Select the machine you want to start.
In Display and select Remote Desktop check box 'Enable server' ports ranging from 3389-4000.
Confirm by clicking OK
Start your virtual machine by clicking Start and look in 'View' you will see the connecting IP address and port assigned to see that machine.
Or simply click on the 'Console' and then click 'Connect'.
Launch a Terminal Server Client
Complete fields (eg 192.168.1.11:3389)
If it's a Windows based machine then select the 'RDPv5' protocol (for Linux use VNC protocol)
If VNCis not installed. You can install it with: sudo apt-get install vncviewer
You can use "Remote Desktop Viewer 'on the sole condition that the virtual machine allows the remote connection, otherwise the VM will not appear in the Remote Desktop Viewer.
Article Recommendations
Latest articles
Popular Articles
Archives
- November 2024
- October 2024
- September 2024
- August 2024
- July 2024
- June 2024
- May 2024
- April 2024
- March 2024
- February 2024
- January 2024
- December 2023
- November 2023
- October 2023
- September 2023
- August 2023
- July 2023
- June 2023
- May 2023
- April 2023
- March 2023
- February 2023
- January 2023
- December 2022
- November 2022
- October 2022
- September 2022
- August 2022
- July 2022
- June 2022
- May 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- October 2021
- September 2021
- August 2021
- July 2021
- January 2021
Leave a Reply