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. wxParse解析富文本内容使点击图片可以选中并实现放大缩小

    wxParse解析富文本内容不多说,之前写过步骤介绍,主要是在使用过程中发现解析的富文本内容里有图片时有的可以点击放大缩小,有的点击却报错,找不到imgUrls. 经过排查发现:循环解析的富文本内容正 ...

  2. 日志分析利器elk与logback(log4j)实战

    https://blog.csdn.net/puhaiyang/article/details/69664891

  3. (98)Address already in use: make_sock: could not bind to address 80 [resolved] (2012-10-11 09:04)

    以前遇到一个问题: sudo /etc/init.d/apache2 start * Starting web server apache2 apache2: Could not reliably d ...

  4. vim 支持 nginx配置文件 语法高亮

    1.下载 nginx.vim 语法高亮文件 2.将文件复制到 /usr/share/vim/vim74/syntax 目录(也可以是 单用户目录 ~/.vim/syntax/) 3.修改 vim /u ...

  5. openwrt 水星mw4530r-v1 搞搞搞

    感觉周围最实用的搞硬件非路由器莫属,可惜配置都不咋的高,选择水星这款就是看中它的性价比和openwrt的支持,真乃刷机神器啊,还可以挂载usb就更绝了,价格没得说. 另外128mb的rom对大部分功能 ...

  6. 第三部分:Android 应用程序接口指南---第五节:计算---第一章 RenderScript

    第1章 RenderScript RenderScript提供一个独立于平台并在本地运行的计算引擎,用它来加速你需要大量计算能力的应用.RenderScript是一个运行与Android上计算密集型的 ...

  7. linux tcp相关参数

    /etc/sysctl.conf文件 /etc/sysctl.conf是一个允许你改变正在运行中的Linux系统的接口.它包含一些TCP/IP堆栈和虚拟内存系统的高级选项,可用来控制Linux网络配置 ...

  8. shell生成连续天数日期

    #!/bin/bash #两个参数:起始时间和终止时间,循环输出每天 #输入格式:20171201 20171225 #输出格式:2017-12-01 2017-12-25 startdate=`da ...

  9. 【Ubuntu】PHP环境安装-phpstudy for linux版

    安装: wget -c http://lamp.phpstudy.net/phpstudy.bin chmod +x phpstudy.bin    #权限设置sudo ./phpstudy.bin ...

  10. IllegalArgumentException:@Body parameters cannot be used with form or multi-part encoding

    使用retrofit时报错IllegalArgumentException:@Body parameters cannot be used with form or multi-part encodi ...