衡阳市做淘宝网站建设俄罗斯ip地址
衡阳市做淘宝网站建设,俄罗斯ip地址,咸阳网站建设公司哪家好,蒲公英路由器登录地址Mac M2芯片配置PHP环境 1. XAMPP2. PHPBrew(PHP版本管理)安装php7.4.33版本 3. 直接使用homebrew 安装php环境参考 1. XAMPP
官网地址 https://www.apachefriends.org/ 安装 安装完成
web server打开后#xff0c;在打开localhost 成功#xff01; 2. PHPBrew(PHP版本管… Mac M2芯片配置PHP环境 1. XAMPP2. PHPBrew(PHP版本管理)安装php7.4.33版本 3. 直接使用homebrew 安装php环境参考 1. XAMPP
官网地址 https://www.apachefriends.org/ 安装 安装完成
web server打开后在打开localhost 成功 2. PHPBrew(PHP版本管理)
官方文档 https://github.com/phpbrew/phpbrew/blob/master/README.cn.md HomeBrew关于 PHPBrew的文档 https://formulae.brew.sh/formula/phpbrew
安装 这里我们通过homebrew安装
brew install phpbrewinit
Using root: /Users/fanzhen/.phpbrew
Initialization successfully finished!Phpbrew environment is initialized, required directories are created under/Users/fanzhen/.phpbrewPaste the following line(s) to the end of your ~/.bashrc and start a
new shell, phpbrew should be up and fully functional from there:source /Users/fanzhen/.phpbrew/bashrcTo enable PHP version info in your shell prompt, please set PHPBREW_SET_PROMPT1
in your ~/.bashrc before you source ~/.phpbrew/bashrcexport PHPBREW_SET_PROMPT1To enable .phpbrewrc file searching, please export the following variable:export PHPBREW_RC_ENABLE1For further instructions, simply run phpbrew to see the help message.Enjoy phpbrew at $HOME!!# phpbrew
source /Users/fanzhen/.phpbrew/bashrc
export PHPBREW_SET_PROMPT1
export PHPBREW_RC_ENABLE1之后就可以正常使用了
安装php7.4.33版本
phpbrew install 7.4.33 default但是这里下载的速度太慢了需要解决
3. 直接使用homebrew 安装php环境
1、查看 php 版本
php -v此时发现没有php环境的话就全新安装
2、brew tap加速使用github库 homebrew默认使用官方的库但这个源很慢一般我们会使用第三方tap
brew tap shivammathur/php3、安装php7.4
brew install shivammathur/php/php7.44、创建link这样可以在全局环境里访问
brew link --overwrite --force php74Summary/opt/homebrew/Cellar/php7.4/7.4.33_5: 499 files, 72.9MBRunning brew cleanup php7.4...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew).Caveatsphp7.4
To enable PHP in Apache add the following to httpd.conf and restart Apache:LoadModule php7_module /opt/homebrew/opt/php7.4/lib/httpd/modules/libphp7.soFilesMatch \.php$SetHandler application/x-httpd-php/FilesMatchFinally, check DirectoryIndex includes index.phpDirectoryIndex index.php index.htmlThe php.ini and php-fpm.ini file can be found in:/opt/homebrew/etc/php/7.4/php7.4 is keg-only, which means it was not symlinked into /opt/homebrew,
because this is an alternate version of another formula.If you need to have php7.4 first in your PATH, run:echo export PATH/opt/homebrew/opt/php7.4/bin:$PATH ~/.zshrcecho export PATH/opt/homebrew/opt/php7.4/sbin:$PATH ~/.zshrcFor compilers to find php7.4 you may need to set:export LDFLAGS-L/opt/homebrew/opt/php7.4/libexport CPPFLAGS-I/opt/homebrew/opt/php7.4/includeTo start shivammathur/php/php7.4 now and restart at login:brew services start shivammathur/php/php7.4
Or, if you dont want/need a background service you can just run:/opt/homebrew/opt/php7.4/sbin/php-fpm --nodaemonize# php7.4
export PATH/opt/homebrew/opt/php7.4/bin:$PATH
export PATH/opt/homebrew/opt/php7.4/sbin:$PATH
export LDFLAGS-L/opt/homebrew/opt/php7.4/lib
export CPPFLAGS-I/opt/homebrew/opt/php7.4/include参考
PHPBrew 使用指南 https://www.jianshu.com/p/d5b0d40e56eephpbrew set mirror加速https://minbaby.github.io/post/2018-11/phpbrew-set-mirror/
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/88634.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!