博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
phpvirtualbox访问Ubuntu虚拟机134-配置详情
阅读量:7041 次
发布时间:2019-06-28

本文共 7563 字,大约阅读时间需要 25 分钟。

  hot3.png

1、windows端安装phpvirtualbox运行环境(web server with php installed

首先,我们需要在windows平台设置并运行PHP。我们通过工具运行PHP运行环境。

2、windows端配置安装phpvirtualbox

1)、修改config.php文件

 Preferences -> Language in * phpVirtualBox. */var $language = 'en'; /* Set the standard VRDE Port Number / Range, e.g. 1010-1020 or 1027 */var $vrdeports = '9000-9100'; /* * * Not-so-common options / tweaking * */ // Multiple servers example config. Uncomment (remove /* and */) to use.// Add ALL the servers you want to use. Even if you have the server set// above. The default server will be the first one in the list./*var $servers = array(        array(                'name' => 'London',                'username' => 'user',                'password' => 'pass',                'location' => 'http://192.168.1.1:18083/',                'authMaster' => true // Use this server for authentication        ),        array(                'name' => 'New York',                'username' => 'user2',                'password' => 'pass2',                'location' => 'http://192.168.1.2:18083/'        ),);*/ // Disable authentication#var $noAuth = true; // Host / ip to use for console connections#var $consoleHost = '192.168.1.40'; // Disable "preview" box#var $noPreview = true; // Default preview box update interval in seconds#var $previewUpdateInterval = 30; // Preview box pixel width#var $previewWidth = 180; // Max number of progress operations to keep in listvar $maxProgressList = 5; // Change default preview aspect ratio to 1. // http://www.wikipedia.org/wiki/Aspect_ratio_%28image%29#Previous_and_presently_used_aspect_ratios#var $previewAspectRatio = 1.6; // Enable custom VM icons#var $enableCustomIcons = true; /*Exclusively use phpVirtualBox's groups configuration rather than VirtualBox groups.This has the following effects: *) Group changes made in phpVirtualBox will not be reflected in VirtualBox programs such asVirtualBox and VBoxManage*) Group changes will not affect which folder a VM is placed in*) You can rename groups that contain running VMs and move / copy running VMs to groups*/#var $phpVboxGroups = true;  /*Allow to prompt deletion hard disk files on removal from Virtual Media Manager.If this is not set, files are always kept. If this is set, you will be PROMPTEDto decide whether or not you would like to delete the hard disk file(s) when youremove a hard disk from virtual media manager. You may still choose not to deletethe file when prompted.*/var $deleteOnRemove = true; /* * File / Folder browser settings */ // Restrict file typesvar $browserRestrictFiles = array('.iso','.vdi','.vmdk','.img','.bin','.vhd','.hdd','.ovf','.ova','.xml','.vbox','.cdr','.dmg','.ima','.dsk','.vfd'); // Restrict locations / folders#var $browserRestrictFolders = array('D:\\','C:\\Users\\Ian'); // Or something like array('/home/vbox','/var/ISOs') // Force use of local, web server based file browser instead of going through vboxwebsrv#var $browserLocal = true; // Disable file / folder browser.#var $browserDisable = true; // Disable Windows drive detection#var $noWindowsDriveList = true; // Just list all drives from C:\ - Z:\ without checking if they exist or not.// This may be required on older Windows systems with more than one drive.#var $forceWindowsAllDriveList = true; /* * Misc */ /* * Auto-refresh interval in seconds for VirtualBox host memory usage information. * Any value below 3 will be ignored. */var $hostMemInfoRefreshInterval = 5; /* Show % of free host memory instead of % used */#var $hostMemInfoShowFreePct = true; /* * VM Memory warnings. *  * If $vmMemoryStartLimitWarn is enabled, each time a VM is started through * phpVirtualBox, it will check that the available host memory is greater than * the base and video memory of the VM + 50MB (a little bit of overhead). If it * is not, a confirmation dialog will be presented to confirm that you want to * start the VM. * * If $vmMemoryOffset is set (and $vmMemoryStartLimitWarn), $vmMemoryOffset * megabytes is subtracted from the available host memory before the check is * performed by $vmMemoryStartLimitWarn logic. For instance it may be a good * idea to always have VM memory requirements + 100MB free. 100 is the default. */#var $vmMemoryStartLimitWarn = true;#var $vmMemoryOffset = 100;  /* * Display guest additions version of a running VM on its Details tab */#var $enableGuestAdditionsVersionDisplay = true; /* Disable any of phpVirtualBox's main tabs */#var $disableTabVMSnapshots = true; // Snapshots tab#var $disableTabVMConsole = true; // Console tab /* Screen resolutions for console tab */var $consoleResolutions = array('640x480','800x600','1024x768','1280x720','1440x900'); /* Console tab keyboard layout. Currently Oracle's RDP client only supports EN and DE. */var $consoleKeyboardLayout = 'EN'; /* Max number of network cards per VM. Do not set above VirtualBox's limit (typically 8) or below 1 */var $nicMax = 4; /* Enable advanced configuration items (normally hidden in the VirtualBox GUI) * Note that some of these items may not be translated to languages other than English.  */#var $enableAdvancedConfig = true; /* Enable startup / shutdown configuration. * This only works in linux and you must add the vboxinit file to * your startup scripts list. */#var $startStopConfig = true; // Authentication library.var $authLib = 'Builtin'; // VM ownership#var $enforceVMOwnership = true; // Per-user VM quota#var $vmQuotaPerUser = 2;  // Allow VDE network configuration. This must be supported by the underlying VirtualBox installation!// If you do not know what VDE networking is - you do not need it, it is probably not supported by your// VirtualBox installation and will cause errors if enabled.#var $enableVDE = true;  // Disable setting SATA controllers port count to the max port number found when saving VMs.#var $disableSataPortCount = true; /* Enable Parallel Port configuration - EXPERIMENTALLPT support may or may not work for you. !!! VirtualBox LPT support only works in Linux. !!!*/#var $enableLPTConfig = true; /* Enable HardDisk IgnoreFlush configuration. This controls the "ExtraData" setting * in "VBoxInternal/Devices/[controller type]/0/LUN#[x]/Config/IgnoreFlush". See * Responding to guest IDE/SATA flush requests at: * http://www.virtualbox.org/manual/ch12.html#idp12757424*/#var $enableHDFlushConfig = true; var $vmConfigRefresh = true; /* END SETTINGS  */  }

