美文网首页
MAC 启动NGINX、PHP-FPM(手动+自动)

MAC 启动NGINX、PHP-FPM(手动+自动)

作者: 不留余白 | 来源:发表于2020-04-07 10:13 被阅读0次

    手动启动

    php-fpm

    sudo /usr/local/Cellar/php@7.1/7.1.27/sbin/php-fpm -R

    杀死php-fpm进程

    sudo pkill -INT -o php-fpm

    nginx

    sudo nginx -c /usr/local/etc/nginx/nginx.conf

    开机自动启动

    php-fpm

    //拷贝homebrew安装的php开机启动文件
    cp /usr/local/opt/php@7.1/homebrew.mxcl.php@7.1.plist  /Library/LaunchDaemons
    //添加到开机启动项
    sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.php@7.1.plist
    

    nginx

    //拷贝homebrew安装的php开机启动文件
    sudo cp /usr/local/opt/nginx/homebrew.mxcl.nginx.plist  /Library/LaunchDaemons
    //添加到开机启动项
    sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
    

    相关文章

      网友评论

          本文标题:MAC 启动NGINX、PHP-FPM(手动+自动)

          本文链接:https://www.haomeiwen.com/subject/qslgphtx.html