redis-3.2.6 安装与配置

1.下载与解压:

[root@SZB-L0045333 Redis]# wget http://download.redis.io/releases/redis-3.2.6.tar.gz
[root@SZB-L0045333 Redis]# tar xzf redis-3.2.6.tar.gz
[root@SZB-L0045333 Redis]# cd redis-3.2.6

注:刚刚申请的linux云主机,没有安装任何支持包
2.安装:

[root@SZB-L0045333 redis-3.2.6]# ./runtest
 You need tcl 8.5 or newer in order to run the Redis test
[root@SZB-L0045333 redis-3.2.6]#  yum install tcl

再次安装:

[root@SZB-L0045333 redis-3.2.6]# make cd src && make all
make[1]: Entering directory `/opt/redis-3.2.6/src'
    rm -rf redis-server redis-sentinel redis-cli redis-benchmark redis-check-dump redis-check-aof *.o *.gcda *.gcno *.gcov redis.info lcov-html
    (cd ../deps && make distclean)
    make[2]: Entering directory `/opt/redis-3.2.6/deps'
    (cd hiredis && make clean) > /dev/null || true
    (cd linenoise && make clean) > /dev/null || true
    (cd lua && make clean) > /dev/null || true
    (cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
    (rm -f .make-*)
    make[2]: Leaving directory `/opt/redis-3.2.6/deps'
    (rm -f .make-*)
    echo STD=-std=c99 -pedantic >> .make-settings
    echo WARN=-Wall -W >> .make-settings
    echo OPT=-O2 >> .make-settings
    echo MALLOC=jemalloc >> .make-settings
    echo CFLAGS= >> .make-settings
    echo LDFLAGS= >> .make-settings
    echo REDIS_CFLAGS= >> .make-settings
    echo REDIS_LDFLAGS= >> .make-settings
    echo PREV_FINAL_CFLAGS=-std=c99 -pedantic -Wall -W -O2 -g -ggdb   -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -DUSE_JEMALLOC -I../deps/jemalloc/include >> .make-settings
    echo PREV_FINAL_LDFLAGS=  -g -ggdb -rdynamic >> .make-settings
    (cd ../deps && make hiredis linenoise lua jemalloc)
    make[2]: Entering directory `/opt/redis-3.2.6/deps'
    (cd hiredis && make clean) > /dev/null || true
    (cd linenoise && make clean) > /dev/null || true
    (cd lua && make clean) > /dev/null || true
    (cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
    (rm -f .make-*)
    (echo "" > .make-ldflags)
    (echo "" > .make-cflags)
    MAKE hiredis
    cd hiredis && make static
    make[3]: Entering directory `/opt/redis-3.2.6/deps/hiredis'
    gcc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb  net.c
    make[3]: gcc:命令未找到
    make[3]: *** [net.o] 错误 127
    make[3]: Leaving directory `/opt/redis-3.2.6/deps/hiredis'
    make[2]: *** [hiredis] 错误 2
    make[2]: Leaving directory `/opt/redis-3.2.6/deps'
    make[1]: [persist-settings] 错误 2 (忽略)
            CC adlist.o
    /bin/sh: cc: command not found
    make[1]: *** [adlist.o] 错误 127
    make[1]: Leaving directory `/opt/redis-3.2.6/src'
    make: *** [all] 错误 2

安装gcc

[root@SZB-L0045333 redis-3.2.6]#  yum install gcc

再次启动

[root@SZB-L0045333 redis-3.2.6]# make cd src && make all
make[1]: Entering directory `/opt/redis-3.2.6/src' CC adlist.o
[root@SZB-L0045333 redis-3.2.6]# make MALLOC=libc

3.参数介绍:
make install命令执行完成后,会在/usr/local/bin目录下生成本个可执行文件,分别是redis-server、redis-cli、redis-benchmark、redis-check-aof 、redis-check-dump,它们的作用如下:
redis-server:Redis服务器的daemon启动程序
redis-cli:Redis命令行操作工具。也可以用telnet根据其纯文本协议来操作
redis-benchmark:Redis性能测试工具,测试Redis在当前系统下的读写性能
redis-check-aof:数据修复
redis-check-dump:检查导出工具
4.检查是否启动成功:

[root@SZB-L0045333 redis-3.2.6]# ps -ef | grep redis
root      1851 29932  0 15:26 pts/1    00:00:03 redis-server *:6379
root      3622  1936  0 16:17 pts/3    00:00:00 grep redis
阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wangshuang1631/article/details/53995496
文章标签: redis linux
个人分类: Redis
想对作者说点什么? 我来说一句

redis-3.2.6.tar.gz

2016年12月31日 1.47MB 下载

Linux下Redis3.2.2安装与启动配置

2016年07月31日 458KB 下载

redis-3.2.6.tar

2016年12月28日 6.56MB 下载

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