一. 源碼編譯安裝詳解
崇川ssl適用于網站、小程序/APP、API接口等需要進行數據傳輸應用場景,ssl證書未來市場廣闊!成為創(chuàng)新互聯的ssl證書銷售渠道,可以享受市場價格4-6折優(yōu)惠!如果有意向歡迎電話聯系或者加微信:18980820575(備注:SSL證書合作)期待與您的合作!
(待補充)
[root@MySQL80 local]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core)
下載地址: https://cmake.org/download/
軟件位置:/software/cmake-3.15.0-rc1.tar.gz
mkdir /usr/local/cmake-3.15.0
(1)切換到軟件目錄,解壓軟件包
[root@mysql80 cmake-3.15.0]# cd /software/ [root@mysql80 software]# ls -l | grep cmake-3.15.0-rc1.tar.gz -rw-r--r--. 1 root root 9249478 Jun 10 08:32 cmake-3.15.0-rc1.tar.gz [root@mysql80 software]# tar -zxvf cmake-3.15.0-rc1.tar.gz
(2)配置
[root@mysql80 software]# cd cmake-3.15.0-rc1/ [root@mysql80 cmake-3.15.0-rc1]# ./configure --prefix=/usr/local/cmake-3.15.0
完成配置,提示如下:
-----------------------------------------------------------------------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /software/cmake-3.15.0-rc1
---------------------------------------------
CMake has bootstrapped. Now run gmake.
-------------------------------------------------------------------------------------------------------
(3)編譯
make
(4)安裝
make install
(5)校驗
[root@mysql80 bin]# type cmake cmake is /usr/local/bin/cmake [root@mysql80 bin]# cmake --version cmake version 3.15.0-rc1 CMake suite maintained and supported by Kitware (kitware.com/cmake).
編譯安裝gcc-5.3.0, 需要注意兩點:
(1)gcc本身是編譯工具,那編譯gcc的工具是什么?所以需要事先通過yum或rpm安裝好之前版本的gcc。
yum install gcc gcc-c++ -y
(2)相關依賴包: GMP4.3.2 MPFR2.4.2 MPC0.8.1 ,需要依次事先安裝好。
gmp http://ftp.gnu.org/gnu/gmp/
mpfr http://ftp.gnu.org/gnu/mpfr/
mpc http://ftp.gnu.org/gnu/mpc/
[root@mysql80 software]# mkdir /usr/local/gmp-4.3.2 [root@mysql80 software]# cd /software [root@mysql80 software]# ls -l | grep gmp -rw-r--r--. 1 root root 1897483 Jun 10 09:37 gmp-4.3.2.tar.bz2 [root@mysql80 software]# tar -jxvf gmp-4.3.2.tar.bz2 [root@mysql80 software]# cd gmp-4.3.2/ [root@mysql80 gmp-4.3.2]# ./configure --prefix=/usr/local/gmp-4.3.2 [root@mysql80 gmp-4.3.2]# make [root@mysql80 gmp-4.3.2]# make install
[root@mysql80 software]# mkdir /usr/local/mpfr-2.4.2 [root@mysql80 software]# cd /software [root@mysql80 software]# ls -l | grep mpfr -rw-r--r--. 1 root root 1077886 Jun 10 09:38 mpfr-2.4.2.tar.bz2 [root@mysql80 software]# tar -jxvf mpfr-2.4.2.tar.bz2 [root@mysql80 software]# cd mpfr-2.4.2/ [root@mysql80 mpfr-2.4.2]# ./configure --prefix=/usr/local/mpfr-2.4.2 --with-gmp=/usr/local/gmp-4.3.2 [root@mysql80 gmp-4.3.2]# make [root@mysql80 gmp-4.3.2]# make install
[root@mysql80 software]# mkdir /usr/local/mpc-0.8.1 [root@mysql80 software]# cd /software [root@mysql80 software]# ls -l | grep mpc-0.8.1.tar.gz -rw-r--r--. 1 root root 544950 Jun 10 09:38 mpc-0.8.1.tar.gz [root@mysql80 software]# tar -zxvf mpc-0.8.1.tar.gz [root@mysql80 software]# cd mpc-0.8.1 [root@mysql80 mpc-0.8.1]# ./configure --prefix=/usr/local/mpc-0.8.1 --with-gmp=/usr/local/gmp-4.3.2 --with-mpfr=/usr/local/mpfr-2.4.2 [root@mysql80 gmp-4.3.2]# make [root@mysql80 gmp-4.3.2]# make install
----------------------------------------------------------------------------------------------------------------------
vim etc/profile
添加如下行:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mpc-0.8.1/lib:/usr/local/gmp-4.3.2/lib:/usr/local/mpfr-2.4.2/lib:/usr/local/gcc-5.3.0/lib:/usr/local/gcc-5.3.0/lib64
使之生效:
source etc/profile
[root@mysql80 software]# mkdir /usr/local/gcc-5.3.0 [root@mysql80 software]# cd /software [root@mysql80 software]# ls -l gcc-5.3.0.tar.gz -rw-r--r--. 1 root root 123036849 Jun 10 09:17 gcc-5.3.0.tar.gz [root@mysql80 software]# tar -zxvf gcc-5.3.0.tar.gz [root@mysql80 software]# cd gcc-5.3.0/ [root@mysql80 gcc-5.3.0]# ./configure --prefix=/usr/local/gcc-5.3.0 --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++ --with-gmp=/usr/local/gmp-4.3.2 --with-mpfr=/usr/local/mpfr-2.4.2 --with-mpc=/usr/local/mpc-0.8.1 [root@mysql80 gmp-4.3.2]# make -j4 [root@mysql80 gmp-4.3.2]# make install
cd /usr/bin rm gcc rm g++ ln -s /usr/local/gcc-5.3.0/bin/g++ g++ ln -s /usr/local/gcc-5.3.0/bin/gcc gcc
[root@mysql80 bin]# gcc --version gcc (GCC) 5.3.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE [root@mysql80 bin]# g++ --version g++ (GCC) 5.3.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.