一、安装依赖包,准备环境。
yum install -y gcc
依赖包情况可能会不一样,按照编译时候的提示安装就可以了。但是gcc一定要装。
二、1、下载tar包,安装启动。
wget http://source.goyun.org:8000/source/Redis/redis-3.2.9.tar.gz
--2018-01-12 19:15:07-- http://source.goyun.org:8000/source/Redis/redis-3.2.9.tar.gz
Resolving source.goyun.org... 59.110.136.26
Connecting to source.goyun.org|59.110.136.26|:8000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1547695 (1.5M) [application/x-gzip]
Saving to: “redis-3.2.9.tar.gz.1”
100%[===================================================================================================================>] 1,547,695 73.8K/s in 42s
2018-01-12 19:15:49 (36.4 KB/s) - “redis-3.2.9.tar.gz.1” saved [1547695/1547695]
默认是下载在当前目录下的,
2、解压:
tar zxvf redis-3.2.9.tar.gz
[root@localhost ~]# ll
drwxrwxr-x 6 root root 4096 May 17 2017 redis-3.2.9
-rw-r--r-- 1 root root 1547695 Jan 12 15:07 redis-3.2.9.tar.gz
会在当前目录下面产生一个redis-3.2.9目录。
3、进入目录并make:
[root@localhost ~]# cd redis-3.2.9
[root@localhost redis-3.2.9]# ll
total 208
-rw-rw-r-- 1 root root 87407 May 17 2017 00-RELEASENOTES
-rw-rw-r-- 1 root root 53 May 17 2017 BUGS
-rw-rw-r-- 1 root root 1805 May 17 2017 CONTRIBUTING
-rw-rw-r-- 1 root root 1487 May 17 2017