CentOS下基础组件库源码编译安装
源码编译安装好处:可自定义版本、目录及特性
zlib
Home:http://www.zlib.net/
wget -c http://www.zlib.net/zlib-1.2.11.tar.gz
tar -zxf zlib-1.2.11.tar.gz
cd zlib-1.2.11/
./configure --prefix=/usr/local/zlib/
make && make install
openssl
wget -c https://www.openssl.org/source/openssl-1.1.1c.tar.gz
tar -zxf openssl-1.1.1c.tar.gz
cd openssl-1.1.1c/
./config --prefix=/usr/local/openssl/
make && make install
libzip
(1)<1.4
wget https://nih.at/libzip/libzip-1.3.2.tar.gz
tar -zxf libzip-1.3.2.tar.gz
cd libzip-1.3.2
./configure --prefix=/usr/local/libzip/
make && make install
(2)≥1.4
wget https://libzip.org/download/libzip-1.5.2.tar.gz
tar -zxf libzip-1.5.2.tar.gz
cd libzip-1.5.2
more INSTALL.md
mkdir build
cd build/
cmake ..
make && make install
编译libzip时报CentOS 7自带的cmake版本过低,于是编译安装cmake
wget https://cmake.org/files/v3.15/cmake-3.15.1.tar.gz
tar -zxf cmake-3.15.1.tar.gz
cd cmake-3.15.1
./bootstrap
gmake
gmake install
whereis cmake
ln -s /usr/local/bin/cmake /usr/bin/
libxml2
Home:http://xmlsoft.org
Release:http://xmlsoft.org/news.html
yum install python-devel -y
wget -c ftp://xmlsoft.org/libxml2/libxml2-2.9.7.tar.gz
tar -zxf libxml2-2.9.7.tar.gz
cd libxml2-2.9.7/
./configure --prefix=/usr/local/libxml2/
make && make install
curl
Home:https://curl.haxx.se
Release:https://curl.haxx.se/download/
wget -c https://curl.haxx.se/download/curl-7.65.0.tar.gz
tar -zxf curl-7.65.0.tar.gz
cd curl-7.65.0/
./configure --prefix=/usr/local/curl/
make && make install
jpeg
Home:http://www.ijg.org/
wget -c http://www.ijg.org/files/jpegsrc.v9c.tar.gz
tar -zxf jpegsrc.v9c.tar.gz
cd jpeg-9c/
./configure --prefix=/usr/local/jpeg-9c/
make && make install
libpng
Home:https://sourceforge.net/projects/libpng/files/
wget -c http://download.sourceforge.net/libpng/libpng-1.6.37.tar.gz
tar -zxf libpng-1.6.37.tar.gz
cd libpng-1.6.37/
./configure --prefix=/usr/local/libpng/
make && make install
libtiff
wget -c http://download.osgeo.org/libtiff/tiff-4.0.9.tar.gz
tar -zxf tiff-4.0.9.tar.gz
cd tiff-4.0.9/
./configure --prefix=/usr/local/tiff/
make && make install
freetype
Release:http://download.savannah.gnu.org/releases/freetype/
wget -c http://download.savannah.gnu.org/releases/freetype/freetype-2.9.1.tar.gz
tar -zxf freetype-2.9.1.tar.gz
cd freetype-2.9.1/
./configure --prefix=/usr/local/freetype/
make && make install
libevent
Home:https://github.com/libevent/libevent
Release:https://github.com/libevent/libevent/releases
wget -c https://github.com/libevent/libevent/releases/download/release-2.1.10-stable/libevent-2.1.10-stable.tar.gz
tar -zxf libevent-2.1.10-stable.tar.gz
cd libevent-2.1.10-stable/
./configure --prefix=/usr/local/libevent/ --disable-debug-mode
make && make install
libiconv
Home:https://ftp.gnu.org/pub/gnu/libiconv/
wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz
tar -zxf libiconv-1.16.tar.gz
cd libiconv-1.16
./configure --prefix=/usr/local/libiconv
make && make install
re2c
Home:https://github.com/skvadrik/re2c/
Release:https://github.com/skvadrik/re2c/releases
wget -c https://github.com/skvadrik/re2c/releases/download/1.1.1/re2c-1.1.1.tar.gz
tar -zxf re2c-1.1.1.tar.gz
cd re2c-1.1.1/
./configure --prefix=/usr/local/re2c/
make && make install
libmcrypt
Release:ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt
wget -c ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz
tar -zxf libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7/
./configure --prefix=/usr/local/libmcrypt/
make && make install
libgd
Home:https://github.com/libgd/libgd/
Release:https://github.com/libgd/libgd/releases
yum install libXpm-devel.x86_64
wget -c https://github.com/libgd/libgd/releases/download/gd-2.2.5/libgd-2.2.5.tar.gz
tar -zxf libgd-2.2.5.tar.gz
cd libgd-2.2.5/
./configure --prefix=/usr/local/libgd --enable-shared --with-jpeg=/usr/local/jpeg-9c --with-freetype=/usr/local/freetype --with-png=/usr/local/libpng --with-zlib=/usr/local/zlib --with-tiff=/usr/local/tiff
make && make install
pcre
Home:https://ftp.pcre.org/pub/pcre/
wget -c https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz
tar -zxf pcre-8.43.tar.gz
cd pcre-8.43/
./configure --prefix=/usr/local/pcre/
make && make install
GeoIP
Home:https://github.com/maxmind/geoip-api-c
wget -c https://github.com/maxmind/geoip-api-c/releases/download/v1.6.12/GeoIP-1.6.12.tar.gz
tar -zxf GeoIP-1.6.12.tar.gz
cd GeoIP-1.6.12/
./configure
make && make install
openldap
yum install openldap openldap-devel -y
cp -frp /usr/lib64/libldap* /usr/lib/
版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/02/25/compilation-and-installation-of-basic-component-library-source-code-under-centos/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。
共有 0 条评论