一、下載編輯器http://www.iterm2.com/downloads.htmlphp
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
安裝brew成功
五、安裝git
直接在命令行中輸入 brew install git
就能夠安裝成功,若是要卸載就直接輸入 brew uninstall git
六、更新brew:brew update
具體用到能夠直接查
七、安裝nginx:
brew search nginx
brew install nginx
執行:
cd
/usr/local/etc/nginx/
mkdir
conf.d
<!-- lang: shell -->
worker_processes 1;
error_log /usr/local/var/log/nginx/error.log warn;
pid /usr/local/var/run/nginx.pid;
events {
worker_connections 256;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /usr/local/var/log/nginx/access.log main;
port_in_redirect off;
sendfile on;
keepalive_timeout 65;
include /usr/local/etc/nginx/conf.d/*.conf;
}
<!-- lang: shell -->
server {
listen 8080;
server_name localhost;
root /Users/user_name/nginx_sites/; # 該項要修改成你準備存放相關網頁的路徑
location / {
index index.php;
autoindex on;
}
#proxy the php scripts to php-fpm
location ~ \.php$ {
include /usr/local/etc/nginx/fastcgi.conf;
fastcgi_intercept_errors on;
fastcgi_pass 127.0.0.1:9000;
}
}
brew install php70 --with-imap --with-tidy --with-debug --with-mysql --with-fpm
安裝php-fpmhtml
sudo
cp
/private/etc/php-fpm
.conf.default
/private/etc/php-fpm
.conf