LNMP虚拟机开发环境配置--vagrant+virtualbox+ubuntu14.04

工作一直用的是别人打包好的虚拟机开发环境,感觉确实很酷。所以准备自己配个开发环境,为之后自己开发一些有趣的东西做准备。

ok,开始~~~

一、安装软件 vagrant和virtualbox

此处需注意:正常使用虚拟机需要开启电脑的VT功能(进入bios设置)

二、下载vagrant box文件。网址http://www.vagrantbox.es/,我选择下载了ubuntu box

三、在pc上建立你的工作文件夹,将box文件复制到该文件夹

四、参照网址操作https://segmentfault.com/a/1190000000264347

  注意:若出现以下报错,可参考网址http://www.phperz.com/article/15/0604/132225.html安装virtualbox增强工具

==> default: Mounting shared folders...
    default: /vagrant => E:/VmWork/ubuntu14.04
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:

mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant

The error output from the last command was:

stdin: is not a tty
mount: unknown filesystem type 'vboxsf'
五、LNMP安装
第一步:vagrant ssh 进入虚拟机,设置root密码 sudo passwd ,更新列表和软件 sudo apt-get update,sudo apt-get upgrade
第二步:参照网址:http://www.cnblogs.com/ilanni/p/4631149.html安装
六、编译yaf框架
1.切换到root。命令 su
2.安装
sudo apt-get install php5-dev ,sudo apt-get install libncurses5-dev,sudo apt-get install libpcre3 libpcre3-dev 
3.参考网址:http://www.linuxde.net/2013/07/14805.html(注意网页中获取yaf的网址是错误的,正确网址是:http://pecl.php.net/get/yaf-2.2.9.tgz
七、vagrant roload vagrantup 报错
错误1:The provider 'virtualbox' that was requested to back the machine 'default' is reporting that it isn'....
解决:改变pc的环境变量名为以下图片显示名。

错误2:The following SSH command responded with a non-zero exit status. Vagrant ass
解决:登陆虚拟机,在/etc/sudoers中添加

 

 

 

 

 

 

转载于:https://www.cnblogs.com/duogu-wjm/p/6144317.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值