现在的位置: 首页 > 综合 > 正文

xp上搭建VirtualBox虚拟机ubuntu开发环境

2013年08月17日 ⁄ 综合 ⁄ 共 774字 ⁄ 字号 评论关闭

假设VB已经安装好,(也可以安装vmware,设置会有所不同)

1. 下载ubuntu server 11.04到桌面;

2. 在VB中新建虚拟机,依照界面引导安装,虚拟光盘就是下载到桌面的ubuntu iso;

3. 网络连接方式选择桥连接。选择nat方式的话,不做其它配置的话,宿主机无法访问到虚拟机;

配置网卡:

auto eth0
iface eth0 inet static
address 192.168.1.188
gateway 192.168.1.1
netmask 255.255.255.0

网关和宿主机上一样;

重启网络/etc/init.d/networking restart

4. xp 使用Secure CRT ssh登陆虚拟机。先在虚拟机上ifconfig活动虚拟机ip地址,在xp命令提示符中telnet 虚拟机ip 22,确认没问题,然后在CRT中建立连接登陆。

5. 现在可以通过ssh控制虚拟机了。

安装PHP及相关模块

1.下载php  wget /url/to/php/

2. tar -zxfv php-xxx.tar.gz

3. ........

安装mysql模块

1.进入php源码目录/ext/mysql

2.phpize(在/ur/local/php/bin下)

3.configure --with-php-config=/usr/local/php/bin/php-config --with-mysql=/usr/include/mysql/ 需要先安装libmysqlclient15-dev,apt-get install  libmysqlclient15-dev

4.make && make install

注意Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/

抱歉!评论已关闭.