Make and install php 5.6.28 for mac

admin 2022年5月17日11:28:20安全博客评论2 views1597字阅读5分19秒阅读模式

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

Start Services

php-fpm -y /etp/php-fmp.conf -D
brew services start mysql
brew services start nginx

FROM : virzz.com | Author:Virink

特别标注: 本站(CN-SEC.COM)所有文章仅供技术研究,若将其信息做其他用途,由用户承担全部法律及连带责任,本站不承担任何法律及连带责任,请遵守中华人民共和国安全法.
  • 我的微信
  • 微信扫一扫
  • weinxin
  • 我的微信公众号
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年5月17日11:28:20
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                  Make and install php 5.6.28 for mac http://cn-sec.com/archives/1013011.html

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: