MENU

brew php

2022 年 01 月 13 日 • 阅读: 187 • 学习笔记

Install PHP

brew install php@8.0

If you need to have php@8.0 first in your PATH, run:

echo 'export PATH="/opt/homebrew/opt/php@8.0/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/opt/homebrew/opt/php@8.0/sbin:$PATH"' >> ~/.zshrc

For compilers to find php@8.0 you may need to set:

export LDFLAGS="-L/opt/homebrew/opt/php@8.0/lib"
export CPPFLAGS="-I/opt/homebrew/opt/php@8.0/include"

The php.ini and php-fpm.ini file can be found in:

/opt/homebrew/etc/php/8.0/

If you don't want/need a background service you can just run:

/opt/homebrew/opt/php@8.0/sbin/php-fpm --nodaemonize
添加新评论

|十年之约

本网站由提供CDN加速/云储存服务