Ubuntu上也可以用Valet了:Laravel Valet For Ubuntu


如果你使用的是Mac的话,你应该已经感受过Valet作为Laravel本地开发环境的便捷,比如我已经不用Homestead好多年。好消息是,在Ubuntu系统上现在我们也可以使用Valet了。

Valet for Ubuntu是专门为Ubuntu系统定制的精简版本,基于Valet v1并且使用的是Caddy服务器。安装也很简单,首先确保你运行的Ubuntu系统是15.04及以上版本,以保证对应的PHP版本>=5.6.4,然后,你需要安装这些依赖和扩展包:

sudo apt-get install libnss3-tools jq xsel

还要安装这些PHP扩展包(已安装忽略):

php*-cli php*-common php*-curl php*-json php*-mbstring php*-mcrypt php*-opcache php*-readline php*-xml php*-zip

最后我们使用Composer安装Valet:

composer global require cpriego/valet-ubuntu
valet install

这样,我们就可以在Ubuntu上使用Valet的完整特性了,Valet使用文档请参考:https://laravelacademy.org/post/5792.html,更多详情请参考其Github主页:https://github.com/cpriego/valet-ubuntu


点赞 取消点赞 收藏 取消收藏

<< 上一篇: Laravel Valet 2.0 版本已发布,内置服务器替换成 Nginx

>> 下一篇: Laravel Cast 教程总结系列:精通 Sublime Text