Home > Backend Development > PHP Tutorial > mac nginx+php+mysql configuration

mac nginx+php+mysql configuration

WBOY
Release: 2016-08-08 09:25:12
Original
1671 people have browsed it

mac nginx 配置
1,brew  安装
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2.pcre 安装(nginx rewrite 依赖该库)
cd ~/Download
tar xvzf pcre-8.33.tar.gz
cd pcre-8.12
sudo ./configure --prefix=/usr/local
sudo make
sudo make install
3.nginx 安装
tar -zvxf nginx-1.5.2.tar.gz
cd nginx-1.5.2
./configure --with-cc-opt="-Wno-deprecated-declarations"
make
make install
开机启动 nginx

     
    
      
        Label  
        nginx    
        Program  
        /usr/local/nginx/sbin/nginx        
        KeepAlive  
      

launchctl load -w /Library/LaunchDaemons/org.macports.nginx.plist
4,mysql 安装
brew mysql
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
5,php 安装
tar -zvxf php-5.5.19.tar.gz
cd php-5.5.19
./configure --prefix=/usr/local/php --with-mysql=/usr/local/opt/mysql/ --enable-pdo --with-pdo-mysql=/usr/local/opt/mysql  --with-curl --enable-fpm --with-openssl
make
make install
cp php.ini-production /usr/local/php/etc/php.ini
vim /usr/local/php/etc/php.ini
date.timezone =PRC
开机启动php
在 /Library/LaunchDaemons/ 目录新建 org.php.php-fpm.plist 文件:
     
     
     
     
        Label  
        php-fpm  
        Program  
        /User/wyt/module/php/sbin/php-fpm  
        KeepAlive  
   
 
   
 
launchctl load -w /Library/LaunchDaemons/org.php.php-fpm.plist

以上就介绍了mac nginx+php+mysql 配置,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template