zoukankan      html  css  js  c++  java
  • 框架yaf安装配置

    安装php扩展

    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
    

    安装扩展失败

    解决:

    1. brew install php56-yaf
    2. 关闭mac rootless 功能。
      开机按住Command+R,进入恢复模式,打开terminal,键入:
      csrutil disable
      回车,重新启动即可。要重新恢复,只需将disable改为enable。
      osx 10.11中加入了rootless功能,顾名思义:给root用户更低的权限,该功能开启时即使是root用户或者sudo对于系统比较重要的目录也是没有操作权限的。

    加载so扩展即可

    extension=yaf.so

    php -m | grep yaf
    

    应用测试

    1. 生成一份sample应用,运行代码生成工具
      /usr/local/src/yaf/tools/cg/yaf_cg yaf-sample
      cp -R /usr/local/src/yaf/tools/cg/output/yaf-sample /www/

    2. 配置虚拟目录(apache、nginx)

    <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>
    
  • 相关阅读:
    【leetcode】1. Two Sum
    【leetcode】32. Longest Valid Parentheses
    【leetcode】20. Valid Parentheses
    scala细节
    【转】CentOS下firefox安装flash说明
    Spring 容器(一)
    源码学习快捷键
    Gradle编译spring3.x报错找不到itextpdf4.2.2解决方案
    Insertion Sort
    Bubble Sort
  • 原文地址:https://www.cnblogs.com/51fx/p/7004437.html
Copyright © 2011-2022 走看看