美文网首页
安装redis centos7.2 redis 3.06

安装redis centos7.2 redis 3.06

作者: nhsf | 来源:发表于2019-01-07 16:43 被阅读0次

    cd /usr/local/src

    wget http://download.redis.io/releases/redis-3.0.6.tar.gz

    tar -zxvf redis-3.0.6.tar.gz

    cp -r redis-3.0.6 /usr/local/redis/

    make&&make install

    make test

    运行redis test

    yum install tcl

    make install

    redis-server /usr/local/redis/redis.conf

    redis-cli

    sudovim /usr/lib/systemd/system/redis.service

    写入如下内容,具体文件路径,各异。

    [Unit]
    
    Description=Redis
    
    After=syslog.target network.target remote-fs.target nss-lookup.target
    
    [Service]
    
    Type=forking
    
    PIDFile=/usr/local/redis/redis.pid
    
    ExecStart=/usr/local/redis/src/redis-server /usr/local/redis/redis.conf
    
    ExecReload=/bin/kill-s HUP $MAINPID
    
    ExecStop=/bin/kill-s QUIT $MAINPID
    
    PrivateTmp=true
    
    [Install]
    
    WantedBy=multi-user.target
    
    1. 重载系统服务

    systemctl daemon-reload

    1. 启动redis

    systemctl start redis

    相关文章

      网友评论

          本文标题:安装redis centos7.2 redis 3.06

          本文链接:https://www.haomeiwen.com/subject/kwourqtx.html