php-fpm 是预装在mac os上的,你只需要配置就好了。这个服务监听9000端口。

1. 为配置文件准备一些目录

mkdir -p /usr/share/php/var/run
mkdir -p /usr/share/php/var/log
mkdir -p /usr/share/php/var/session

2. 修改配置文件

cp /private/etc/php-fpm.conf.default /private/etc/php-fpm.conf

找到pid等进行如下修改

pid = /usr/share/php/var/run/php-fpm.pid
error_log = /usr/share/php/var/log/php-fpm.log ; 手动启动就设置这个 否则 安装daemon后台运行并设置成yes
daemonize = no ; optionally change listener from port to socket (will require tweaking nginx.conf as well)
listen = 127.0.0.1:9000
; listen = /tmp/php-fpm.sock ;
php_admin_value[session.save_path] = /usr/share/php/var/session

3. 启动fpm

sudo php-fpm

参考:http://verysimple.com/2012/12/06/install-php-fpm-on-osx-10-8-mountain-lion/

PS:安装php的时候如果出现:

An error occurred.

Sorry, the page you are looking for is currently unavailable.
Please try again later.

If you are the system administrator of this resource then you should check theerror log for details.

Faithfully yours, nginx.

是因为php-fpm服务的问题。

MacOS install configure php-fpm的更多相关文章

  1. debian install & configure(2)-drivers-nvidia

    ==========================================手动编译卸载受限驱动 :apt-get --purge remove nvidia-*apt-get --purge ...

  2. [Cypress] install, configure, and script Cypress for JavaScript web applications -- part1

    Despite the fact that Cypress is an application that runs natively on your machine, you can install ...

  3. debian install & configure(2)-drivers-ati

    依赖apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4 ...

  4. [Cypress] install, configure, and script Cypress for JavaScript web applications -- part3

    Use custom Cypress command for reusable assertions We’re duplicating quite a few commands between th ...

  5. Learning ROS: Ubuntu16.04下kinetic开发环境安装和初体验 Install + Configure + Navigating(look around) + Creating a Package(catkin_create_pkg) + Building a Package(catkin_make) + Understanding Nodes

    本文主要部分来源于ROS官网的Tutorials. Ubuntu install of ROS Kinetic # Setup your sources.list sudo sh -c 'echo & ...

  6. [Cypress] install, configure, and script Cypress for JavaScript web applications -- part2

    Use Cypress to test user registration Let’s write a test to fill out our registration form. Because ...

  7. [Cypress] install, configure, and script Cypress for JavaScript web applications -- part5

    Use the Most Robust Selector for Cypress Tests Which selectors your choose for your tests matter, a ...

  8. [Cypress] install, configure, and script Cypress for JavaScript web applications -- part4

    Load Data from Test Fixtures in Cypress When creating integration tests with Cypress, we’ll often wa ...

  9. How to Install and Configure Bind 9 (DNS Server) on Ubuntu / Debian System

    by Pradeep Kumar · Published November 19, 2017 · Updated November 19, 2017 DNS or Domain Name System ...

随机推荐

  1. Android定位&地图&导航——基于百度地图,实现自定义图标绘制并点击时弹出泡泡

    一.问题描述 上一次我们使用百度地图实现基本的定位功能,接下来我们继续实现搜索和定位,并使用LocationOverlay绘制定位位置,同时展示如何使用自定义图标绘制并点击时弹出泡泡 如图所示: 二. ...

  2. GraphQL入门3(Mutation)

    创建一个新的支持Mutation的Schema. var GraphQLSchema = require('graphql').GraphQLSchema; var GraphQLObjectType ...

  3. Web 前端面试题整理(不定时更新)

    重要知识需要系统学习.透彻学习,形成自己的知识链.万不可投机取巧,临时抱佛脚只求面试侥幸混过关是错误的! 面试有几点需注意: 面试题目: 根据你的等级和职位的变化,入门级到专家级,广度和深度都会有所增 ...

  4. 【ZH奶酪】如何用Python计算最长公共子序列和最长公共子串

    1. 什么是最长公共子序列?什么是最长公共子串? 1.1. 最长公共子序列(Longest-Common-Subsequences,LCS) 最长公共子序列(Longest-Common-Subseq ...

  5. pycharm怎么设置代码自动补齐

    代码补全功能在PyCharm上是一流的.默认情况下PyCharm会在你输入的时候给出建议: 由于此功能可有点耗电,你可以通过选择File→Power Save Mode来禁用它.您仍然可以通过Cont ...

  6. RabbitMQ ——“Hello World”

    介绍 RabbitMQ是一个消息实体服务(broker):它接收及转发消息.你可以把它想象成一个邮局:当你把你想要寄送的邮件放进邮箱里时,你能够确信邮局的派送员最终会把你的这封邮局送到这信的收件者手中 ...

  7. xcode9 报错 “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift

    用xcode编译后会出现这个错误的情况: 1.使用cocopod导入第三方swift包后,swift的包是比较老的swift开发的. 2.用xcode9 打开老的swift(比如swift2.0)的工 ...

  8. 关于NSString的@""和nil时的判断方法

    1.NSString *str = @"";该语句代表是一个空串,并且不为nil,占有内存空间 2.NSString *str = nil;该语句代表,str不指向任何对象,指针指 ...

  9. Atitit 快速开发体系建设路线图

    Atitit 快速开发体系建设路线图 1.1. 项目类型划分 哑铃型 橄榄型  直板型(可以立即实行)1 1.2. 解决方案知识库 最佳实践库 最佳流程优化(已成,需要一些整理)2 1.3. 功能模板 ...

  10. 在C#用HttpWebRequest中发送GET/HTTP/HTTPS请求(转)

    通用辅助类 下面是我编写的一个辅助类,在这个类中采用了HttpWebRequest中发送GET/HTTP/HTTPS请求,因为有的时候需要获取认证信息(如Cookie),所以返回的是HttpWebRe ...