zoukankan      html  css  js  c++  java
  • redis 安装以及使用

    redis 安装包下载地址

    http://download.redis.io/releases/

    下载解压

    [root@xxx ~]# wget http://download.redis.io/releases/redis-6.0.6.tar.gz
    [root@xxx ~]# tar -xvf redis-6.0.6.tar.gz


    CentOS7默认安装的是gcc 4.8.5,而redis6.0只支持gcc 5.3以上版本,这里将gcc升级到9

    yum -y install centos-release-scl
    yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils

    gcc终于升级好了,这时千万别忘记要进行版本的切换,升级了新版本肯定是使用新版本喽
    临时切换:

    scl enable devtoolset-9 bash

    永久切换:

    echo “source /opt/rh/devtoolset-9/enable” >> /etc/profile

    切换完成之后重新连接服务器生效,查看gcc版本


    编译安装

    [root@xxx ~]# cd redis-6.0.6/
    [root@xxx redis-6.0.6]# make
    [root@xxx redis-6.0.6]# make install
    [root@xxx redis-6.0.6]# cd src

    #前台启动

    [root@xxx redis-6.0.6]# ./redis-server

    #后台启动
    修改 redis.conf 文件,把 daemonize no 改为 daemonize yes

    [root@xxx src]# ./redis-server ../redis.conf
    102998:C 05 Dec 2020 00:24:53.249 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
    102998:C 05 Dec 2020 00:24:53.249 # Redis version=6.0.6, bits=64, commit=00000000, modified=0, pid=102998, just started
    102998:C 05 Dec 2020 00:24:53.249 # Configuration loaded
    [root@xxx src]#

    #客户端链接

    [root@xxx src]# ./redis-cli 
    127.0.0.1:6379> 
    127.0.0.1:6379> 
    [root@xxx src]#

  • 相关阅读:
    jquery总结
    Reporting Services子报表
    Reporting Services分组及Toggle
    Reporting Services报表钻取
    Reporting Services环境
    两种很有用的组件
    Reporting Services正确显示页码
    Reporting Services发布
    Java面试题
    BigInteger引申的一个访问权限控制解决方案
  • 原文地址:https://www.cnblogs.com/sea-stream/p/14088334.html
Copyright © 2011-2022 走看看