[root@iZbp1he64xoa8bsarsqawsZ ~]# gcc --versiongcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1)Copyright (C) 2018 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@iZbp1he64xoa8bsarsqawsZ module]# tar -zxvf redis-6.2.1.tar.gz -C /opt/software/redis-6.2.1/redis-6.2.1/.github/redis-6.2.1/.github/ISSUE_TEMPLATE/...redis-6.2.1/utils/whatisdoing.sh[root@iZbp1he64xoa8bsarsqawsZ module]#
(4)解压完成后进入目录
[root@iZbp1he64xoa8bsarsqawsZ module]# cd /opt/software[root@iZbp1he64xoa8bsarsqawsZ software]# lltotal 11508-rw-r--r-- 1 root root 9311744 Sep 27 13:02 apache-zookeeper-3.5.7-bin.tar.gzdrwxr-xr-x 10 8980 users 258 Oct 8 09:17 FastDFS-rw-r--r-- 1 root root 17510 Oct 8 08:42 fastdfs-nginx-module_v1.16.tar.gz-rw-r--r-- 1 root root 345400 Oct 8 08:42 FastDFS_v5.05.tar.gzdrwxrwxr-x 3 root root 102 Oct 8 08:48 libfastcommon-1.0.7-rw-r--r-- 1 root root 73148 Oct 8 08:42 libfastcommonV1.0.7.tar.gzlrwxrwxrwx 1 root root 38 Oct 8 16:08 ltmain.sh -> /usr/share/libtool/build-aux/ltmain.sh-rw-r--r-- 1 root root 981687 Oct 8 08:42 nginx-1.12.2.tar.gz-rw-r--r-- 1 root root 1039530 Oct 8 13:52 nginx-1.18.0.tar.gzdrwxrwxr-x 7 root root 4096 Mar 2 2021 redis-6.2.1 # 解压后的文件
(5)在 redis-6.2.1 目录下执行 make 命令(只是编译好)
[root@iZbp1he64xoa8bsarsqawsZ redis-6.2.1]# makecd src && make allmake[1]: Entering directory '/opt/software/redis-6.2.1/src' CC Makefile.dep...Hint: It's a good idea to run 'make test' ;)make[1]: Leaving directory '/opt/software/redis-6.2.1/src'[root@iZbp1he64xoa8bsarsqawsZ redis-6.2.1]#
注意:如果没有准备好 C 语言编译环境,make 会报错—Jemalloc/jemalloc.h:没有那个文件
(6)跳过 make test,执行 make install
[root@iZbp1he64xoa8bsarsqawsZ redis-6.2.1]# make installcd src && make installmake[1]: Entering directory '/opt/software/redis-6.2.1/src'...Hint: It's a good idea to run 'make test' ;) INSTALL install INSTALL install INSTALL installmake[1]: Leaving directory '/opt/software/redis-6.2.1/src'[root@iZbp1he64xoa8bsarsqawsZ redis-6.2.1]#