其他过程忽略,可参考 编译PHP7.2
sudo apt update
sudo apt -y upgrade
sudo apt-get install build-essential
sudo apt-get install pkg-config
sudo apt-get install libpcre3 libpcre3-dev openssl libssl-dev libperl-dev
sudo apt-get install libssh-dev libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng-dev libfreetype6-dev libxslt1-dev libxml2 libxml2-dev libsqlite3-dev libonig-dev libgmp-dev libreadline6-dev
配置
./configure \
--prefix=/usr/local/php \
--with-fpm-user=wj008 \
--with-fpm-group=wj008 \
--enable-fpm \
--enable-mysqlnd \
--enable-soap \
--with-libxml \
--with-openssl \
--with-mhash \
--with-sqlite3 \
--enable-bcmath \
--with-iconv \
--with-bz2 \
--enable-calendar \
--with-curl \
--with-cdb \
--enable-dom \
--enable-exif \
--enable-fileinfo \
--enable-filter \
--enable-ftp \
--enable-gd \
--with-jpeg \
--with-freetype \
--with-gettext \
--with-gmp \
--with-mhash \
--enable-mbstring \
--enable-mbregex \
--enable-pdo \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-zlib \
--with-pdo-sqlite \
--with-readline \
--enable-session \
--enable-shmop \
--enable-simplexml \
--enable-sockets \
--with-libxml \
--with-xsl \
--with-pear \
--enable-zip \
--enable-opcache