mac 安装php7
卸载php55
brew unlink php55
brew install homebrew/php/php70
安装成功信息
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php7_module /usr/local/opt/php70/libexec/apache2/libphp7.so
<FilesMatch .php$>
SetHandler application/x-httpd-php
</FilesMatch>
Finally, check DirectoryIndex includes index.php
DirectoryIndex index.php index.html
The php.ini file can be found in:
/usr/local/etc/php/7.0/php.ini
✩✩✩✩ Extensions ✩✩✩✩
If you are having issues with custom extension compiling, ensure that
you are using the brew version, by placing /usr/local/bin before /usr/sbin in your PATH:
PATH="/usr/local/bin:$PATH"
PHP70 Extensions will always be compiled against this PHP. Please install them
using --without-homebrew-php to enable compiling against system PHP.
✩✩✩✩ PHP CLI ✩✩✩✩
If you wish to swap the PHP you use on the command line, you should add the following to ~/.bashrc,
~/.zshrc, ~/.profile or your shell's equivalent configuration file:
export PATH="$(brew --prefix homebrew/php/php70)/bin:$PATH"
✩✩✩✩ FPM ✩✩✩✩
To launch php-fpm on startup:
mkdir -p ~/Library/LaunchAgents
cp /usr/local/opt/php70/homebrew.mxcl.php70.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php70.plist
The control script is located at /usr/local/opt/php70/sbin/php70-fpm
OS X 10.8 and newer come with php-fpm pre-installed, to ensure you are using the brew version you need to make sure /usr/local/sbin is before /usr/sbin in your PATH:
PATH="/usr/local/sbin:$PATH"
You may also need to edit the plist to use the correct "UserName".
Please note that the plist was called 'homebrew-php.josegonzalez.php70.plist' in old versions
of this formula.
To have launchd start homebrew/php/php70 at login:
ln -sfv /usr/local/opt/php70/*.plist ~/Library/LaunchAgents
Then to load homebrew/php/php70 now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php70.plist
==> Summary
mac 安装php7的更多相关文章
- [安装] mac安装PHP7经历
背景 前几天在mac上跑workrman,由于workerman需要开启多个进程,多进程需要pcntl扩展的支持,我之前那个brew安装的php71没有这个扩展,就直接卸载了php71,然后想下载源码 ...
- mac 安装 php7 及扩展
mac 版本号:10.12.3 (16D30) 安装内容 php7.0.18(配置apache),composer,phpunit,xdebug扩展,docopts,mongo和redis扩展 php ...
- Mac安装LNMP环境,升级php7
Mac安装nginx+mysql+php 安装nginx比较麻烦,要安装pcre ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre ...
- mac下安装php7.2、mysql5.7、nginx环境
本篇文章是通过homebrew安装,home brew对于Mac相当于centos 的yum一样方便简单,大家可以先去安装home brew.网上很多简单靠谱的例子,这里不写了 一.准备条件为了安装最 ...
- mac配置php7运行环境
不用mac自带的apache和php,安装自己想要的版本.配置过程一直采坑,需要有闲时间和好的心理素质才行,哈哈,因为网上很教程都有纰漏之处,所以先把采坑无数后发现的个人认为最好的一个教程链接放在这里 ...
- Mac安装PHP(Homebrew/php弃用、其他第三方tap也已经弃用或者迁移后的安装配置方案)
一.前言 看网上很多资料,大多数都是 mac安装php,只需要: brew tap homebrew/php brew install phpXX 安装php扩展只需要: brew install p ...
- Mac 安装WordPress
Mac 安装WordPress 一.环境要求 PHP 5.2.4或更新版本 MySQL 5.0或更新版本 WebServer(可以选择Apache.nginx等支持PHP的,这里我选择Apache) ...
- CentOS 7.1编译安装PHP7
原文: https://typecodes.com/web/centos7compilephp7.html?utm_source=tuicool&utm_medium=referral 1 创 ...
- 编译安装PHP7并安装Redis扩展Swoole扩展
编译安装PHP7并安装Redis扩展Swoole扩展 在编译php7的机器上已经有编译安装过php5.3以上的版本,从而依赖库都有了 本php7是编译成fpm-php 使用的, 如果是apache那么 ...
随机推荐
- 分享一个延迟加载图片的JS
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...
- Spring学习笔记之三----基于Annotation的Spring IOC配置
使用Annotation 来创建Bean有两种方式 在配置类中创建bean(配置类是指标注为@Configuration的类),在配置类中每一个创建bean的方法都应该标注为@Bean,可以在@Bea ...
- Mac OS下基于Eclipse的Android调试环境搭建
1.安装Eclipse:http://www.eclipse.org/downloads/,网页会自动检测适用的版本(Mac OS x64),下载“Eclipse IDE for java Devel ...
- Oracle学习笔记(1)----忘记用户名的密码该如何找回
(1)在连接数据库之前需要打开如下服务: (2)如果忘记用户的密码 I:打开cmd窗口 II:键入命令:connect / as sysdba; III:alter user 用户名 identifi ...
- 将windows server 2016改造为像windows 10一样适合个人使用的系统
Windows server 2016 RTM已流出,具体可以搜索wzor大神泄露的,英文版本是0911的.现根据我安装后整理的如何配置使个人更适合使用. 20170102更新:wzor泄漏的0911 ...
- vbscript调用fso
function getVersion(strPath) Dim fver, fso Set fso = CreateObject("Scripting.FileSystemObject&q ...
- sql 保留两位小数+四舍五入
1. ROUND(该函数,只是负责四舍五入到两位小数,但是不负责截断 只留两位小数,例如下例:) 关于ROUND函数,我们平常理解为4舍5入,如: print ROUND(13.145, 2); 结果 ...
- Netty系列之Netty高性能之道
转载自http://www.infoq.com/cn/articles/netty-high-performance 1. 背景 1.1. 惊人的性能数据 最近一个圈内朋友通过私信告诉我,通过使用Ne ...
- jQuery学习笔记(二)jQuery中DOM操作
目录 DOM操作分类 jQuery中的各种DOM操作 查找节点 创建节点 删除节点 复制节点 替换节点 包裹节点 属性操作 样式操作 对HTML.文本和值的操作 遍历节点 CSS-DOM操作 小结 本 ...
- LINUX下查看日志
LINUX的日志都在 /var/log 目录下: 进入此文件查看目录详情: 查看某个日志的命令: 1.cat messages可以查看某个日志文件. 2.要达到实时更新,可以通过tail命令查看 ...