php7之前用mysql5* php8之后可以用mysql8
1 apt-get -y install curl libcurl4-gnutls-dev libjpeg-turbo8-dev libpng-dev libfreetype-dev
2 ln -s /usr/include/x86_64-linux-gnu/curl /usr/include/curl
3 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.8.1.tar.gz
4 tar zxvf freetype-2.8.1.tar.gz
5 cd freetype-2.8.1/
6 ./configure --prefix=YOUR_PREFIX
7 make && make install
8 ln -s YOUR_PREFIX/include/freetype2/freetype YOUR_PREFIX/include/freetype
9 ln -s YOUR_PREFIX/include/freetype2/ft2build.h YOUR_PREFIX/include/ft2build.h
./configure \
--prefix=/usr/local/php7.2.34 \
--enable-fpm \
--with-fpm-user=www-data \
--with-fpm-group=www-data \
--with-config-file-path=/usr/local/php7.2.34 \
--enable-mbstring \
--with-openssl \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--enable-mysqlnd \
--with-mysqli=/usr/web/mysql5.7.32/bin/mysql_config \
--with-pdo-mysql=/usr/web/mysql5.7.32/ \
--with-pear \
--enable-sockets \
--with-freetype-dir \
--with-zlib \
--with-libxml-dir \
--with-xmlrpc \
--enable-zip \
--enable-xml \
--enable-sockets \
--with-gd \
--with-zlib \
--with-iconv \
--enable-zip \
--with-freetype-dir=/usr/web/freetype2.8.1/ \
--enable-soap \
--enable-pcntl \
--enable-cli \
--with-curl
原文:https://www.cnblogs.com/kuangke/p/14377533.html