CentOS

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6

1.安装系统包

# yum install -y gcc gcc-c++ autoconf libtool bzip2 bzip-devel make python3 python3-devel

2.安装扩展依赖包

2.1 安装Openssl-1.1.1s

下载地址https://www.openssl.org/source/openssl-1.1.1s.tar.gz

# tar zxvf openssl-1.1.1s.tar.gz
# cd openssl-1.1.1s
# ./config --prefix=/usr/local/openssl
# make
# make install
# cd ..

# openssl version
OpenSSL 1.0.2k-fips  26 Jan 2017

# mv /usr/bin/openssl /usr/bin/openssl.bak
# ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
# echo "/usr/local/openssl/lib" >> /etc/ld.so.conf
# echo "/usr/local/lib64" >> /etc/ld.so.conf
# echo "/usr/local/lib" >> /etc/ld.so.conf
# ldconfig -v

# openssl version 
OpenSSL 1.1.1s  1 Nov 2022

2.2 安装perl-5.36.0

下载地址https://www.cpan.org/src/5.0/perl-5.36.0.tar.gz

# tar zxvf perl-5.36.0.tar.gz
# cd perl-5.36.0
# ./Configure -des -Dprefix=/usr/local/perl
# make
# make install
# cd ..

# perl -v
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 44 registered patches, see perl -V for more detail)

Copyright 1987-2012, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

# mv /usr/bin/perl /usr/bin/perl.bak
# ln -s /usr/local/perl/bin/perl /usr/bin/perl
# perl -v
This is perl 5, version 36, subversion 0 (v5.36.0) built for x86_64-linux

Copyright 1987-2022, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at https://www.perl.org/, the Perl Home Page.

2.3 安装zlib-1.2.13

下载地址http://www.zlib.net/zlib-1.2.13.tar.gz

# tar zxvf zlib-1.2.13.tar.gz 
# cd zlib-1.2.13
# ./configure --enable-shared
# make
# make install

2.4 安装libpng-1.6.39

下载https://nchc.dl.sourceforge.net/project/libpng/libpng16/1.6.39/libpng-1.6.39.tar.gz


# tar zxvf libpng-1.6.39.tar.gz
# cd libpng-1.6.39
# ./configure --prefix=/usr/local/libpng --enable-shared
# make
# make install

2.5 安装jpeg-v9e

下载地址http://www.ijg.org/files/jpegsrc.v9e.tar.gz

# tar zxvf jpegsrc.v9e.tar.gz
# cd jpeg-9e
# ./configure --prefix=/usr/local/jpeg-9e --enable-shared
# make 
# make install
# cd ..


2.6 安装xz-5.4.1

下载https://nchc.dl.sourceforge.net/project/lzmautils/xz-5.4.1.tar.gz

# tar zxvf xz-5.4.1.tar.gz
# cd xz-5.4.1
# ./configure --prefix=/usr/local/xz --enable-shared
# make
# make install
# cd ..

2.7 安装libxml2-2.9.12

下载http://xmlsoft.org/sources/libxml2-2.9.12.tar.gz

# tar zxvf libxml2-2.9.12.tar.gz
# cd libxml2-2.9.12
# ./configure --prefix=/usr/local/libxml2 --with-zlib --with-lzma=/usr/local/zx
# make
# make install
# cd ..

2.8 安装libxslt-1.1.34

下载 http://xmlsoft.org/sources/libxslt-1.1.34.tar.gz

# tar zxvf libxslt-1.1.34.tar.gz 
# cd libxslt-1.1.34
# ./configure LD_LIBRARY_PATH=/usr/local/libxml2/lib PKG_CONFIG_PATH=/usr/local/libxml2/lib/pkgconfig --prefix=/usr/local/libxslt

# make 
# make install
# cd ..

2.9 安装freetype-2.12.1

下载http://ftp.twaren.net/Unix/NonGNU/freetype/freetype-2.12.1.tar.gz


 


 


 


 

https://freedesktop.org/software/fontconfig/release/fontconfig-2.14.2.tar.gz

https://github.com/libgd/libgd/releases/download/gd-2.3.3/libgd-2.3.3.tar.gz

http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.17.tar.gz

https://github.com/curl/curl/releases/download/curl-7_83_1/curl-7.83.1.tar.gz

https://github.com/libexpat/libexpat/releases/download/R_2_4_9/expat-2.4.9.tar.gz

https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/o/oniguruma-6.8.2-2.el7.x86_64.rpm

https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/o/oniguruma-devel-6.8.2-2.el7.x86_64.rpm

3. 安装Php-8.1.12

4.问题解决记录

4.1 安装libxml2make时报错

libxml.c:15:20: 致命错误Python.h没有那个文件或目录
 #include <Python.h>
                    ^
编译中断。
make[4]: *** [libxml.lo] 错误 1
安装python3

# yum install -y python3 python3-devel

继续make 通过

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6
标签: centos