为了修改一下寻ta驿站的主题,需要在本地set up一个Wordpress的环境。分享一下Mac OS上安装Wordpress的过程:
Mac OS 安装php及php-fpm
在这里是用brew来安装包的
1.看看是否已经有了php的repo
  brew search php2.Setup下依赖
 brew tap homebrew/dupes
 brew tap homebrew/versions
 brew tap homebrew/homebrew-php3.安装php及php-fpm
brew install php55 --with-fpm  --with-imap  --without-apache --with-debug4.添加开机启动
  ln -s /usr/local/opt/php55/homebrew.mxcl.php55.plist ~/Library/LaunchAgents/homebrew.mxcl.php55.plist5.运行php-fpm
 launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php55.plistMac OS安装Nginx
1.安装nginx
 brew install nginx2.添加Nginx开机启动
 ln -s /usr/local/opt/php55/homebrew.mxcl.nginx.plist ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist3.启动Nginx
 launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plistMac OS安装MySQL
1.安装MySQL
 brew install mysql2.添加MySQL开机启动
 ln -s /usr/local/opt/php55/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist3.启动MySQL
 launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist配置Nginx
默认的80端口只有root用户才能用,于是我们需要修改端口为8080。安装完Nginx后,会有这样的提示
修改端口
  vim /usr/local/etc/nginx/nginx.conf修改了默认的文档路径,部分配置如下
server {
    client_max_body_size 20M;
    listen       8080;
    server_name  localhost;
    root /Users/fdhuang/www;
    #charset koi8-r;
    #access_log  logs/host.access.log  main;
    location / {
        root   /Users/fdhuang/www;
        index  index.html index.htm index.php;
    }或许您还需要下面的文章: