centos6.5Redis安装

    xiaoxiao2021-03-25  71

    下载redis 2.8.7压缩文件http://download.redis.io/redis-stable.tar.gz

    1.解压安装文件

    [root@hadoop01 redis-stable]# tar -zxvf redis-stable.tar.gz -C /usr/local/

    2.进入到压缩目录

    [root@hadoop01 redis-stable]# make

    [root@hadoop01 redis-stable]# make test

    3.拷贝redis服务启动命令和客户端命令

    [root@hadoop01 redis-stable] # cp ./src/redis-sever /usr/local/bin/

    [root@hadoop01 redis-stable] # cp ./src/redis-cli /usr/local/bin/

    4.新建目录,存放配置文件

    mkdir /etc/redis

    mkdir /var/redis

    mkdir /var/redis/log

    mkdir /var/redis/run

    mkdir /var/redis/6379

    5.拷贝配置文件

    [root@hadoop01 redis-stable] # cp ./redis.conf /etc/redis/6379.conf

    #修改配置该配置文件

    vi /etc/redis/6379.conf

    daemonize yes

    pidfile /var/redis/run/redis_6379.pid logfile /var/redis/log/redis_6379.log dir /var/redis/6379

    6.运行redis服务端

    redis-server /etc/redis/6379.conf

    7.运行redis客户端

    redis-cli

    转载请注明原文地址: https://ju.6miu.com/read-34684.html

    最新回复(0)