注意:

重点修改,

用户名:

var $username = 'vbox';

密码:var $password = '123456';

SOAP URL of vboxwebsrv(not phpVirtualBox's URL)

var $location = 'http://192.168.232.134:18083/';

 

var $vmConfigRefresh = true; 

2)、配置vbox.cfg

$vi /etc/vbox/vbox.cfg

VBOXWEB_USER=root VBOXWEB_HOST=127.0.0.1 VBOXWEB_PORT=18083 VBOXWEB_TIMEOUT=300 VBOXWEB_CHECK_INTERVAL=5 VBOXWEB_THREADS=100 VBOXWEB_KEEPALIVE=100 VBOXWEB_LOGFILE=/var/log/vboxweb.log

3)、启动vboxweb-service

$service vboxweb-service start

#查看启动状态

$service vboxweb-service status

#查看端口情况

root@ubuntu:/home/hi# netstat -nap | grep vboxwebsrv

tcp        0      0 192.168.232.134:18083   0.0.0.0:*               LISTEN      6843/vboxwebsrv 

tcp        0      0 192.168.232.134:18083   192.168.232.1:2002      ESTABLISHED 6843/vboxwebsrv 

tcp        0      0 192.168.232.134:18083   192.168.232.1:2001      ESTABLISHED 6843/vboxwebsrv 

unix  3      [ ]         STREAM     CONNECTED     42199    6843/vboxwebsrv     

root@ubuntu:/home/hi# 

3)、授权

$vboxmanage setproperty websrvauthlibrary null

4)、访问phpvirtualbox

登录名:admin

密码:admin

 

 

更多相关链接:

如何管理远程无外设服务器上的VirtualBox虚拟机

http://blog.csdn.net/mengxiangbaidu/article/details/7231149 

CentOS6.4下安装配置phpVirtualBox

CentOS6.4下安装配置phpVirtualBox

RHEL6下排除phpVirtualBoxSELinux的冲突 

 剩余待解决问题:

1)、

转载于:https://my.oschina.net/HIJAY/blog/369170

你可能感兴趣的文章
ES6入门---let和const
查看>>
Codepen 每日精选(2018-4-10)
查看>>
git学习笔记
查看>>
Thinking——Debian On Windows初试
查看>>
看完你也想编写自己的 react 插件
查看>>
数据结构与算法:常见排序算法
查看>>
记录一次并发读取MongoDB的踩坑过程
查看>>
初识JavaScript EventLoop
查看>>
MVC是什么
查看>>
关于 emotion 初步使用的笔记
查看>>
PHP 怎样在同一个域名下两个不同的项目做独立的登录机制?
查看>>
SpringCloud(第 005 篇)电影微服务,注册到 EurekaServer 中,通过 Http 协议访问用户微服务...
查看>>
k-邻近算法(kNN)
查看>>
gulp基础和常用插件介绍
查看>>
开发之路(设计模式六:命令模式上)
查看>>
JavaScript:并发模型与Event Loop
查看>>
CSS揭秘之《条纹背景》
查看>>
用Kettle从excel中将导入oracle数据库的简单方法
查看>>
【跨域】跨域的简易实现和测试
查看>>
获得字符串包含↵,渲染到页面不换行的解决办法
查看>>