一、查看操作系统信息
root@Kylin:~# cat /etc/.kyinfo
二、更新操作系统软件
root@Kylin:~# apt-get update
三、安装所依赖的软件包
1.安装gcc
(1)安装
root@Kylin:~# apt-get install build-essential
(2)查看gcc版本信息
root@Kylin:~# gcc -v
2.安装pcre库
(1)下载源码包
root@Kylin:/usr/local/src# wget https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.43/pcre2-10.43.tar.gz --no-check-certificate
(2)解压软件包
root@Kylin:/usr/local/src# tar -zxvf pcre2-10.43.tar.gz
(3)查看目录内容
root@Kylin:/usr/local/src# cd pcre2-10.43
root@Kylin:/usr/local/src/pcre2-10.43# ls
(4)配置
root@Kylin:/usr/local/src/pcre2-10.42# ./configure
pcre2-10.43 configuration summary: Install prefix ..................... : /usr/local C preprocessor ..................... : C compiler ......................... : gcc Linker ............................. : /usr/bin/ld C preprocessor flags ............... : C compiler flags ................... : -O2 -fvisibility=hidden Linker flags ....................... : Extra libraries .................... : Build 8-bit pcre2 library .......... : yes Build 16-bit pcre2 library ......... : no Build 32-bit pcre2 library ......... : no Include debugging code ............. : no Enable JIT compiling support ....... : no Use SELinux allocator in JIT ....... : no Enable Unicode support ............. : yes Newline char/sequence .............. : lf \R matches only ANYCRLF ............ : no \C is disabled ..................... : no EBCDIC coding ...................... : no EBCDIC code for NL ................. : n/a Rebuild char tables ................ : no Internal link size ................. : 2 Maximum variable lookbehind ........ : 255 Nested parentheses limit ........... : 250 Heap limit ......................... : 20000000 kibibytes Match limit ........................ : 10000000 Match depth limit .................. : MATCH_LIMIT Build shared libs .................. : yes Build static libs .................. : yes Use JIT in pcre2grep ............... : no Enable callouts in pcre2grep ....... : yes Enable fork in pcre2grep callouts .. : yes Initial buffer size for pcre2grep .. : 20480 Maximum buffer size for pcre2grep .. : 1048576 Link pcre2grep with libz ........... : no Link pcre2grep with libbz2 ......... : no Link pcre2test with libedit ........ : no Link pcre2test with libreadline .... : no Valgrind support ................... : no Code coverage ...................... : no Fuzzer support ..................... : no Differential fuzzer support ........ : no Use %zu and %td .................... : auto |
(5)编译
root@Kylin:/usr/local/src/pcre2-10.43# make -j $(nproc)
(6)安装
root@Kylin:/usr/local/src/pcre2-10.42# ./make install
(7)查看安装后的版本号
root@Kylin:~# pcre2-config --version
3.安装zlib库
(1)下载源码包
root@Kylin:/usr/local/sr