首頁 >後端開發 >php教程 >mac nginx+php+mysql 配置

mac nginx+php+mysql 配置

WBOY
WBOY原創
2016-08-08 09:25:121672瀏覽

mac nginx 設定
1,brew 安裝
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2.pcre 安裝(nginx rewrite 依賴函式庫)
cd ~/下載
tar xvzf pcre-8.33.tar.gz
cd pcre-8.12
sudo ./configure --prefix=/usr/local
sudo make
sudo make install
3. 1.5.2.tar.gz
cd nginx-1.5.2
./configure --with-cc-opt="-Wno-deprecated-declarations"
make
make install
啟動啟動nginx

     
      
   ;      
        標籤鍵>  
        nginx   string>/usr/local/nginx/sbin/nginx        
        KeepAlive  
      

launchctl load -w /Library/LaunchDaemons/org.macports.nginx.plist
4,5,5,brewi folbrew 5 /local/opt/mysql/*.plist ~/Library /LaunchAgents
5,php安裝
tar -zvxf php-5.5.19.tar.gz
cd php-5.5.19
./configure --prefix=/usrcd 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-product /usr/local/php/etc/php.ini
vim /usr/local/php/etc/php.ini
date.timezone =timezone 開機啟動php
在/Library/LaunchDaemons/ 目錄新建org .php.php-fpm.plist 檔案:
     
     
     
字典;  
        標籤鍵>  
        php-fpm字串>  
    /sbin/php-fpm  
        KeepAlive  
     
   
;  

以上就介紹了mac nginx+php+mysql配置,包含了方面的內容,希望對PHP教學有興趣的朋友有幫助。


陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn