官网地址:https://github.com/laruence/yaf
基础环境
最基本的几个软件应该有的。
Homebrew,PHP,Nginx,MySQL(暂时用不到)。
或者,电脑应该有一个PHP的开发环境。
本次的环境:
1 | ➜ ~ php -v |
安装扩展
直接采用brew进行扩展安装。
brew install php71-yaf
检查:
1 | ➜ ~ php -m | grep yaf |
表示yaf的扩展安装完成。
配置项目
仓库地址:https://github.com/laruence/yaf
1 | git clone https://github.com/laruence/yaf |
配置虚拟主机
我的环境目录:
1 | ➜ conf.d pwd |
新建虚拟主机
检查nginx配置文件
1 | ➜ conf.d nginx -t |
重启nginx服务
1 | brew services restart nginx |
配置hosts
sudo vim /etc/hosts
1 | # yaf api |