ubuntu安装phpVirtualBox web服务
2017-04-10 09:47
225 查看
首先确保已经安装好了 virtualbox,打开了 vboxweb-service
然后, Installing Apache2 + phpVirtualBox:
$ sudo apt-get install apache2 php5 libapache2-mod-php5 unzip
$ wget http://downloads.sourceforge.net/project/phpvirtualbox/phpvirtualbox-4.3-1.zip $ sudo unzip phpvirtualbox-4.3-1.zip -d "/var/www" && sudo mv /var/www/phpvirtualbox-4.3-1 /var/www/phpvirtualbox
STEP TWO [Configuring/completing your installation]
Before we can finish configuring phpVirtualBox, we need to create a dedicated account that phpVirtualBox can use to control VirtualBox. In this example, I will be using the username vbox.
$ sudo adduser vbox --ingroup vboxusers
$ sudo passwd vbox
Finally, we want to edit the configuration of phpVirtualBox and VirtualBox with this information.
$ sudo mv /var/www/phpvirtualbox/config.php-example /var/www/phpvirtualbox/config.php
$ sudo vi /var/www/phpvirtualbox/config.php
Update the fields as follows:
/* Username / Password for system user that runs VirtualBox */
var $username = 'vbox';
var $password = 'your_password_here';
/* SOAP URL of vboxwebsrv (not phpVirtualBox's URL) */
var $location = 'http://localhost:18083/';
Additionally, if you would like to disable username authentication:
/* Disable authentication */
var $noAuth = true;
These variables may require some tweaking depending on your environment. For more information, please visit the phpVirtualBox configuration section on their Wiki.
Once you have completed editing your phpVirtualBox config, we want to edit the VirtualBox configuration.
$ sudo vi /etc/default/virtualbox
Add the following line:
VBOXWEB_USER=vbox
Next, we need to modify the Apache configuration file to point to our "phpvirtualbox" directory.
$ sudo vi /etc/apache2/sites-enabled/000-default.conf
Modify the DocumentRoot to our new phpvirtualbox location:
DocumentRoot /var/www/phpvirtualbox
To finalize your installation, restart the services with the following command:
$ sudo service apache2 restart && sudo service vboxweb-service restart
STEP THREE [Testing/optimizing your installation]
Congratulations! Your installation should be completed. To verify it is working, please visit:
http://your_IP_address
You should be greeted with a "Username" and "Password" Log in window:
Default username: admin
Default password: admin
转自: http://www.serveradventures.com/the-adventures/virtual-machines-in-ubuntu-server-virtualbox-phpvirtualbox
$ sudo ls /etc/init.d | grep vboxweb-service
然后, Installing Apache2 + phpVirtualBox:
$ sudo apt-get install apache2 php5 libapache2-mod-php5 unzip
$ wget http://downloads.sourceforge.net/project/phpvirtualbox/phpvirtualbox-4.3-1.zip $ sudo unzip phpvirtualbox-4.3-1.zip -d "/var/www" && sudo mv /var/www/phpvirtualbox-4.3-1 /var/www/phpvirtualbox
STEP TWO [Configuring/completing your installation]
Before we can finish configuring phpVirtualBox, we need to create a dedicated account that phpVirtualBox can use to control VirtualBox. In this example, I will be using the username vbox.
$ sudo adduser vbox --ingroup vboxusers
$ sudo passwd vbox
Finally, we want to edit the configuration of phpVirtualBox and VirtualBox with this information.
$ sudo mv /var/www/phpvirtualbox/config.php-example /var/www/phpvirtualbox/config.php
$ sudo vi /var/www/phpvirtualbox/config.php
Update the fields as follows:
/* Username / Password for system user that runs VirtualBox */
var $username = 'vbox';
var $password = 'your_password_here';
/* SOAP URL of vboxwebsrv (not phpVirtualBox's URL) */
var $location = 'http://localhost:18083/';
Additionally, if you would like to disable username authentication:
/* Disable authentication */
var $noAuth = true;
These variables may require some tweaking depending on your environment. For more information, please visit the phpVirtualBox configuration section on their Wiki.
Once you have completed editing your phpVirtualBox config, we want to edit the VirtualBox configuration.
$ sudo vi /etc/default/virtualbox
Add the following line:
VBOXWEB_USER=vbox
Next, we need to modify the Apache configuration file to point to our "phpvirtualbox" directory.
$ sudo vi /etc/apache2/sites-enabled/000-default.conf
Modify the DocumentRoot to our new phpvirtualbox location:
DocumentRoot /var/www/phpvirtualbox
To finalize your installation, restart the services with the following command:
$ sudo service apache2 restart && sudo service vboxweb-service restart
STEP THREE [Testing/optimizing your installation]
Congratulations! Your installation should be completed. To verify it is working, please visit:
http://your_IP_address
You should be greeted with a "Username" and "Password" Log in window:
Default username: admin
Default password: admin
转自: http://www.serveradventures.com/the-adventures/virtual-machines-in-ubuntu-server-virtualbox-phpvirtualbox
相关文章推荐
- Ubuntu 11.04 安装nginx+php5+mysql 的web服务器
- Ubuntu 11.10 安装nginx+php5+mysql 的web服务器
- ubuntu 12.04 安装 nginx+php+mysql web服务器
- ubuntu 12.04 安装 nginx+php+mysql web服务器
- Ubuntu Server 14.04 安装+安全Web服务器(linux+apache+mysql+php)搭建流程(更新)
- Ubuntu 11.04 安装nginx+php5+mysql 的web服务器
- Ubuntu Server系列各项服务的安装和维护 PHP的配置
- ubuntu 12.04 安装 nginx+php+mysql web服务器
- 安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情7. 安装 PHP PHP 是用于 web 基础服务的服务器端脚本语言。它也经常被用作通用编程语言。在最小化安装的 CentOS 中安
- ubuntu 12.04 安装 nginx+php+mysql web服务器
- ubuntu 11.10下面安装apache+php+mysql+phpadmin搭建web环境
- 在ubuntu 下安装基于 Tomcat6的web服务
- Linux系统:Ubuntu Samba服务安装与配置,VirtualBox中增加全屏显示
- 在 Ubuntu 14.10 Server 上安装 Jetty 9(Java服务引擎和Web服务器)
- ubuntu 11.10下面安装apache+php+mysql+phpadmin搭建web环境
- Ubuntu下Nginx的安装及WEB服务配置
- [shell]CentOS 5.6安装web服务及相关软件(php 5.3, MySQL Server, memcache, spawn-fcgi, nginx, coreseek)
- ubuntu 12.04 安装 nginx+php+mysql web服务器
- windows系统中ubuntu虚拟机安装及web项目到服务上(二)
- [转] ubuntu 12.04 安装 nginx+php+mysql web服务器