das Doc

登录/注册
mac install nginx+php+mysql
编辑
#uninstall MacPorts
sudo rm -rf \
     /opt/local \
     /Applications/DarwinPorts \
     /Applications/MacPorts \
     /Library/LaunchDaemons/org.macports.* \
     /Library/Receipts/DarwinPorts*.pkg \
     /Library/Receipts/MacPorts*.pkg \
     /Library/StartupItems/DarwinPortsStartup \
     /Library/Tcl/darwinports1.0 \
     /Library/Tcl/macports1.0 \
     ~/.macports

# Install BREWinstall_homebrew.rb
/usr/bin/ruby /opt/install_homebrew.rb //Don't run this as root!


# Install Linux
brew install nginx

# 需要先装Xcode的develop tool和command line tool
# Create a link to autostart nginx when the system starts

cp /usr/local/Cellar/nginx/1.2.6/homebrew.mxcl.nginx.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist

# Cancel the self-starting
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist

# Configure linux
sudo vim /usr/local/etc/nginx/nginx.conf


========
# Install mysql
$ brew install mysql
$ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
$ mysqld_safe
$mysql.server start //开启
===========
# Install PHP
brew tap homebrew/dupes

brew tap josegonzalez/homebrew-php

brew options php54


brew install php54 --without-apache --with-intl --with-fpm --with-mysql

###
cp /usr/local/Cellar/php54/5.4.10/homebrew-php.josegonzalez.php54.plist ~/Library/LaunchAgents/

launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php54.plist

/usr/local/sbin/php54-fpm start

sudo vim /usr/local/etc/php/5.4/php.ini
date.timezone = "Asia/Chongqing"


sudo /usr/local/sbin/php54-fpm restart
~~~~~~~

启动:
sudo /usr/local/bin/nginx
sudo /usr/local/sbin/php54-fpm start
/usr/local/bin/mysql.server start
注册新帐户
欢迎使用本网站服务,请遵守国家法律法规。
支持原创,您在网站上发布的所有作品著作权归您所有。
登录
记住我 使用公用电脑请勿选择此功能

帐户设置

基本信息 修改密码 阅读模式