一、安装PHP
1、下载PHP相应的版本 (http://php.net/)
2、命令:tar zxvf +压缩包文件名 解压相应的文件
3、进入PHP版本文件 编译安装:
-
./configure --prefix=/data/app/php72 --enable-fpm --with-fpm-user=syh --with-fpm-group=staff --disable-ipv6 --with-openssl=/usr/local/Cellar/openssl/1.0.2s --with-pcre-regex --with-zlib=/usr/local/Cellar/zlib/1.2.11 --enable-bcmath --with-curl --enable-exif --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --enable-gd-native-ttf --with-gettext --with-mhash --enable-mbstring --with-mcrypt --with-mysqli --enable-opcache --enable-pcntl --with-pdo-mysql --enable-sockets --with-iconv-dir=/usr/local/Cellar/libiconv/1.16 --with-iconv=/usr/local/opt/libiconv/ --with-libxml-dir --enable-zip --enable-mysqlnd --with-webp-dir=/usr/local/Cellar/webp/1.0.3 --without-gettext --enable-shmop
-
注意编译扩展注意路径: