安装
编译安装
下载源代码
wget https://download.redis.io/releases/redis-7.0.10.tar.gz
安装编译器 gcc
下面的编译方法适合于基本所有的linux c语言软件
yum -y install gcc g++
我们在redis目录下看文件列表
[root@shuyang2 redis-7.0.10]# ll
total 268
-rw-rw-r--. 1 root root 43185 Mar 21 2023 00-RELEASENOTES
-rw-rw-r--. 1 root root 51 Mar 21 2023 BUGS
-rw-rw-r--. 1 root root 5027 Mar 21 2023 CODE_OF_CONDUCT.md
-rw-rw-r--. 1 root root 2634 Mar 21 2023 CONTRIBUTING.md
-rw-rw-r--. 1 root root 1487 Mar 21 2023 COPYING
drwxrwxr-x. 7 root root 119 Mar 21 2023 deps
-rw-rw-r--. 1 root root 11 Mar 21 2023 INSTALL
-rw-rw-r--. 1 root root 151 Mar 21 2023 Makefile
-rw-rw-r--. 1 root root 6888 Mar 21 2023 MANIFESTO
-rw-rw-r--. 1 root root 22441 Mar 21 2023 README.md
-rw-rw-r--. 1 root root 106545 Mar 21 2023 redis.conf
-rwxrwxr-x. 1 root root 279 Mar 21 2023 runtest
-rwxrwxr-x. 1 root root 283 Mar 21 2023 runtest-cluster
-rwxrwxr-x. 1 root root 1613 Mar 21 2023 runtest-moduleapi
-rwxrwxr-x. 1 root root 285 Mar 21 2023 runtest-sentinel
-rw-rw-r--. 1 root root 1695 Mar 21 2023 SECURITY.md
-rw-rw-r--. 1 root root 14005 Mar 21 2023 sentinel.conf
drwxrwxr-x. 4 root root 8192 Mar 21 2023 src
drwxrwxr-x. 11 root root 199 Mar 21 2023 tests
-rw-rw-r--. 1 root root 3055 Mar 21 2023 TLS.md
drwxrwxr-x. 8 root root 4096 Mar 21 2023 utils
`
会发现里面有Makefile文件,这个是C语言编译的步骤文件,如果没有,它的目录下应该有configure文件
./configure会生成makefile
作者:严锋 创建时间:2023-10-09 16:40
最后编辑:严锋 更新时间:2025-05-09 15:48
最后编辑:严锋 更新时间:2025-05-09 15:48