安装php8.0依赖
wget ftp://xmlsoft.org/libxml2/libxml2-2.9.10.tar.gz
tar xf libxml2-2.9.10.tar.gz
cd libxml2-2.9.10
./configure
make
make install
cd ..
wget -O libjpeg-turbo-2.0.5.tar.gz
tar -zxvf libjpeg-turbo-2.0.5.tar.gz
cd libjpeg-turbo-2.0.5
cmake .
make
make install
cd ..
#oniguruma mbstring使用到
wget
tar xf onig-6.9.5.tar.gz
cd onig-6.9.5
./configure
make
make install
cd ..
wget
tar -zxvf libiconv-1.16.tar.gz
cd libiconv-1.16
./configure --prefix=/usr/local/libiconv
make && make install
cd ..
wget
tar -zxvf sqlite-autoconf-3330000.tar.gz
cd sqlite-autoconf-3330000
./configure
make
make install
cd ..
yum install cmake3 -y
wget
tar -zxvf libzip-1.7.3.tar.gz
cd libzip-1.7.3
cmake3 .
make
make install
cd ..
安装php8.0
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/libjpeg-turbo/lib64/pkgconfig:/usr/local/lib64/pkgconfig:$PKG_CONFIG_PATH
wget
tar xf php-8.0.0.tar.gz
cd php-8.0.0
./configure --prefix=/usr/local/php80 --with-config-file-path=/usr/local/php80/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-pdo-mysql --enable-mysqlnd --with-mysqli --with-zlib --with-curl --with-pear --with-iconv=/usr/local/libiconv --enable-gd --with-jpeg --with-freetype --with-openssl --enable-mbregex --enable-mbstring --enable-xml --enable-session --enable-ftp --enable-pdo -enable-tokenizer --with-zip --enable-sockets --enable-soap --with-mhash --with-gettext
make
make install
#配置php-fpm
cp php.ini-development /usr/local/php80/etc/php.ini
cp /usr/local/php80/etc/php-fpm.conf.default /usr/local/php80/etc/php-fpm.conf
cp /usr/local/php80/etc/php-fpm.d/ /usr/local/php80/etc/php-fpm.d/
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm80
chmod +x /etc/init.d/php-fpm80
cd ..
#redis模块
wget
tar xf redis-5.3.2.tgz
cd redis-5.3.2
/usr/local/php80/bin/phpize
./configure --with-php-config=/usr/local/php80/bin/php-config
make
make install
echo "extension=redis.so" >>/usr/local/php80/etc/php.ini
cd ..
#安装msgpack模块
wget
tar -zxvf msgpack-2.1.2.tgz
cd msgpack-2.1.2
/usr/local/php80/bin/phpize
./configure --with-php-config=/usr/local/php80/bin/php-config
make
make install
echo "extension=msgpack.so" >>/usr/local/php80/etc/php.ini
cd ..
阅读(19178) | 评论(0) | 转发(0) |