Install Brewhome
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Mysql
brew install mysql
Install Nginx
brew install nginx
Download php-src
You can do it by git or http
git
git clone https://github.com/php/php-src.git
http
http://php.net/downloads.php
Install PHP
brew install autoconf openssl libpng libjpeg libxml gettext libmcrypt libiconv libmhash
cd path/php-src(what you save)
buildconf --force
Configure
./configure \
--prefix=/usr/local/php56 \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--without-apache \
--with-openssl=/usr/local/Cellar/openssl/1.0.2j \
--with-config-file-path=/etc \
--with-curl \
--with-bz2 \
--with-zlib \
--with-zlib-dir \
--with-mcrypt \
--with-mysql \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-imap-ssl \
--with-gettext \
--with-pear \
--with-gettext \
--with-pear \
--with-freetype-dir \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-xmlrpc \
--with-xsl \
--with-pcre-regex \
--with-sqlite3 \
--enable-exif \
--enable-zip \
--enable-ftp \
--enable-soap \
--enable-sockets \
--enable-pdo \
--enable-cli \
--enable-calendar \
--enable-mbstring \
--enable-bcmath \
--enable-mbregex \
--enable-fpm \
--enable-gd-native-ttf \
--enable-xml \
--enable-libxml \
--enable-sysvsem \
--enable-debug
make and install
sudo make && make install
Setting
Write it in .zshrc (I used zsh)
export PATH="/usr/local/php56/bin:/usr/local/php56/sbin:$PATH"
Rewrite your configure:
- /etc/php.ini
- /etp/php-fmp.conf
- /usr/local/etc/nginx/nginx.conf
- add
include vhost/*.conf
in http{} - mkdir /usr/local/etc/nginx/vhost
- vim your site setting in vhost/yourname.conf
- add
Start Services
php-fpm -y /etp/php-fmp.conf -D
brew services start mysql
brew services start nginx
FROM : virzz.com | Author:Virink
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论