源码编译php8

apt -y install libwebp-dev libjpeg-dev libpng-dev libxpm-dev libzip-dev libxslt1-dev libmcrypt-dev libsqlite3-dev libcurl4-openssl-dev libssl-dev autoconf libfreetype-dev libfreetype6-dev libonig-dev libxml2 libxml2-dev pkg-config


wget https://www.php.net/distributions/php-8.0.30.tar.gz
./configure --prefix=/usr/local/php-8.0.30 \
--with-config-file-path=/usr/local/php-8.0.30/etc \
--with-fpm-user=www  \
--with-fpm-group=www \
--enable-mbstring  \
--enable-ftp  \
--enable-gd   \
--enable-gd-jis-conv \
--with-freetype \
--enable-mysqlnd \
--enable-pdo   \
--enable-sockets   \
--enable-fpm   \
--enable-xml  \
--enable-soap  \
--enable-pcntl   \
--enable-cli   \
--with-openssl  \
--with-mysqli=mysqlnd   \
--with-pdo-mysql=mysqlnd   \
--with-pear   \
--with-zlib  \
--with-iconv  \
--with-curl  \
--with-jpeg \
--enable-sockets

make -j && make install 

你可能感兴趣的:(运维)