cd /usr/local/src git clone -b php5 https://github.com/laruence/yaf.git 若是是php7 git clone https://github.com/laruence/yaf.git /usr/bin/phpize ./configure --with-php-config=/usr/bin/php-config make make install
解決:php
extension=yaf.songinx
php -m | grep yaf
生成一份sample應用,運行代碼生成工具
/usr/local/src/yaf/tools/cg/yaf_cg yaf-sample
cp -R /usr/local/src/yaf/tools/cg/output/yaf-sample /www/git
配置虛擬目錄(apache、nginx)github
<VirtualHost *:80> DocumentRoot "/www/yaf-sample" ServerName yaf-sample.dev ErrorLog "/private/var/log/apache2/yaf-sample.dev-error_log" CustomLog "/private/var/log/apache2/yaf-sample.dev-access_log" common <Directory "/www/yaf-sample"> Options FollowSymLinks Multiviews MultiviewsMatch Any AllowOverride None Require all granted </Directory> </VirtualHost>