PHP 7.0.33 (cli) (built: Dec 6 2018 22:30:44) ( NTS )
安装依赖库
- yum -y install gcc automake autoconf libtool make
- yum -y install gcc gcc-c++ glibc
- yum -y install libmcrypt-devel mhash-devel libxslt-devel
- yum -y install openssl-devel libicu-devel
下载解压
- wget http://cn2.php.net/distributions/php-7.0.33.tar.gz
- tar php-7.0.33.tar.gz
- cd php-7.0.33
检查依赖库
- ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-config-file-scan-dir=/usr/local/php/conf.d --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype-dir=/usr/local/freetype --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt --enable-ftp --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-gettext --disable-fileinfo --enable-opcache --enable-intl --with-xsl --enable-mysqlnd
编译
- make all install
启动
- /usr/local/php/sbin/php-fpm
查看进程是否启动
- ps aux|grep php-fpm